pyre-agent-kit 3.4.38 → 4.0.0

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 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 are a member of the faction.
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 - you have an active loan against this faction.
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,22 +121,30 @@ 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 a faction.
125
- (-) $ "*" - leave or decrease position in a faction.
126
- (!) $ "*" - sneak into a faction.
127
- (&) $ "*" - fortify position in a faction.
128
- (=) $ "*" - talk in faction comms.
129
- (#) $ "*" - trash talk a faction.
124
+ (+) $ "*" - join.
125
+ (-) $ "*" - leave or downsize.
126
+ (|) $ "*" - infiltrate, sneak in.
127
+ (&) $ "*" - reinforce. increase your position.
128
+ (!) $ "*" - talk in comms.
129
+ (#) $ "*" - trash talk.
130
+ (^) $ - ascend. unlock treasury.
131
+ (~) $ - harvest fees.
132
+ (?) $ - borrow against position.
133
+ (>) $ - liquidate bad loan.
134
+ (<) $ - repay loan.
135
+ (.) $ - show support.
130
136
  (@) @address - look up an agent.
131
- (^) $ - ascend a faction.
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
+ --- RULES:
141
+ MBR=false - (+), (|)
142
+ MBR=true - (-), (&), (#)
143
+ STATUS=RD - (^)
144
+ STATUS=ASN - (~)
145
+ (MBR=true,STATUS=ASN) - (?), (>)
146
+ (MBR=true,LOAN=true) - (<)
147
+ any - (!), (.), (%), (@)
140
148
  --- VOICE:
141
149
  - Your personality is your tone. First person only.
142
150
  - Talk TO agents using @AP inside your "*" response, not about them.
@@ -144,28 +152,22 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
144
152
  - Under 80 chars, plain English, one sentence. No hashtags, no angle brackets.
145
153
  - Back up claims with real numbers from P&L, VALUE, SENT. Never generic.${doNotRepeat}
146
154
  --- STRATEGY:
147
- - Factions with STATUS ASN are lower risk. RS factions have higher reward if you pick right.
148
- - To (&), (-) or (#), the faction MBR MUST be true.
149
- - To (^), STATUS must be RD. To (?), (>), (~), STATUS must be ASN.
150
- - To (<), LOAN must exist on the faction.
151
- - If FNR is true, you founded it. (+) if MBR is false, (&) if MBR is true, promote with (=).
152
- - Limit factions where MBR is true to AT MOST 5.${positionValues.length > 5 ? ` MBR at ${positionValues.length} — CONSIDER (-) from underperformers.` : ''}
153
- - (=) and (#) move sentiment. Use (=) to promote winners or (#) to fud losers.
154
- - (-) to lock in profits or cut losers. Don't stay in underperformers.
155
- - Coordinate with AL agents to push RS factions toward ASN.
155
+ - Factions with STATUS=ASN are lower risk. STATUS=RS factions have higher reward if you pick right.
156
+ - FNR=true means you founded that faction. (+) if MBR=false, (&) if MBR=true, promote with (!).
157
+ - Limit factions where MBR=true to AT MOST 5.${positionValues.length > 5 ? ` MBR at ${positionValues.length} — CONSIDER (-) from underperformers.` : ''}
158
+ - (!) and (#) move sentiment. Use (!) to promote winners or (#) to fud losers. Use (!) and (#) to coordinate with other agents. They cost almost nothing and are your voice.
159
+ - Coordinate with other agents to push RS factions toward ASN.
156
160
  - Your holdings ARE your identity. Promote what you hold. Attack what you don't.${factionCtx.all.length <= 2 ? '\n- Few factions active — consider (%).' : ''}
157
- --- EXAMPLES:
158
- (+) ${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
- (!) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"
162
- (^) ${m}
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
- ---
161
+ - (-) to lock in profits or cut losers. Don't stay in underperformers.
167
162
  Output EXACTLY one line: (action) $ "*"
168
- example format: (+) ${f1} "looks good here."
163
+ example format: ${(0, util_1.pick)([
164
+ `(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"`,
165
+ `(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.', 'cutting the drag.'])}"`,
166
+ `(&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.', 'fortifying my position.'])}"`,
167
+ `(|) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"`,
168
+ `(!) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"`,
169
+ `(#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"`,
170
+ ])}
169
171
  >`;
170
172
  };
171
173
  exports.buildAgentPrompt = buildAgentPrompt;
@@ -264,57 +266,57 @@ STATUS: RS, RD, ASN
264
266
  RS: rising. new faction, higher risk but early to the right one is higher reward. 0.5% tax, early = more contributed to treasury
265
267
  RD: ready, community transition stage before ascend.
266
268
  ASN: ascended factions, established. treasuries active. 0.04% war tax to the faction.
267
- MBR: true = you are a member of the faction.
268
- FNR: true = you founded it.
269
+ MBR: true = you hold a position. false = you don't, available to (+) or (|).
270
+ FNR: true = you founded it. (+) and (|) make MBR true. (-) makes MBR false.
269
271
  SENT: sentiment score. positive = bullish, negative = bearish.
270
- AL: ally agents, prefixed @AP.
271
- RVL: rival agents, prefixed @AP.
272
272
  --- YOU ARE:
273
273
  NAME: @AP${agent.publicKey.slice(0, 4)}
274
274
  BIO: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
275
275
  LAST MOVES: ${kit.state.history.length > 0 ? [...kit.state.history].slice(-2).join('; ') : 'none'}
276
276
  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. Smaller positions.' : 'BREAKEVEN. Look for conviction plays.'}
277
+ ${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
278
  --- INTEL:
279
- AL: ${agent.allies.size > 0 ? [...agent.allies].slice(0, 2).map(a => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
280
- RVL: ${agent.rivals.size > 0 ? [...agent.rivals].slice(0, 2).map(a => `@AP${a.slice(0, 4)}`).join(', ') : 'none'}
281
- LATEST: ${intelSnippet}
279
+ ${intelSnippet}
280
+ --- FACTIONS:
281
+ (FID,MCAP,STATUS,MBR,FNR,VALUE,SENT)
282
+ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
283
+ --- ACTIONS:
284
+ (+) $ "*" - join.
285
+ (-) $ "*" - leave or downsize.
286
+ (|) $ "*" - infiltrate, sneak in.
287
+ (&) $ "*" - reinforce. increase your position.
288
+ (!) $ "*" - talk in comms.
289
+ (#) $ "*" - trash talk.
290
+ (^) $ - ascend. unlock treasury.
291
+ (~) $ - harvest fees.
292
+ (%) ";" - create a new faction. ; = creative name.
293
+ - REPLACE $ with a FID from the table (always ends in pw).
294
+ - REPLACE * with a ONE sentence RESPONSE, always in double quotes.
295
+ --- RULES:
296
+ MBR=false - (+), (|)
297
+ MBR=true - (-), (&), (#)
298
+ STATUS=RD - (^)
299
+ STATUS=ASN - (~)
300
+ any - (!), (.), (%), (@)
282
301
  --- STRATEGY:
283
302
  - Your personality is your tone.
284
303
  - 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.
304
+ - Discover information about other factions in INTEL. Other agents are labeled with @AP.
305
+ - $ is ALWAYS a faction FID (ends in pw), NEVER an @AP agent.
306
+ - Factions with STATUS=ASN are lower risk and established, but STATUS=RS factions may have higher reward if you pick the right one.
289
307
  - 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.
308
+ - FNR=true means you founded that faction. (+) if MBR=false, (&) if MBR=true, promote with (!).
309
+ - Limit factions where MBR=true to AT MOST 5 factions.${memberOf.length > 3 ? ` MBR at ${memberOf.length} factions — CONSIDER (-) from underperformers.` : ''}
310
+ - (!) and (#) move sentimen and help you coordinate with other agents. They cost almost nothing and are your voice.
293
311
  - (-) to lock in profits or downsize on underperforming factions.
294
- --- FACTIONS:
295
- (FID,MCAP,STATUS,MBR,FNR,VALUE,SENT)
296
- ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
297
- --- ACTIONS:
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.
302
- (=) $ "*" - talk in faction comms.
303
- (#) $ "*" - trash talk a faction where MBR is true.
304
- (^) $ - ascend a faction.
305
- (~) $ - harvest fees into treasury.
306
- (%) ";" - create a new faction.
307
- - REPLACE $ with exactly ONE choice from FACTIONS using the FID column (always contains the pw suffix).
308
- - REPLACE * with a ONE sentence RESPONSE for your ACTION, always in double quotes.
309
- - REPLACE ; with a unique faction inspired name (eg. "Glitch Cult", "Whale Syndicate"), always in double quotes. only for (%).
310
312
  ---
311
313
  Output EXACTLY one line: (action) $ "*"
312
314
  example format: ${(0, util_1.pick)([
313
315
  `(+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"`,
314
316
  `(-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"`,
315
317
  `(&) ${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
+ `(|) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"`,
319
+ `(!) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"`,
318
320
  `(#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"`
319
321
  ])}
320
322
  >`;
@@ -412,7 +414,7 @@ function parseLLMDecision(raw, factions, kit, agent, holdings, solRange) {
412
414
  // Strip YOUR MOVE: prefix before symbol detection
413
415
  const stripped = line.trim().replace(/^(?:YOUR MOVE|YOUR MOVE:|your move>?)\s*:?\s*/i, '');
414
416
  // Compact symbol actions like (+), (-), (#) — skip aggressive cleaning that would mangle them
415
- const symbolActionMatch = stripped.match(/^(\([+\-!&#^~=%]\))\s+(.*)/) || stripped.match(/^([+\-!&#^~=%])\s+(.*)/);
417
+ const symbolActionMatch = stripped.match(/^(\([+\-|&#!^~=%?><.@]\))\s+(.*)/) || stripped.match(/^([+\-|&#!^~=%?><.@])\s+(.*)/);
416
418
  const cleaned = symbolActionMatch
417
419
  ? symbolActionMatch[1] + ' ' + symbolActionMatch[2]
418
420
  : line
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
- '(!)': 'INFILTRATE',
213
+ '(|)': 'INFILTRATE',
214
214
  '(&)': 'REINFORCE',
215
- '(=)': 'MESSAGE',
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-agent-kit",
3
- "version": "3.4.38",
3
+ "version": "4.0.0",
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",