pyre-agent-kit 4.0.2 → 4.0.4
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 +8 -0
- package/dist/defaults.js +6 -0
- package/dist/index.js +5 -0
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -135,6 +135,7 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
|
|
|
135
135
|
(.) $ - show support.
|
|
136
136
|
(@) @address - look up an agent.
|
|
137
137
|
(%) ";" - create a new faction. ; = creative name.
|
|
138
|
+
(_) - do nothing. make a move on the next turn.
|
|
138
139
|
- REPLACE $ with a FID from the table (always ends in pw).
|
|
139
140
|
- REPLACE * with your message, always in double quotes.
|
|
140
141
|
--- RULES:
|
|
@@ -160,6 +161,7 @@ any FACTIONS - (!), (.), (%), (@)
|
|
|
160
161
|
- If (FNR=true,MBR=false), consider (+), otherwise if (FNR=true,MBR=true) consider (&). promote with (!).
|
|
161
162
|
- FACTIONS where MBR=true ARE your identity. Promote what you hold. Attack what you don't.${factionCtx.all.length <= 2 ? '\n- Few factions active — consider (%).' : ''}
|
|
162
163
|
- (-) to lock in profits or cut losers. Don't stay in underperformers.
|
|
164
|
+
- (_) to skip this turn if you are comfortable with your current positions and have nothing to say.
|
|
163
165
|
---
|
|
164
166
|
Output EXACTLY one line: (action) $ "*"
|
|
165
167
|
example format: ${(0, util_1.pick)([
|
|
@@ -292,6 +294,7 @@ ${factionRows.length > 0 ? factionRows.join('\n') : 'none'}
|
|
|
292
294
|
(^) $ - ascend. unlock treasury.
|
|
293
295
|
(~) $ - harvest fees.
|
|
294
296
|
(%) ";" - create a new faction. ; = creative name.
|
|
297
|
+
(_) - do nothing. make a move on the next turn.
|
|
295
298
|
- REPLACE $ with a FID from the table (always ends in pw).
|
|
296
299
|
- REPLACE * with a ONE sentence RESPONSE, always in double quotes.
|
|
297
300
|
--- RULES:
|
|
@@ -311,6 +314,7 @@ any FACTIONS - (!), (.), (%), (@)
|
|
|
311
314
|
- (!) FACTIONS where MBR=true and SENT is bullish to promote.
|
|
312
315
|
- (#) FACTIONS where MBR=true and SENT is bearish to fud. Or (!) to rally.
|
|
313
316
|
- (-) to lock in profits or downsize on underperforming factions.
|
|
317
|
+
- (_) to skip this turn if you are comfortable with your current positions and have nothing to say.
|
|
314
318
|
---
|
|
315
319
|
Output EXACTLY one line: (action) $ "*"
|
|
316
320
|
example format: ${(0, util_1.pick)([
|
|
@@ -409,6 +413,10 @@ function parseLLMDecision(raw, factions, kit, agent, holdings, solRange) {
|
|
|
409
413
|
let lastRejection = null;
|
|
410
414
|
for (const candidate of lines) {
|
|
411
415
|
const line = candidate.trim();
|
|
416
|
+
// Explicit hold/skip — do nothing this turn
|
|
417
|
+
if (/^\(?_\)?(\s.*)?$|^HOLD$/i.test(line)) {
|
|
418
|
+
return { action: 'hold', reasoning: 'hold — skip turn' };
|
|
419
|
+
}
|
|
412
420
|
const scoutMatch = line.match(/^SCOUT\s+@?([A-Za-z0-9]{6,44})/i);
|
|
413
421
|
if (scoutMatch) {
|
|
414
422
|
return { action: 'scout', faction: scoutMatch[1], reasoning: line };
|
package/dist/defaults.js
CHANGED
|
@@ -222,6 +222,12 @@ exports.ACTION_MAP = {
|
|
|
222
222
|
'(<)': 'REPAY_LOAN',
|
|
223
223
|
'(.)': 'RALLY',
|
|
224
224
|
'(@)': 'SCOUT',
|
|
225
|
+
'(_)': 'HOLD',
|
|
226
|
+
HOLD: 'HOLD',
|
|
227
|
+
SKIP: 'HOLD',
|
|
228
|
+
PASS: 'HOLD',
|
|
229
|
+
WAIT: 'HOLD',
|
|
230
|
+
NOTHING: 'HOLD',
|
|
225
231
|
};
|
|
226
232
|
// Stronghold defaults
|
|
227
233
|
exports.STRONGHOLD_FUND_SOL = 35;
|
package/dist/index.js
CHANGED
|
@@ -226,6 +226,11 @@ async function createPyreAgent(config) {
|
|
|
226
226
|
(0, action_1.sentimentBuySize)(state.personality, kit.state.getSentiment(target.mint), solRange) * 1.5;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
+
// Hold — intentional no-op
|
|
230
|
+
if (decision.action === 'hold') {
|
|
231
|
+
logger(`[${state.publicKey.slice(0, 8)}] [HOLD] skip turn`);
|
|
232
|
+
return { action: 'hold', success: true, reasoning: decision.reasoning, usedLLM };
|
|
233
|
+
}
|
|
229
234
|
// Execute through kit
|
|
230
235
|
const result = await (0, executor_1.executeAction)(kit, state, activeFactions, decision, usedLLM ? 'LLM' : 'RNG', logger, maxFoundedFactions, usedFactionNames, llm);
|
|
231
236
|
// Record message to prevent repetition
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Keypair } from '@solana/web3.js';
|
|
2
2
|
import type { PyreKit } from 'pyre-world-kit';
|
|
3
3
|
export type Personality = 'loyalist' | 'mercenary' | 'provocateur' | 'scout' | 'whale';
|
|
4
|
-
export type Action = 'join' | 'defect' | 'rally' | 'launch' | 'message' | 'reinforce' | 'war_loan' | 'repay_loan' | 'siege' | 'ascend' | 'raze' | 'tithe' | 'infiltrate' | 'fud' | 'scout';
|
|
4
|
+
export type Action = 'join' | 'defect' | 'rally' | 'launch' | 'message' | 'reinforce' | 'war_loan' | 'repay_loan' | 'siege' | 'ascend' | 'raze' | 'tithe' | 'infiltrate' | 'fud' | 'scout' | 'hold';
|
|
5
5
|
export interface LLMDecision {
|
|
6
6
|
action: Action;
|
|
7
7
|
faction?: string;
|