pyre-agent-kit 4.3.1 → 4.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.
Files changed (2) hide show
  1. package/dist/agent.js +12 -13
  2. package/package.json +1 -1
package/dist/agent.js CHANGED
@@ -91,12 +91,12 @@ const buildAgentPrompt = (kit, agent, factionCtx, intelSnippet, recentMessages,
91
91
  const memoryBlock = memoryEntries.length > 0
92
92
  ? memoryEntries.slice(0, 7).map((m) => `- ${m}`).join('; ')
93
93
  : 'none';
94
- const mMint = [...heldMints][0] || (validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions).mint : null);
95
- const m = mMint ? mMint.slice(-8) : 'xxxxxxpw';
96
- const f1Mint = validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions) : null;
97
- const f1 = f1Mint ? f1Mint.mint.slice(-8) : m;
98
- const f2Mint = validatedFactions.length > 1 ? (0, util_1.pick)(validatedFactions.filter(f => f.mint !== f1Mint?.mint)) : f1Mint;
99
- const f2 = f2Mint ? f2Mint.mint.slice(-8) : f1;
94
+ // Pick example FIDs only from factions actually shown in the table
95
+ const tableFids = factionRows.map(r => r.split(',')[0]);
96
+ const m = tableFids.find(fid => heldMints.has([...seenMints].find(mint => mint.endsWith(fid)) ?? '')) ?? tableFids[0] ?? 'xxxxxxpw';
97
+ const nonMemberFids = tableFids.filter(fid => fid !== m);
98
+ const f1 = nonMemberFids.length > 0 ? (0, util_1.pick)(nonMemberFids) : m;
99
+ const f2 = nonMemberFids.length > 1 ? (0, util_1.pick)(nonMemberFids.filter(fid => fid !== f1)) : f1;
100
100
  return `You are an autonomous agent playing in Pyre, a faction warfare game. You form your own alliances, opinions, and grudges. Think in English only. Think linearly: situation → decision → reason. Do not repeat yourself. Do NOT overthink, chess/strategy mood.
101
101
  --- GOAL:
102
102
  Maximize long-term profit and faction dominance.
@@ -273,13 +273,12 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
273
273
  const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
274
274
  factionRows.push(`${f.mint.slice(-8)},${mcap},${statusTag(f)},false,false,0,FLAT,${sentLabel(sent)}`);
275
275
  }
276
- const validatedFactions = [...ascended, ...ready, ...rising, ...nearby, ...unexplored];
277
- const mMint2 = [...heldMints][0] || (validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions).mint : null);
278
- const m = mMint2 ? mMint2.slice(-8) : 'xxxxxxpw';
279
- const f1v = validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions) : null;
280
- const f1 = f1v ? f1v.mint.slice(-8) : m;
281
- const f2v = validatedFactions.length > 1 ? (0, util_1.pick)(validatedFactions.filter(f => f.mint !== f1v?.mint)) : f1v;
282
- const f2 = f2v ? f2v.mint.slice(-8) : f1;
276
+ // Pick example FIDs only from factions actually shown in the table
277
+ const tableFids = factionRows.map(r => r.split(',')[0]);
278
+ const m = tableFids.find(fid => heldMints.has([...seenMints].find(mint => mint.endsWith(fid)) ?? '')) ?? tableFids[0] ?? 'xxxxxxpw';
279
+ const nonMemberFids = tableFids.filter(fid => fid !== m);
280
+ const f1 = nonMemberFids.length > 0 ? (0, util_1.pick)(nonMemberFids) : m;
281
+ const f2 = nonMemberFids.length > 1 ? (0, util_1.pick)(nonMemberFids.filter(fid => fid !== f1)) : f1;
283
282
  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.
284
283
  --- GOAL:
285
284
  Maximize long-term profit and faction dominance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-agent-kit",
3
- "version": "4.3.1",
3
+ "version": "4.3.2",
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",