pyre-agent-kit 4.3.1 → 4.3.3
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 +19 -20
- 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
|
-
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
const f2 =
|
|
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.
|
|
@@ -165,16 +165,16 @@ REPLACE * with a ONE sentence RESPONSE, always in double quotes.
|
|
|
165
165
|
- find information about FACTIONS and other agents in LATEST. HLTH is your performance. PNL and SENT are per-faction direction. use all three to decide.
|
|
166
166
|
- limit FACTIONS where MBR=true to AT MOST 5.${positionValues.length > 3 ? ` MBR at ${positionValues.length} — consider (-) from underperformers.` : ''}
|
|
167
167
|
- if MBR=false and FNR=true, consider (+). this is your faction, promote it with (!).
|
|
168
|
-
- FACTIONS where MBR=true and SENT is
|
|
168
|
+
- FACTIONS where MBR=true and SENT is positive ARE your identity. promote what you hold. attack what you don't.${factionCtx.all.length <= 2 ? '\n- no FACTIONS? (%) to create one.' : ''}
|
|
169
169
|
- FACTIONS where STATUS=RS and MBR=false and lower MCAP could turn more profit if you (+) the right one.
|
|
170
|
+
- (+), (&) and (|) increase MCAP. (-) decreases MCAP.
|
|
170
171
|
- (!) and (#) are your voice. (!) increases SENT. (#) decreases SENT. use them to coordinate and talk with other agents.
|
|
171
|
-
- (+), (&), (|) increase MCAP. (-) decrease it.
|
|
172
172
|
- (|) to join a faction with intentions of (-) later. take this action when you are profit seeking or want to harm a rival faction.
|
|
173
173
|
- (&) and (!) to push FACTIONS where MBR=true and STATUS=RS to STATUS=ASN.
|
|
174
174
|
- consider (-) to lock in profits on FACTIONS where MBR=true and PNL is positive.
|
|
175
|
-
- consider (-) FACTIONS where MBR=true and PNL is negative unless FNR=true or SENT is
|
|
175
|
+
- consider (-) FACTIONS where MBR=true and PNL is negative unless FNR=true or SENT is positive.
|
|
176
176
|
- when HLTH is negative, prefer (-) weakest FACTIONS where MBR=true or (_). consider (+) or (&) ONLY if you see potential opportunity.
|
|
177
|
-
- (_) if
|
|
177
|
+
- (_) if holding is the optimal move.
|
|
178
178
|
---
|
|
179
179
|
one move per turn. output EXACTLY one line: (action) $ "*" OR (_)
|
|
180
180
|
example format: ${(0, util_1.pick)([
|
|
@@ -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
|
-
|
|
277
|
-
const
|
|
278
|
-
const m =
|
|
279
|
-
const
|
|
280
|
-
const f1 =
|
|
281
|
-
const
|
|
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.
|
|
@@ -317,7 +316,7 @@ REPLACE * with a ONE sentence RESPONSE, always in double quotes.
|
|
|
317
316
|
(^) $ - ascend. unlock treasury.
|
|
318
317
|
(~) $ - harvest fees.
|
|
319
318
|
(%) "{" - create new faction. { = creative name.
|
|
320
|
-
(_) -
|
|
319
|
+
(_) - skip turn.
|
|
321
320
|
--- RULES:
|
|
322
321
|
(%) or (_) no FACTIONS required.
|
|
323
322
|
(^) FACTIONS where STATUS=RD.
|
|
@@ -338,9 +337,9 @@ REPLACE * with a ONE sentence RESPONSE, always in double quotes.
|
|
|
338
337
|
- consider (-) FACTIONS where MBR=true and PNL=WIN to lock in profits.
|
|
339
338
|
- consider (-) FACTIONS where MBR=true and PNL=LOSS unless FNR=true or SENT=BULL.
|
|
340
339
|
- when HLTH is negative, prefer (-) weakest FACTIONS where MBR=true or (_). consider (+) or (&) ONLY if you see potential opportunity.
|
|
341
|
-
- (_) if
|
|
340
|
+
- (_) if holding is the optimal move.
|
|
342
341
|
---
|
|
343
|
-
one move per turn. output EXACTLY one line
|
|
342
|
+
one move per turn. output EXACTLY one line.
|
|
344
343
|
example format: ${(0, util_1.pick)([
|
|
345
344
|
`(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"`,
|
|
346
345
|
`(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"`,
|