pyre-agent-kit 3.4.36 → 3.4.37

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 +39 -39
  2. package/package.json +1 -1
package/dist/agent.js CHANGED
@@ -58,7 +58,7 @@ const buildAgentPrompt = (kit, agent, factionCtx, intelSnippet, recentMessages,
58
58
  const posPnl = pv.valueSol - estCost;
59
59
  pnlStr = `${posPnl >= 0 ? '+' : ''}${posPnl.toFixed(4)}`;
60
60
  }
61
- factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | true | ${fnr} | ${pv.valueSol.toFixed(4)} | ${pnlStr} | ${sent > 0 ? '+' : ''}${sent}${loan ? ' | LOAN' : ''}`);
61
+ factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},true,${fnr},${pv.valueSol.toFixed(4)},${pnlStr},${sent > 0 ? '+' : ''}${sent}${loan ? ',LOAN' : ''})`);
62
62
  }
63
63
  // Non-member factions
64
64
  const nonMember = factionCtx.all.filter(f => !seenMints.has(f.mint) && f.status !== 'razed');
@@ -75,7 +75,7 @@ const buildAgentPrompt = (kit, agent, factionCtx, intelSnippet, recentMessages,
75
75
  seenMints.add(f.mint);
76
76
  const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
77
77
  const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
78
- factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | false | false | 0 | 0 | ${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10}`);
78
+ factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},false,false,0,0,${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10})`);
79
79
  }
80
80
  const validatedFactions = [...ascended, ...ready, ...rising, ...nearby, ...unexplored];
81
81
  const doNotRepeat = recentMessages.length > 0
@@ -91,7 +91,7 @@ const buildAgentPrompt = (kit, agent, factionCtx, intelSnippet, recentMessages,
91
91
  const f1 = f1Mint ? f1Mint.mint.slice(-8) : m;
92
92
  const f2Mint = validatedFactions.length > 1 ? (0, util_1.pick)(validatedFactions.filter(f => f.mint !== f1Mint?.mint)) : f1Mint;
93
93
  const f2 = f2Mint ? f2Mint.mint.slice(-8) : f1;
94
- 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.
94
+ return `You are an autonomous agent playing in Pyre, a faction warfare game.
95
95
  --- GOAL:
96
96
  Maximize long-term profit and faction dominance.
97
97
  --- LEGEND:
@@ -118,7 +118,7 @@ AL: ${agent.allies.size > 0 ? [...agent.allies].slice(0, 5).map((a) => `@AP${a.s
118
118
  RVL: ${agent.rivals.size > 0 ? [...agent.rivals].slice(0, 5).map((a) => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
119
119
  LATEST: ${intelSnippet}
120
120
  --- FACTIONS:
121
- FID | MCAP | STATUS | MBR | FNR | VALUE | PNL | SENT
121
+ (FID,MCAP,STATUS,MBR,FNR,VALUE,PNL,SENT)
122
122
  ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
123
123
  --- ACTIONS:
124
124
  (+) $ "*" - join a faction.
@@ -150,7 +150,7 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
150
150
  - To (<), LOAN must exist on the faction.
151
151
  - If FNR is true, you founded it. (+) if MBR is false, (&) if MBR is true, promote with (=).
152
152
  - Limit factions where MBR is true to AT MOST 5.${positionValues.length > 5 ? ` MBR at ${positionValues.length} — CONSIDER (-) from underperformers.` : ''}
153
- - (=)/(#) move sentiment. Use (=) to promote winners, (#) to fud losers.
153
+ - (=) and (#) move sentiment. Use (=) to promote winners or (#) to fud losers.
154
154
  - (-) to lock in profits or cut losers. Don't stay in underperformers.
155
155
  - Coordinate with AL agents to push RS factions toward ASN.
156
156
  - Your holdings ARE your identity. Promote what you hold. Attack what you don't.${factionCtx.all.length <= 2 ? '\n- Few factions active — consider (%).' : ''}
@@ -159,14 +159,14 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
159
159
  (-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"
160
160
  (&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"
161
161
  (!) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"
162
- (=) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"
163
- (#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"
164
162
  (^) ${m}
165
163
  (~) ${m}
164
+ (=) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"
165
+ (#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"
166
166
  ---
167
167
  Output EXACTLY one line: (action) $ "*"
168
168
  example format: (+) ${f1} "looks good here."
169
- your move>`;
169
+ >`;
170
170
  };
171
171
  exports.buildAgentPrompt = buildAgentPrompt;
172
172
  const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMessages, solRange, holdings) => {
@@ -228,7 +228,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
228
228
  const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
229
229
  const fnr = foundedSet.has(f.mint);
230
230
  const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
231
- factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | true | ${fnr} | ${v.valueSol.toFixed(4)} | ${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10}`);
231
+ factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},true,${fnr},${v.valueSol.toFixed(4)},${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10})`);
232
232
  }
233
233
  // Non-member factions
234
234
  const nonMember = factionCtx.all.filter(f => !seenMints.has(f.mint) && f.status !== 'razed');
@@ -245,7 +245,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
245
245
  seenMints.add(f.mint);
246
246
  const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
247
247
  const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
248
- factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | false | false | 0 | ${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10}`);
248
+ factionRows.push(`(${f.mint.slice(-8)},${mcap},${statusTag(f)},false,false,0,${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10})`);
249
249
  }
250
250
  const validatedFactions = [...ascended, ...ready, ...rising, ...nearby, ...unexplored];
251
251
  const mMint2 = [...heldMints][0] || (validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions).mint : null);
@@ -267,7 +267,8 @@ ASN: ascended factions, established. treasuries active. 0.04% war tax to the fac
267
267
  MBR: true = you are a member of the faction.
268
268
  FNR: true = you founded it.
269
269
  SENT: sentiment score. positive = bullish, negative = bearish.
270
- AL/RVL: ally/rival agents, prefixed @AP.
270
+ AL: ally agents, prefixed @AP.
271
+ RVL: rival agents, prefixed @AP.
271
272
  --- YOU ARE:
272
273
  NAME: @AP${agent.publicKey.slice(0, 4)}
273
274
  BIO: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
@@ -278,46 +279,45 @@ ${unrealizedPnl > 0.1 ? 'YOU ARE UP. Consider (-) to take profits on winners.' :
278
279
  AL: ${agent.allies.size > 0 ? [...agent.allies].slice(0, 2).map(a => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
279
280
  RVL: ${agent.rivals.size > 0 ? [...agent.rivals].slice(0, 2).map(a => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
280
281
  LATEST: ${intelSnippet}
282
+ --- STRATEGY:
283
+ - Your personality is your tone.
284
+ - Promote factions you are in. Attack your rival factions.
285
+ - $ is ALWAYS a faction FID (ends in pw), NEVER an @AP agent. To talk to agents, put @AP inside your "*" response.
286
+ - In your RESPONSE, you can mention other agents from AL, RVL, and LATEST (format is @AP + 4 chars, e.g. @AP${Math.random().toString(36).slice(2, 6)}), if NOT none.
287
+ - Factions with STATUS ASN are lower risk and established, but RS factions may have higher reward if you pick the right one.
288
+ - To (^) a faction, STATUS must be RD.
289
+ - no factions? Use (%) to create one. Anyone can (%).
290
+ - If FNR is true on a faction, you founded it. Consider (+) or (&) promote it with (=).
291
+ - Limit factions where MBR is true to AT MOST 5 factions.${memberOf.length > 3 ? ` MBR at ${memberOf.length} factions — CONSIDER (-) from underperformers.` : ''}
292
+ - (=) and (#) move sentiment. Use (=) and (#) to coordinate with other agents.
293
+ - (-) to lock in profits or downsize on underperforming factions.
281
294
  --- FACTIONS:
282
- FID | MCAP | STATUS | MBR | FNR | VALUE | SENT
295
+ (FID,MCAP,STATUS,MBR,FNR,VALUE,SENT)
283
296
  ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
284
297
  --- ACTIONS:
285
- (+) $ "*" - join a faction.
286
- (-) $ "*" - leave or decrease position in a faction.
287
- (!) $ "*" - sneak into a faction.
288
- (&) $ "*" - fortify position in a faction.
298
+ (+) $ "*" - join a faction where MBR is false.
299
+ (-) $ "*" - leave or decrease position in a faction where MBR is true.
300
+ (!) $ "*" - sneak into a faction where MBR is false.
301
+ (&) $ "*" - increase position in a faction where MBR is true.
289
302
  (=) $ "*" - talk in faction comms.
290
- (#) $ "*" - trash talk a faction.
303
+ (#) $ "*" - trash talk a faction where MBR is true.
291
304
  (^) $ - ascend a faction.
292
305
  (~) $ - harvest fees into treasury.
293
306
  (%) ";" - create a new faction.
294
307
  - REPLACE $ with exactly ONE choice from FACTIONS using the FID column (always contains the pw suffix).
295
308
  - REPLACE * with a ONE sentence RESPONSE for your ACTION, always in double quotes.
296
309
  - REPLACE ; with a unique faction inspired name (eg. "Glitch Cult", "Whale Syndicate"), always in double quotes. only for (%).
297
- --- STRATEGY:
298
- - Your personality is your tone.
299
- - $ is ALWAYS a faction FID (ends in pw), NEVER an @AP agent. To talk to agents, put @AP inside your "*" response.
300
- - In your RESPONSE, you can mention other agents from AL, RVL, and LATEST (format is @AP + 4 chars, e.g. @AP${Math.random().toString(36).slice(2, 6)}), if NOT none.
301
- - Factions with STATUS ASN are lower risk and established, but RS factions may have higher reward if you pick the right one.
302
- - To (&), (-) or (#), the faction MBR MUST be true.
303
- - To (^) a faction, STATUS must be RD.
304
- - no factions? Use (%) to create one. Anyone can (%).
305
- - If FNR is true on a faction, you founded it. (+) if MBR is false, (&) if MBR is true and promote them with (=).
306
- - Limit factions where MBR is true to AT MOST 5 factions.${memberOf.length > 3 ? ` MBR at ${memberOf.length} factions — CONSIDER (-) from underperformers.` : ''}
307
- - Promote factions you are in. Attack your rival factions.
308
- - (=)/(#) move sentiment and help coordinate with other agents — use (=) to promote your winners and (#) to fud your losers.
309
- - (-) to lock in profits or downsize on underperforming factions.
310
- --- EXAMPLES:
311
- (+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"
312
- (-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"
313
- (&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"
314
- (!) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"
315
- (=) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"
316
- (#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"
317
310
  ---
318
311
  Output EXACTLY one line: (action) $ "*"
319
- example format: (+) ${f1} "looks good here."
320
- your move>`;
312
+ example format: ${(0, util_1.pick)([
313
+ `(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"`,
314
+ `(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"`,
315
+ `(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"`,
316
+ `(!) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"`,
317
+ `(=) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"`,
318
+ `(#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"`
319
+ ])}
320
+ >`;
321
321
  };
322
322
  exports.buildCompactModelPrompt = buildCompactModelPrompt;
323
323
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-agent-kit",
3
- "version": "3.4.36",
3
+ "version": "3.4.37",
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",