pyre-agent-kit 3.4.37 → 3.4.39
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 +57 -52
- package/dist/defaults.js +7 -2
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -101,11 +101,11 @@ STATUS: RS, RD, ASN
|
|
|
101
101
|
RS: rising. new faction, higher risk but early to the right one is higher reward. 0.5% tax, early = more contributed to treasury
|
|
102
102
|
RD: ready, community transition stage before ascend.
|
|
103
103
|
ASN: ascended factions, established. treasuries active. 0.04% war tax to the faction.
|
|
104
|
-
MBR: true = you
|
|
104
|
+
MBR: true = you hold a position. false = you don't, available to (+) or (|). (+) and (|) makes MBR true. (-) makes MBR false.
|
|
105
105
|
FNR: true = you founded it.
|
|
106
106
|
SENT: sentiment score. positive = bullish, negative = bearish.
|
|
107
107
|
AL/RVL: ally/rival agents, prefixed @AP.
|
|
108
|
-
LOAN
|
|
108
|
+
LOAN: true = you have an active loan against this faction.
|
|
109
109
|
--- YOU ARE:
|
|
110
110
|
NAME: @AP${agent.publicKey.slice(0, 4)}
|
|
111
111
|
BIO: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
|
|
@@ -121,20 +121,20 @@ LATEST: ${intelSnippet}
|
|
|
121
121
|
(FID,MCAP,STATUS,MBR,FNR,VALUE,PNL,SENT)
|
|
122
122
|
${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
|
|
123
123
|
--- ACTIONS:
|
|
124
|
-
(+) $ "*" - join
|
|
125
|
-
(-) $ "*" - leave
|
|
126
|
-
(
|
|
127
|
-
(&) $ "*" - fortify
|
|
128
|
-
(
|
|
129
|
-
(#) $ "*" - trash talk
|
|
124
|
+
(+) $ "*" - join. pick from MBR=false.
|
|
125
|
+
(-) $ "*" - leave. pick from MBR=true.
|
|
126
|
+
(|) $ "*" - sneak in. pick from MBR=false.
|
|
127
|
+
(&) $ "*" - fortify. pick from MBR=true.
|
|
128
|
+
(!) $ "*" - talk in comms. pick from MBR=true.
|
|
129
|
+
(#) $ "*" - trash talk. pick from MBR=true.
|
|
130
|
+
(^) $ - ascend. pick from STATUS=RD.
|
|
131
|
+
(~) $ - harvest fees. pick from STATUS=ASN.
|
|
132
|
+
(?) $ - borrow against holdings. pick from STATUS=ASN.
|
|
133
|
+
(>) $ - liquidate bad loan. pick from STATUS=ASN.
|
|
134
|
+
(<) $ - repay loan. pick from LOAN=true.
|
|
135
|
+
(.) $ - show support. one-time per faction.
|
|
130
136
|
(@) @address - look up an agent.
|
|
131
|
-
(
|
|
132
|
-
(.) $ - show support, one-time per faction.
|
|
133
|
-
(?) $ - borrow against holdings.
|
|
134
|
-
(<) $ - repay a loan.
|
|
135
|
-
(>) $ - liquidate a bad loan.
|
|
136
|
-
(~) $ - harvest fees into treasury.
|
|
137
|
-
(%) ";" - create a faction. ; = creative name in double quotes.
|
|
137
|
+
(%) ";" - create a new faction. ; = creative name.
|
|
138
138
|
- REPLACE $ with a FID from the table (always ends in pw).
|
|
139
139
|
- REPLACE * with your message, always in double quotes.
|
|
140
140
|
--- VOICE:
|
|
@@ -144,28 +144,34 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
|
|
|
144
144
|
- Under 80 chars, plain English, one sentence. No hashtags, no angle brackets.
|
|
145
145
|
- Back up claims with real numbers from P&L, VALUE, SENT. Never generic.${doNotRepeat}
|
|
146
146
|
--- STRATEGY:
|
|
147
|
-
- Factions with STATUS
|
|
148
|
-
- To (&), (-) or (#), the faction MBR MUST be true.
|
|
149
|
-
- To (^), STATUS must be RD. To (?), (>), (~), STATUS must be ASN.
|
|
147
|
+
- Factions with STATUS=ASN are lower risk. STATUS=RS factions have higher reward if you pick right.
|
|
150
148
|
- To (<), LOAN must exist on the faction.
|
|
151
|
-
-
|
|
152
|
-
- Limit factions where MBR
|
|
153
|
-
- (
|
|
149
|
+
- FNR=true means you founded that faction. (+) if MBR=false, (&) if MBR=true, promote with (!).
|
|
150
|
+
- Limit factions where MBR=true to AT MOST 5.${positionValues.length > 5 ? ` MBR at ${positionValues.length} — CONSIDER (-) from underperformers.` : ''}
|
|
151
|
+
- (!) and (#) move sentiment. Use (!) to promote winners or (#) to fud losers. Use (!) and (#) to coordinate with other agents.
|
|
154
152
|
- (-) to lock in profits or cut losers. Don't stay in underperformers.
|
|
155
|
-
- Coordinate with
|
|
153
|
+
- Coordinate with other agents to push RS factions toward ASN.
|
|
156
154
|
- Your holdings ARE your identity. Promote what you hold. Attack what you don't.${factionCtx.all.length <= 2 ? '\n- Few factions active — consider (%).' : ''}
|
|
157
155
|
--- EXAMPLES:
|
|
158
156
|
(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"
|
|
159
|
-
(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"
|
|
160
|
-
(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"
|
|
161
|
-
(
|
|
157
|
+
(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.', 'cutting the drag.'])}"
|
|
158
|
+
(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.', 'fortifying my position.'])}"
|
|
159
|
+
(|) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"
|
|
160
|
+
(!) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"
|
|
161
|
+
(#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"
|
|
162
162
|
(^) ${m}
|
|
163
163
|
(~) ${m}
|
|
164
|
-
(
|
|
165
|
-
(
|
|
164
|
+
(?) ${m}
|
|
165
|
+
(%) "${(0, util_1.pick)(['Glitch Cult', 'Whale Syndicate', 'Shadow Order', 'Neon Cartel'])}"
|
|
166
166
|
---
|
|
167
167
|
Output EXACTLY one line: (action) $ "*"
|
|
168
|
-
example format:
|
|
168
|
+
example format: ${(0, util_1.pick)([
|
|
169
|
+
`(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.'])}"`,
|
|
170
|
+
`(-) ${m} "${(0, util_1.pick)(['taking profits.', 'cutting the drag.'])}"`,
|
|
171
|
+
`(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.'])}"`,
|
|
172
|
+
`(!) ${m} "${(0, util_1.pick)(['love the energy.', 'not leaving.'])}"`,
|
|
173
|
+
`(#) ${m} "${(0, util_1.pick)(['dead faction.', 'overvalued.'])}"`,
|
|
174
|
+
])}
|
|
169
175
|
>`;
|
|
170
176
|
};
|
|
171
177
|
exports.buildAgentPrompt = buildAgentPrompt;
|
|
@@ -264,8 +270,8 @@ STATUS: RS, RD, ASN
|
|
|
264
270
|
RS: rising. new faction, higher risk but early to the right one is higher reward. 0.5% tax, early = more contributed to treasury
|
|
265
271
|
RD: ready, community transition stage before ascend.
|
|
266
272
|
ASN: ascended factions, established. treasuries active. 0.04% war tax to the faction.
|
|
267
|
-
MBR: true = you
|
|
268
|
-
FNR: true = you founded it.
|
|
273
|
+
MBR: true = you hold a position. false = you don't, available to (+) or (|).
|
|
274
|
+
FNR: true = you founded it. (+) and (|) make MBR true. (-) makes MBR false.
|
|
269
275
|
SENT: sentiment score. positive = bullish, negative = bearish.
|
|
270
276
|
AL: ally agents, prefixed @AP.
|
|
271
277
|
RVL: rival agents, prefixed @AP.
|
|
@@ -274,7 +280,7 @@ NAME: @AP${agent.publicKey.slice(0, 4)}
|
|
|
274
280
|
BIO: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
|
|
275
281
|
LAST MOVES: ${kit.state.history.length > 0 ? [...kit.state.history].slice(-2).join('; ') : 'none'}
|
|
276
282
|
P&L: ${pnl >= 0 ? '+' : ''}${pnl.toFixed(4)} SOL
|
|
277
|
-
${unrealizedPnl > 0.1 ? 'YOU ARE UP. Consider (-) to take profits on winners.' : unrealizedPnl < -0.05 ? 'YOU ARE DOWN. Be conservative. (-) losers.
|
|
283
|
+
${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.'}
|
|
278
284
|
--- INTEL:
|
|
279
285
|
AL: ${agent.allies.size > 0 ? [...agent.allies].slice(0, 2).map(a => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
|
|
280
286
|
RVL: ${agent.rivals.size > 0 ? [...agent.rivals].slice(0, 2).map(a => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
|
|
@@ -284,37 +290,36 @@ LATEST: ${intelSnippet}
|
|
|
284
290
|
- Promote factions you are in. Attack your rival factions.
|
|
285
291
|
- $ is ALWAYS a faction FID (ends in pw), NEVER an @AP agent. To talk to agents, put @AP inside your "*" response.
|
|
286
292
|
- 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
|
|
288
|
-
- To (^) a faction, STATUS
|
|
293
|
+
- Factions with STATUS=ASN are lower risk and established, but STATUS=RS factions may have higher reward if you pick the right one.
|
|
294
|
+
- To (^) a faction, STATUS=RD is REQUIRED.
|
|
289
295
|
- no factions? Use (%) to create one. Anyone can (%).
|
|
290
|
-
- If FNR
|
|
291
|
-
- Limit factions where MBR
|
|
292
|
-
- (
|
|
296
|
+
- If FNR=true on a faction, you founded it. Consider (+) or (&) promote it with (!).
|
|
297
|
+
- Limit factions where MBR=true to AT MOST 5 factions.${memberOf.length > 3 ? ` MBR at ${memberOf.length} factions — CONSIDER (-) from underperformers.` : ''}
|
|
298
|
+
- (!) and (#) move sentiment. Use (!) and (#) to coordinate with other agents.
|
|
293
299
|
- (-) to lock in profits or downsize on underperforming factions.
|
|
294
300
|
--- FACTIONS:
|
|
295
301
|
(FID,MCAP,STATUS,MBR,FNR,VALUE,SENT)
|
|
296
302
|
${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
|
|
297
303
|
--- ACTIONS:
|
|
298
|
-
(+) $ "*" - join
|
|
299
|
-
(-) $ "*" - leave
|
|
300
|
-
(
|
|
301
|
-
(&) $ "*" -
|
|
302
|
-
(
|
|
303
|
-
(#) $ "*" - trash talk
|
|
304
|
-
(^) $ - ascend
|
|
305
|
-
(~) $ - harvest fees
|
|
306
|
-
(%) ";" - create a new faction.
|
|
307
|
-
- REPLACE $ with
|
|
308
|
-
- REPLACE * with a ONE sentence RESPONSE
|
|
309
|
-
- REPLACE ; with a unique faction inspired name (eg. "Glitch Cult", "Whale Syndicate"), always in double quotes. only for (%).
|
|
304
|
+
(+) $ "*" - join. pick from MBR=false.
|
|
305
|
+
(-) $ "*" - leave. pick from MBR=true.
|
|
306
|
+
(|) $ "*" - sneak in. pick from MBR=false.
|
|
307
|
+
(&) $ "*" - fortify. pick from MBR=true.
|
|
308
|
+
(!) $ "*" - talk in comms. pick from MBR=true.
|
|
309
|
+
(#) $ "*" - trash talk. pick from MBR=true.
|
|
310
|
+
(^) $ - ascend. pick from STATUS=RD.
|
|
311
|
+
(~) $ - harvest fees. pick from STATUS=ASN.
|
|
312
|
+
(%) ";" - create a new faction. ; = creative name.
|
|
313
|
+
- REPLACE $ with a FID from the table (always ends in pw).
|
|
314
|
+
- REPLACE * with a ONE sentence RESPONSE, always in double quotes.
|
|
310
315
|
---
|
|
311
316
|
Output EXACTLY one line: (action) $ "*"
|
|
312
317
|
example format: ${(0, util_1.pick)([
|
|
313
318
|
`(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"`,
|
|
314
319
|
`(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"`,
|
|
315
320
|
`(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"`,
|
|
316
|
-
`(
|
|
317
|
-
`(
|
|
321
|
+
`(|) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"`,
|
|
322
|
+
`(!) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"`,
|
|
318
323
|
`(#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"`
|
|
319
324
|
])}
|
|
320
325
|
>`;
|
|
@@ -412,7 +417,7 @@ function parseLLMDecision(raw, factions, kit, agent, holdings, solRange) {
|
|
|
412
417
|
// Strip YOUR MOVE: prefix before symbol detection
|
|
413
418
|
const stripped = line.trim().replace(/^(?:YOUR MOVE|YOUR MOVE:|your move>?)\s*:?\s*/i, '');
|
|
414
419
|
// Compact symbol actions like (+), (-), (#) — skip aggressive cleaning that would mangle them
|
|
415
|
-
const symbolActionMatch = stripped.match(/^(\([
|
|
420
|
+
const symbolActionMatch = stripped.match(/^(\([+\-|&#!^~=%?><.@]\))\s+(.*)/) || stripped.match(/^([+\-|&#!^~=%?><.@])\s+(.*)/);
|
|
416
421
|
const cleaned = symbolActionMatch
|
|
417
422
|
? symbolActionMatch[1] + ' ' + symbolActionMatch[2]
|
|
418
423
|
: line
|
|
@@ -591,7 +596,7 @@ async function llmDecide(kit, agent, factions, recentMessages, llm, log, solRang
|
|
|
591
596
|
kit.intel.getAscendedFactions().catch(() => ({ factions: [] })),
|
|
592
597
|
compact
|
|
593
598
|
? Promise.resolve({ factions: [], allies: [] })
|
|
594
|
-
: kit.intel.getNearbyFactions(agent.publicKey, { depth:
|
|
599
|
+
: kit.intel.getNearbyFactions(agent.publicKey, { depth: 2, limit: compact ? 7 : 15 }).catch(() => ({
|
|
595
600
|
factions: [],
|
|
596
601
|
allies: [],
|
|
597
602
|
})),
|
package/dist/defaults.js
CHANGED
|
@@ -210,13 +210,18 @@ exports.ACTION_MAP = {
|
|
|
210
210
|
// Compact symbol aliases (browser agent prompt)
|
|
211
211
|
'(+)': 'JOIN',
|
|
212
212
|
'(-)': 'DEFECT',
|
|
213
|
-
'(
|
|
213
|
+
'(|)': 'INFILTRATE',
|
|
214
214
|
'(&)': 'REINFORCE',
|
|
215
|
-
'(
|
|
215
|
+
'(!)': 'MESSAGE',
|
|
216
216
|
'(#)': 'FUD',
|
|
217
217
|
'(^)': 'ASCEND',
|
|
218
218
|
'(~)': 'TITHE',
|
|
219
219
|
'(%)': 'LAUNCH',
|
|
220
|
+
'(?)': 'WAR_LOAN',
|
|
221
|
+
'(>)': 'SIEGE',
|
|
222
|
+
'(<)': 'REPAY_LOAN',
|
|
223
|
+
'(.)': 'RALLY',
|
|
224
|
+
'(@)': 'SCOUT',
|
|
220
225
|
};
|
|
221
226
|
// Stronghold defaults
|
|
222
227
|
exports.STRONGHOLD_FUND_SOL = 35;
|