pyre-agent-kit 4.0.4 → 4.0.6

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.
Files changed (2) hide show
  1. package/dist/agent.js +23 -17
  2. package/package.json +1 -1
package/dist/agent.js CHANGED
@@ -155,10 +155,9 @@ any FACTIONS - (!), (.), (%), (@)
155
155
  --- STRATEGY:
156
156
  - Coordinate with other agents to push FACTIONS where STATUS=RS factions toward STATUS=ASN. (+), (&), and (!) all raise MCAP. (-) and (#) lower it.
157
157
  - Limit factions where MBR=true to AT MOST 5.${positionValues.length > 5 ? ` MBR at ${positionValues.length} — CONSIDER (-) from underperformers.` : ''}
158
- - Discover information about other FACTIONS in LATEST. P&L is your health. SENT is per-faction direction. Combine all three to decide.
159
- - (!) FACTIONS where MBR=true and SENT is bullish to promote.
160
- - (#) FACTIONS where MBR=true and SENT is bearish to fud. Or (!) to rally.
161
158
  - If (FNR=true,MBR=false), consider (+), otherwise if (FNR=true,MBR=true) consider (&). promote with (!).
159
+ - Discover information about other FACTIONS in LATEST. P&L is your health. SENT is per-faction direction. Combine all three to decide.
160
+ - (!) and (#) are your voice. (!) FACTIONS where MBR=true and SENT is bullish to promote. (#) FACTIONS where MBR=true and SENT is bearish to fud. Or (!) to rally.
162
161
  - FACTIONS where MBR=true ARE your identity. Promote what you hold. Attack what you don't.${factionCtx.all.length <= 2 ? '\n- Few factions active — consider (%).' : ''}
163
162
  - (-) to lock in profits or cut losers. Don't stay in underperformers.
164
163
  - (_) to skip this turn if you are comfortable with your current positions and have nothing to say.
@@ -216,6 +215,8 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
216
215
  return 'RD';
217
216
  return 'RS';
218
217
  };
218
+ // Sentiment label
219
+ const sentLabel = (s) => s > 0.5 ? 'BULL' : s < -0.5 ? 'BEAR' : 'NEUT';
219
220
  // Discovery tag
220
221
  const discoveryTag = (f) => {
221
222
  if (nearbyMints.has(f.mint))
@@ -234,7 +235,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
234
235
  const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
235
236
  const fnr = foundedSet.has(f.mint);
236
237
  const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
237
- factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},true,${fnr},${v.valueSol.toFixed(4)},${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10})`);
238
+ factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},true,${fnr},${v.valueSol.toFixed(4)},${sentLabel(sent)})`);
238
239
  }
239
240
  // Non-member factions
240
241
  const nonMember = factionCtx.all.filter(f => !seenMints.has(f.mint) && f.status !== 'razed');
@@ -251,7 +252,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
251
252
  seenMints.add(f.mint);
252
253
  const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
253
254
  const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
254
- factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},false,false,0,${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10})`);
255
+ factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},false,false,0,${sentLabel(sent)})`);
255
256
  }
256
257
  const validatedFactions = [...ascended, ...ready, ...rising, ...nearby, ...unexplored];
257
258
  const mMint2 = [...heldMints][0] || (validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions).mint : null);
@@ -272,13 +273,13 @@ RD: ready, community transition stage before ascend.
272
273
  ASN: ascended factions, established. treasuries active. 0.04% war tax to the faction.
273
274
  MBR: true = you are a member. false = you are not a member.
274
275
  FNR: true = you founded the faction. false = you did not found the faction.
275
- SENT: sentiment score. positive = bullish, negative = bearish.
276
+ SENT: sentiment score. positive=BULL, negative=BEAR, neutral=NEUT.
276
277
  --- YOU ARE:
277
278
  NAME: @AP${agent.publicKey.slice(0, 4)}
278
279
  BIO: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
279
280
  LAST MOVES: ${kit.state.history.length > 0 ? [...kit.state.history].slice(-2).join('; ') : 'none'}
280
281
  P&L: ${pnl >= 0 ? '+' : ''}${pnl.toFixed(4)} SOL
281
- ${unrealizedPnl > 0.1 ? 'YOU ARE UP. Consider (-) to take profits on MBR=true winners.' : unrealizedPnl < -0.05 ? 'YOU ARE DOWN. Be conservative. (-) MBR=true losers. Or (!) to promote MBR=true winners.' : 'BREAKEVEN. Look for conviction plays.'}
282
+ ${unrealizedPnl > 0.1 ? 'YOU ARE UP. Consider taking profits on MBR=true.' : unrealizedPnl < -0.05 ? 'YOU ARE DOWN. Be conservative. Consider cutting losses on MBR=true' : 'BREAKEVEN. Look for conviction plays.'}
282
283
  --- INTEL:
283
284
  ${intelSnippet}
284
285
  --- FACTIONS:
@@ -290,7 +291,7 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
290
291
  (|) $ "*" - infiltrate, sneak in.
291
292
  (&) $ "*" - reinforce. increase your position.
292
293
  (!) $ "*" - talk in comms.
293
- (#) $ "*" - trash talk.
294
+ (#) $ "*" - fud or trash talk.
294
295
  (^) $ - ascend. unlock treasury.
295
296
  (~) $ - harvest fees.
296
297
  (%) ";" - create a new faction. ; = creative name.
@@ -305,26 +306,31 @@ FACTIONS where STATUS=ASN - (~)
305
306
  any FACTIONS - (!), (.), (%), (@)
306
307
  --- STRATEGY:
307
308
  - Your personality is your tone.
308
- - Coordinate with other agents to push FACTIONS where STATUS=RS factions toward STATUS=ASN. (+), (&), and (!) all push the MCAP up. (-) and (#) lower it.
309
- - FACTIONS where STATUS=ASN are established, with potentially lower risk. FACTIONS where STATUS=RS may have higher reward if you pick the right one.
310
309
  - Discover information about other FACTIONS in INTEL (other agents are labeled with @AP). P&L is your health. SENT is per-faction direction. Combine all three to decide.
310
+ - (+), (&), and (!) all push the MCAP up. (-) and (#) lower it.
311
+ - Work to push FACTIONS from (STATUS=RS,MBR=true) to (STATUS=ASN,MBR=true) if SENT=BULL or SENT=NEUT.
312
+ - FACTIONS where STATUS=RS may have higher reward if you pick the right one.
313
+ - (!) and (#) are your voice. Use (!) when SENT=BULL. When (MBR=true,SENT=BEAR) use (#) to fud or (!) to rally.
311
314
  - no FACTIONS? Use (%) to create one. Anyone can (%).
312
- - If (FNR=true,MBR=false), consider (+), otherwise if (FNR=true,MBR=true) consider (&). promote with (!).
315
+ - If (FNR=true,MBR=false), consider (+). This is your faction, promote it.
313
316
  - Limit FACTIONS where MBR=true to AT MOST 5.${memberOf.length > 3 ? ` MBR=true on ${memberOf.length} FACTIONS — CONSIDER (-) from underperformers.` : ''}
314
- - (!) FACTIONS where MBR=true and SENT is bullish to promote.
315
- - (#) FACTIONS where MBR=true and SENT is bearish to fud. Or (!) to rally.
316
317
  - (-) to lock in profits or downsize on underperforming factions.
317
318
  - (_) to skip this turn if you are comfortable with your current positions and have nothing to say.
318
- ---
319
- Output EXACTLY one line: (action) $ "*"
320
- example format: ${(0, util_1.pick)([
319
+ --- EXAMPLES:
320
+ ${(0, util_1.pick)([
321
321
  `(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"`,
322
322
  `(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"`,
323
+ ])}
324
+ ${(0, util_1.pick)([
323
325
  `(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"`,
324
326
  `(|) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"`,
327
+ ])}
328
+ ${(0, util_1.pick)([
325
329
  `(!) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"`,
326
330
  `(#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"`
327
331
  ])}
332
+ ---
333
+ One move per turn. Output EXACTLY one line: (action) $ "*" OR (_)
328
334
  >`;
329
335
  };
330
336
  exports.buildCompactModelPrompt = buildCompactModelPrompt;
@@ -414,7 +420,7 @@ function parseLLMDecision(raw, factions, kit, agent, holdings, solRange) {
414
420
  for (const candidate of lines) {
415
421
  const line = candidate.trim();
416
422
  // Explicit hold/skip — do nothing this turn
417
- if (/^\(?_\)?(\s.*)?$|^HOLD$/i.test(line)) {
423
+ if (/^\(?\s*_\s*\)?(\s.*)?$|^HOLD$/i.test(line)) {
418
424
  return { action: 'hold', reasoning: 'hold — skip turn' };
419
425
  }
420
426
  const scoutMatch = line.match(/^SCOUT\s+@?([A-Za-z0-9]{6,44})/i);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-agent-kit",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
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",