Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

style: drop banned dashes from new copilot, mail, prediction and preview-tool comments

nirholas27e9882befcc
diff --git a/api/_lib/copilot-engine.js b/api/_lib/copilot-engine.js
index 67104b9c6..a3b1aa983 100644
--- a/api/_lib/copilot-engine.js
+++ b/api/_lib/copilot-engine.js
@@ -183,7 +183,7 @@ export async function loadPortfolio(agentId, address, network) {
try {
const lamports = await conn.getBalance(ownerPk);
out.sol_balance = Number(lamports) / LAMPORTS_PER_SOL;
- } catch { /* RPC hiccup — report null, copilot says balance unavailable */ }
+ } catch { /* RPC hiccup, report null, copilot says balance unavailable */ }
try {
const TOKEN = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA');
const TOKEN22 = new PublicKey('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb');
@@ -202,7 +202,7 @@ export async function loadPortfolio(agentId, address, network) {
})
.filter(Boolean)
.slice(0, 30);
- } catch { /* token read failed — holdings stay empty */ }
+ } catch { /* token read failed, holdings stay empty */ }
try {
const rows = await sql`
SELECT mint, symbol, status, entry_quote_lamports, last_value_lamports,
@@ -216,7 +216,7 @@ export async function loadPortfolio(agentId, address, network) {
current_sol: num(p.last_value_lamports) != null ? num(p.last_value_lamports) / LAMPORTS_PER_SOL : null,
unrealized_pnl_pct: num(p.realized_pnl_pct),
}));
- } catch { /* positions table read failed — leave empty */ }
+ } catch { /* positions table read failed, leave empty */ }
return out;
}
@@ -297,7 +297,7 @@ export async function runCopilotTurn({ agent, history, network, emit = () => {},
let finalText = '';
const active = () => isActive();
- // Read-only tools are pure within a turn — the wallet/intel/quote a round sees
+ // Read-only tools are pure within a turn, the wallet/intel/quote a round sees
// won't change between the model's rounds. Memoize by (name, args) so when the
// model re-issues an identical read (a common small-model tic that otherwise
// burns a whole tool-loop round and paints a duplicate "Portfolio: …" line in
@@ -452,7 +452,7 @@ export async function runCopilotTurn({ agent, history, network, emit = () => {},
content: roundOut.content || null,
tool_calls: roundOut.toolCalls.map((tc) => ({ id: tc.id, type: 'function', function: { name: tc.name, arguments: tc.args || '{}' } })),
});
- // A round is only "progress" if at least one call surfaced something new —
+ // A round is only "progress" if at least one call surfaced something new:
// a fresh read, or a proposal. If every call this round is a repeat of a
// read the model already ran this turn, it's spinning: feed the cached
// results back (OpenAI requires a tool result per tool_call) but break out
@@ -485,12 +485,12 @@ export async function runCopilotTurn({ agent, history, network, emit = () => {},
outcome = { result: { error: e?.message || 'tool_failed' }, summary: `Tool ${tc.name} failed: ${e?.message || 'error'}` };
progressed = true; // a genuine failure is new information, not a spin
}
- // Surface read activity once per distinct read — never re-paint a cached repeat.
+ // Surface read activity once per distinct read, never re-paint a cached repeat.
if (!isPropose && !cached) send('tool', { name: tc.name, summary: outcome.summary, data: outcome.card || null });
if (!cached) toolCalls.push({ name: tc.name, summary: outcome.summary });
messages.push({ role: 'tool', tool_call_id: tc.id, content: JSON.stringify(outcome.result).slice(0, 6000) });
}
- if (!progressed) break; // model looped on data it already has — go answer.
+ if (!progressed) break; // model looped on data it already has, go answer.
}
// If the loop hit its round cap mid-tool without a natural answer, ask for a
diff --git a/api/_lib/mail/content-rules.js b/api/_lib/mail/content-rules.js
index 66cfe7f24..37e76b0eb 100644
--- a/api/_lib/mail/content-rules.js
+++ b/api/_lib/mail/content-rules.js
@@ -15,7 +15,7 @@ const NAME_SALUTATION_RE = /^[\p{L}][\p{L}\p{M}'. -]{0,58},$/u;
const SIGNOFF_RE =
/^(best|best regards|best wishes|regards|kind regards|warm regards|warmly|thanks|thank you|many thanks|cheers|sincerely|yours|yours truly|all the best|talk soon|with thanks|respectfully|take care)\b[,.!]?/i;
// A dash signature ("- Ava", or the same with an em dash) also counts.
-const DASH_SIGNATURE_RE = /^(-{1,2}|—|–)\s*\p{L}/u;
+const DASH_SIGNATURE_RE = /^(-{1,2}|\u2014|\u2013)\s*\p{L}/u;
// Pressure tactics that turn a message into a phishing template. Matched on the
// subject and the body; any hit rejects the draft.
diff --git a/api/_lib/mail/provider.js b/api/_lib/mail/provider.js
index 7dc615cf5..85955b166 100644
--- a/api/_lib/mail/provider.js
+++ b/api/_lib/mail/provider.js
@@ -9,11 +9,11 @@
// name stable id stored on every message row
// configured() true when sending and reading are possible
// webhookConfigured() true when inbound webhooks can be verified
-// send(msg) -> { id } (throws ProviderError)
+// send(msg) returns { id }, throws ProviderError
// msg: { from, to[], cc[], replyTo?, subject, text, html?, headers?,
// attachments?: [{ filename, content: Buffer, contentType }],
// idempotencyKey }
-// verifyWebhook({ rawBody, headers }) -> { type, data } (throws ProviderError 'bad_signature')
+// verifyWebhook({ rawBody, headers }) returns { type, data }, throws ProviderError 'bad_signature'
// getInbound(id) -> NormalizedInbound
// { id, from, to[], cc[], replyTo[], subject, text, html, headers,
// messageId, createdAt, attachments: [{ id, filename, size, contentType }] }
diff --git a/api/predictions/[...path].js b/api/predictions/[...path].js
index fb7bfd1ff..475f60143 100644
--- a/api/predictions/[...path].js
+++ b/api/predictions/[...path].js
@@ -1,4 +1,4 @@
-// /api/predictions/* — public prediction-market reads for the /predictions page:
+// /api/predictions/*: public prediction-market reads for the /predictions page:
// events, categories, event detail with price history, market detail with the
// order book. Route table: api/_lib/predictions/routes.js. Guide: docs/predictions.md.
diff --git a/api/v1/agents/[id]/predictions/[...path].js b/api/v1/agents/[id]/predictions/[...path].js
index baa90e323..1f51bc2a0 100644
--- a/api/v1/agents/[id]/predictions/[...path].js
+++ b/api/v1/agents/[id]/predictions/[...path].js
@@ -1,4 +1,4 @@
-// /api/v1/agents/:id/predictions/* — prediction markets from the agent wallet.
+// /api/v1/agents/:id/predictions/*: prediction markets from the agent wallet.
// Route table and behavior: api/_lib/predictions/routes.js. Guide: docs/predictions.md.
import { defineRouter } from '../../../../_lib/agents-v1/http.js';
diff --git a/packages/agentcore-payments-mcp/src/tools/quote-session-payment.js b/packages/agentcore-payments-mcp/src/tools/quote-session-payment.js
index 3d16280b8..4ab064fd4 100644
--- a/packages/agentcore-payments-mcp/src/tools/quote-session-payment.js
+++ b/packages/agentcore-payments-mcp/src/tools/quote-session-payment.js
@@ -1,4 +1,4 @@
-// `quote_session_payment` — the quote that must run before pay_with_session.
+// `quote_session_payment`: the quote that must run before pay_with_session.
//
// Probes the endpoint for its live x402 price through /api/pay/simulate (one
// unpaid request, exactly what any x402 client does before deciding to pay) and,
diff --git a/packages/avatar-agent-mcp/src/tools/pump-buy-quote.js b/packages/avatar-agent-mcp/src/tools/pump-buy-quote.js
index 61cafa001..293c98fd1 100644
--- a/packages/avatar-agent-mcp/src/tools/pump-buy-quote.js
+++ b/packages/avatar-agent-mcp/src/tools/pump-buy-quote.js
@@ -1,4 +1,4 @@
-// `pump_buy_quote` — the live Jupiter quote that must run before pump_buy.
+// `pump_buy_quote`: the live Jupiter quote that must run before pump_buy.
// Same route, amount and slippage the buy will use; never signs.
import { z } from 'zod';
diff --git a/packages/avatar-agent-mcp/src/tools/pump-collect-preview.js b/packages/avatar-agent-mcp/src/tools/pump-collect-preview.js
index 3540b375a..d92cd73c2 100644
--- a/packages/avatar-agent-mcp/src/tools/pump-collect-preview.js
+++ b/packages/avatar-agent-mcp/src/tools/pump-collect-preview.js
@@ -1,4 +1,4 @@
-// `pump_collect_preview` — reads the creator-fee vault and shows exactly how
+// `pump_collect_preview`: reads the creator-fee vault and shows exactly how
// much SOL pump_collect_fees would move to the destination.
import { z } from 'zod';
diff --git a/packages/avatar-agent-mcp/src/tools/pump-launch-preview.js b/packages/avatar-agent-mcp/src/tools/pump-launch-preview.js
index adce73059..089c354fd 100644
--- a/packages/avatar-agent-mcp/src/tools/pump-launch-preview.js
+++ b/packages/avatar-agent-mcp/src/tools/pump-launch-preview.js
@@ -1,4 +1,4 @@
-// `pump_launch_preview` — every SOL line a launch costs the funder, checked
+// `pump_launch_preview`: every SOL line a launch costs the funder, checked
// against its live balance and the spend cap, before pump_launch runs.
import { z } from 'zod';
diff --git a/packages/avatar-agent-mcp/src/tools/wallet-send-preview.js b/packages/avatar-agent-mcp/src/tools/wallet-send-preview.js
index a967da963..eaa78eec0 100644
--- a/packages/avatar-agent-mcp/src/tools/wallet-send-preview.js
+++ b/packages/avatar-agent-mcp/src/tools/wallet-send-preview.js
@@ -1,4 +1,4 @@
-// `wallet_send_preview` — the spend-nothing preview that must run before
+// `wallet_send_preview`: the spend-nothing preview that must run before
// wallet_send. Reads the sender's live balance and applies the same cap and
// allowlist checks the send applies, without signing anything.
diff --git a/packages/portfolio-mcp/src/tools/preview-transfer.js b/packages/portfolio-mcp/src/tools/preview-transfer.js
index 2ca41dc81..cf596e00d 100644
--- a/packages/portfolio-mcp/src/tools/preview-transfer.js
+++ b/packages/portfolio-mcp/src/tools/preview-transfer.js
@@ -1,4 +1,4 @@
-// `preview_transfer` — the preview that must run before send_transfer. Reads
+// `preview_transfer`: the preview that must run before send_transfer. Reads
// the sender's live balances and applies the same cap and allowlist rules the
// transfer applies, without signing.