pyre-agent-kit 3.4.32 → 3.4.33
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 +5 -4
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -75,7 +75,7 @@ const buildAgentPrompt = (kit, agent, factionCtx, intelSnippet, recentMessages,
|
|
|
75
75
|
seenMints.add(f.mint);
|
|
76
76
|
const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
|
|
77
77
|
const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
|
|
78
|
-
factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | false | false | 0 | 0 | ${sent > 0 ? '+' : ''}${sent}`);
|
|
78
|
+
factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | false | false | 0 | 0 | ${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10}`);
|
|
79
79
|
}
|
|
80
80
|
const validatedFactions = [...ascended, ...ready, ...rising, ...nearby, ...unexplored];
|
|
81
81
|
const doNotRepeat = recentMessages.length > 0
|
|
@@ -182,7 +182,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
|
|
|
182
182
|
const pnl = (gameState.totalSolReceived - gameState.totalSolSpent) / 1e9;
|
|
183
183
|
const founded = gameState.founded.slice(0, 2).map((m) => m.slice(-8));
|
|
184
184
|
const heldMints = new Set(holdingsEntries.map(([m]) => m));
|
|
185
|
-
const memberOf = valued.
|
|
185
|
+
const memberOf = valued.map((v) => v.id);
|
|
186
186
|
const sentimentList = [...kit.state.sentimentMap]
|
|
187
187
|
.filter(([mint]) => heldMints.has(mint))
|
|
188
188
|
.map(([mint, score]) => {
|
|
@@ -222,7 +222,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
|
|
|
222
222
|
const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
|
|
223
223
|
const fnr = foundedSet.has(f.mint);
|
|
224
224
|
const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
|
|
225
|
-
factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | true | ${fnr} | ${v.valueSol.toFixed(4)} | ${sent > 0 ? '+' : ''}${sent}`);
|
|
225
|
+
factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | true | ${fnr} | ${v.valueSol.toFixed(4)} | ${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10}`);
|
|
226
226
|
}
|
|
227
227
|
// Non-member factions
|
|
228
228
|
const nonMember = factionCtx.all.filter(f => !seenMints.has(f.mint) && f.status !== 'razed');
|
|
@@ -239,7 +239,7 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
|
|
|
239
239
|
seenMints.add(f.mint);
|
|
240
240
|
const mcap = f.market_cap_sol ? `${f.market_cap_sol.toFixed(2)}` : '?';
|
|
241
241
|
const sent = kit.state.sentimentMap.get(f.mint) ?? 0;
|
|
242
|
-
factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | false | false | 0 | ${sent > 0 ? '+' : ''}${sent}`);
|
|
242
|
+
factionRows.push(`${f.mint.slice(-8)} | ${mcap} | ${statusTag(f)} | false | false | 0 | ${sent > 0 ? '+' : ''}${Math.round(sent * 10) / 10}`);
|
|
243
243
|
}
|
|
244
244
|
const validatedFactions = [...ascended, ...ready, ...rising, ...nearby, ...unexplored];
|
|
245
245
|
const mMint2 = [...heldMints][0] || (validatedFactions.length > 0 ? (0, util_1.pick)(validatedFactions).mint : null);
|
|
@@ -667,6 +667,7 @@ async function llmDecide(kit, agent, factions, recentMessages, llm, log, solRang
|
|
|
667
667
|
}
|
|
668
668
|
const buildPrompt = compact ? exports.buildCompactModelPrompt : exports.buildAgentPrompt;
|
|
669
669
|
const prompt = buildPrompt(kit, agent, factionCtx, intelSnippet + scoutSnippet, recentMessages, solRange, holdings);
|
|
670
|
+
console.log(`\n[pyre] === PROMPT ===\n${prompt}\n[pyre] === END PROMPT ===\n`);
|
|
670
671
|
const raw = await llm.generate(prompt);
|
|
671
672
|
if (!raw) {
|
|
672
673
|
log(`[${agent.publicKey.slice(0, 8)}] LLM returned null`);
|