fix: drop the em dash from user-facing copy
Anti-slop audit-002, item 13 (R-02). Every em dash in text the user sees (web UI labels, toasts, tooltips, empty and error states, chat steps, API messages, notifications and channel replies) became a period, comma, colon or parentheses. Model prompts, logs, comments, regexes and the lone dash that marks an empty value are unchanged. Text the client matches against server copy (the default workspace summary, the quiet-night dream summary) accepts the old wording too, so cached and saved data still match.
This commit is contained in:
@@ -28,7 +28,7 @@ const MESSAGE_DEDUP_TTL_MS = 24 * 60 * 60 * 1000;
|
||||
const MESSAGE_DEDUP_MAX = 2_000;
|
||||
|
||||
export const APPROVAL_NEEDED_REPLY =
|
||||
'This request needs a tool approval — open the Waggle app to review and approve it.';
|
||||
'This request needs a tool approval. Open the Waggle app to review and approve it.';
|
||||
export const PAIR_OK_REPLY = 'Paired. This device can now talk to Waggle. Try /status or just say hi.';
|
||||
export const PAIR_FAIL_REPLY = 'Invalid or expired pairing code. Generate a fresh one in Waggle → Settings → Channels.';
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export interface InterpretDeps {
|
||||
const FALLBACK: InterpretResult = {
|
||||
kind: 'none',
|
||||
fallback: true,
|
||||
message: "Couldn't interpret that — showing the closest matches instead.",
|
||||
message: "Couldn't interpret that. Showing the closest matches instead.",
|
||||
};
|
||||
|
||||
/** Strip ``` fences and isolate the first JSON object. */
|
||||
|
||||
@@ -83,7 +83,7 @@ export function validateEraseConfirmation(
|
||||
const raw = headers['x-confirm-erase'] ?? headers['X-Confirm-Erase'];
|
||||
const headerValue = Array.isArray(raw) ? raw[0] : raw;
|
||||
if (headerValue !== ERASE_CONFIRMATION_HEADER_VALUE) {
|
||||
return { ok: false, error: `Missing or wrong X-Confirm-Erase header — expected exact value "${ERASE_CONFIRMATION_HEADER_VALUE}".` };
|
||||
return { ok: false, error: `Missing or wrong X-Confirm-Erase header. Expected exact value "${ERASE_CONFIRMATION_HEADER_VALUE}".` };
|
||||
}
|
||||
if (!body || typeof body !== 'object') {
|
||||
return { ok: false, error: 'Body must be a JSON object with a "confirmation" field.' };
|
||||
|
||||
@@ -41,7 +41,9 @@ export interface DreamDay {
|
||||
narrative?: string;
|
||||
}
|
||||
|
||||
export const QUIET_NIGHT_SUMMARY = 'A quiet night — your memory was already tidy.';
|
||||
export const QUIET_NIGHT_SUMMARY = 'A quiet night. Your memory was already tidy.';
|
||||
/** The same summary as saved before the copy changed; read() upgrades it. */
|
||||
const LEGACY_QUIET_NIGHT_SUMMARY = 'A quiet night — your memory was already tidy.';
|
||||
|
||||
/** Local calendar date (not UTC): "last night" must match the user's clock. */
|
||||
export function localDateString(d: Date = new Date()): string {
|
||||
@@ -159,7 +161,12 @@ export class DreamJournal {
|
||||
try {
|
||||
const raw = fs.readFileSync(path.join(this.dir, `${date}.json`), 'utf8');
|
||||
const parsed = JSON.parse(raw) as DreamDay;
|
||||
if (parsed?.date && Array.isArray(parsed.events)) return parsed;
|
||||
if (parsed?.date && Array.isArray(parsed.events)) {
|
||||
// Older days keep the previous wording; show and compare the current one.
|
||||
return parsed.summary === LEGACY_QUIET_NIGHT_SUMMARY
|
||||
? { ...parsed, summary: QUIET_NIGHT_SUMMARY }
|
||||
: parsed;
|
||||
}
|
||||
} catch {
|
||||
/* missing or corrupt file → treated as absent */
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ export async function executeHeldAction(server: FastifyInstance, row: PendingAct
|
||||
}
|
||||
if (!tool) {
|
||||
const error = row.tool_name === 'send_email'
|
||||
? 'no email connector connected — connect Gmail/Outlook to send'
|
||||
? 'no email connector connected (connect Gmail/Outlook to send)'
|
||||
: `unknown tool: ${row.tool_name}`;
|
||||
store.updatePendingActionResult(row.id, { status: 'failed', error, executedAt: nowIso() });
|
||||
return { ok: false, status: 'failed', error };
|
||||
|
||||
@@ -2208,7 +2208,7 @@ export async function buildLocalServer(config: Partial<LocalConfig> = {}) {
|
||||
return null;
|
||||
}
|
||||
|
||||
function markAnthropicProxyDegraded(detail = 'Built-in Anthropic proxy (API key invalid or expired — update in Settings > API Keys)'): void {
|
||||
function markAnthropicProxyDegraded(detail = 'Built-in Anthropic proxy (API key invalid or expired, update in Settings > API Keys)'): void {
|
||||
server.agentState.llmProvider.health = 'degraded';
|
||||
server.agentState.llmProvider.detail = detail;
|
||||
}
|
||||
@@ -2379,7 +2379,7 @@ export async function buildLocalServer(config: Partial<LocalConfig> = {}) {
|
||||
const keyValid = freshAnthropicValidation();
|
||||
if (keyValid === false) {
|
||||
llm.health = 'degraded';
|
||||
llm.detail = 'Built-in Anthropic proxy (API key invalid or expired — update in Settings > API Keys)';
|
||||
llm.detail = 'Built-in Anthropic proxy (API key invalid or expired, update in Settings > API Keys)';
|
||||
markAnthropicProxyDegraded(llm.detail);
|
||||
} else if (keyValid === null) {
|
||||
validateAnthropicKeyInBackground();
|
||||
|
||||
@@ -166,7 +166,7 @@ export async function generateMorningBriefing(ctx: ProactiveContext): Promise<Pr
|
||||
|
||||
return {
|
||||
type: 'morning_briefing',
|
||||
title: 'Good morning — here\'s your workspace briefing',
|
||||
title: 'Good morning. Here\'s your workspace briefing',
|
||||
body: bodyParts.join(' '),
|
||||
priority: totalPending > 5 ? 'high' : 'medium',
|
||||
actionUrl: '/',
|
||||
|
||||
@@ -384,7 +384,7 @@ export const agentEntityRoutes: FastifyPluginAsync = async (server) => {
|
||||
// C23: FE shows a picker; the server refuses to guess.
|
||||
return reply.status(400).send({
|
||||
error: 'workspace_ambiguous',
|
||||
message: 'Agent has multiple workspaces — pass workspaceId',
|
||||
message: 'Agent has multiple workspaces. Pass workspaceId',
|
||||
workspaceIds: agent.workspaceIds,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ export const automationRoutes: FastifyPluginAsync = async (server) => {
|
||||
// jobType resolution — an EXPLICIT unknown jobType would 400 on create
|
||||
// (resolveJobType silently falls back to agent_task; say so here).
|
||||
if (b.jobType && !VALID_JOB_TYPES.has(b.jobType)) {
|
||||
issues.push(`unknown jobType "${b.jobType}" — must be one of: ${[...VALID_JOB_TYPES].join(', ')}`);
|
||||
issues.push(`unknown jobType "${b.jobType}". Must be one of: ${[...VALID_JOB_TYPES].join(', ')}`);
|
||||
}
|
||||
|
||||
// Config completeness — the agent_task executor skips runs that carry no
|
||||
@@ -412,14 +412,14 @@ export const automationRoutes: FastifyPluginAsync = async (server) => {
|
||||
if (jobType === 'agent_task') {
|
||||
const prompt = jobConfig.prompt;
|
||||
if (typeof prompt !== 'string' || !prompt.trim()) {
|
||||
issues.push('agent_task requires jobConfig.prompt — the executor skips runs without one');
|
||||
issues.push('agent_task requires jobConfig.prompt (the executor skips runs without one)');
|
||||
}
|
||||
// Store-level parity — CronStore.create throws for agent_task without a
|
||||
// workspaceId ('*' is the fan-out-to-all sentinel the Builder sends for
|
||||
// "All workspaces"); without this check the preview says "valid" for a
|
||||
// draft that create would 400. (Caught by the 2026-06-10 live smoke.)
|
||||
if (!b.workspaceId) {
|
||||
issues.push('agent_task requires a workspaceId — use "*" to target all workspaces');
|
||||
issues.push('agent_task requires a workspaceId (use "*" to target all workspaces)');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,7 +428,7 @@ export const automationRoutes: FastifyPluginAsync = async (server) => {
|
||||
if (jobType === 'loop') {
|
||||
const prompt = jobConfig.prompt;
|
||||
if (typeof prompt !== 'string' || !prompt.trim()) {
|
||||
issues.push('loop requires jobConfig.prompt — the executor skips runs without one');
|
||||
issues.push('loop requires jobConfig.prompt (the executor skips runs without one)');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1748,7 +1748,7 @@ ${wsConfig?.templateId ? `- Workspace template: ${wsConfig.templateId} — tailo
|
||||
reroutedMessage = rerouted;
|
||||
} else if (cmdResult.startsWith(AGENT_LOOP_REROUTE_PREFIX) && !litellmAvailable) {
|
||||
const cmdName = message.trim().split(/\s+/)[0];
|
||||
const friendlyError = `**${cmdName} requires AI** — This command needs a working LLM connection.\n\nConfigure an API key in Settings > API Keys, then try again.`;
|
||||
const friendlyError = `**${cmdName} requires AI.** This command needs a working LLM connection.\n\nConfigure an API key in Settings > API Keys, then try again.`;
|
||||
const words = friendlyError.split(' ');
|
||||
for (const word of words) {
|
||||
if (turnSignal.aborted) return;
|
||||
@@ -1864,7 +1864,7 @@ ${wsConfig?.templateId ? `- Workspace template: ${wsConfig.templateId} — tailo
|
||||
const recallInjection = scanForInjection(recall.text, 'tool_output');
|
||||
if (recallInjection.score >= 0.7) {
|
||||
log.warn('[security] Injection detected in recalled memory — dropping context', recallInjection.flags);
|
||||
sendEvent('step', { content: 'Recalled memories dropped — suspicious content detected.' });
|
||||
sendEvent('step', { content: 'Recalled memories dropped (suspicious content detected).' });
|
||||
} else {
|
||||
recalledContext = '\n\n' + recall.text;
|
||||
recallTextForAssembler = recall.text;
|
||||
@@ -3063,7 +3063,7 @@ ${wsConfig?.templateId ? `- Workspace template: ${wsConfig.templateId} — tailo
|
||||
poolExhausted = true;
|
||||
break;
|
||||
}
|
||||
sendEvent('step', { content: `API key rotated — retrying with next credential` });
|
||||
sendEvent('step', { content: `API key rotated, retrying with next credential` });
|
||||
try {
|
||||
credentialResult = await runAgentAttempt({ ...runConfig, litellmApiKey: nextKey });
|
||||
credPool.reportSuccess(nextKey);
|
||||
@@ -3311,7 +3311,7 @@ ${wsConfig?.templateId ? `- Workspace template: ${wsConfig.templateId} — tailo
|
||||
if (hedgeWorthy.length > 0 && process.env.WAGGLE_GROUNDING_HEDGE !== '0') {
|
||||
const items = hedgeWorthy.map((s) => `"${s.text}"`).join(', ');
|
||||
const one = hedgeWorthy.length === 1;
|
||||
finalContent += `\n\n---\n*Note: ${items} ${one ? 'is' : 'are'} not in your saved memory — please treat ${one ? 'it' : 'them'} as an assumption, not a recalled fact.*`;
|
||||
finalContent += `\n\n---\n*Note: ${items} ${one ? 'is' : 'are'} not in your saved memory. Please treat ${one ? 'it' : 'them'} as an assumption, not a recalled fact.*`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3473,7 +3473,7 @@ ${wsConfig?.templateId ? `- Workspace template: ${wsConfig.templateId} — tailo
|
||||
} else if (err.message.includes('401') || err.message.includes('Unauthorized')) {
|
||||
errorMessage = 'API key is invalid or expired. Update it in Settings > API Keys.';
|
||||
} else if (err.message.includes('timeout') || err.message.includes('ETIMEDOUT')) {
|
||||
errorMessage = 'The request timed out. The model may be overloaded — try again in a moment.';
|
||||
errorMessage = 'The request timed out. The model may be overloaded. Try again in a moment.';
|
||||
} else if (err.message.includes('context_length') || err.message.includes('too many tokens')) {
|
||||
errorMessage = 'The conversation is too long for the model. Try clearing the chat and starting fresh.';
|
||||
} else {
|
||||
|
||||
@@ -254,7 +254,7 @@ export async function connectorRoutes(fastify: FastifyInstance) {
|
||||
approvalClass: 'standard',
|
||||
action: 'failed',
|
||||
initiator: 'user',
|
||||
detail: `Manual sync failed — health status: ${health.status}`,
|
||||
detail: `Manual sync failed (health status: ${health.status})`,
|
||||
});
|
||||
return { ok: false, connectorId: id, status: health.status };
|
||||
}
|
||||
@@ -274,7 +274,7 @@ export async function connectorRoutes(fastify: FastifyInstance) {
|
||||
approvalClass: 'standard',
|
||||
action: 'approved',
|
||||
initiator: 'user',
|
||||
detail: `Manual sync — health status: ${health?.status ?? 'unknown'}`,
|
||||
detail: `Manual sync (health status: ${health?.status ?? 'unknown'})`,
|
||||
});
|
||||
|
||||
return { ok: true, connectorId: id, lastSyncAt, status: health?.status ?? 'unknown' };
|
||||
@@ -316,7 +316,7 @@ export async function connectorRoutes(fastify: FastifyInstance) {
|
||||
approvalClass: 'standard',
|
||||
action: 'rejected',
|
||||
initiator: 'user',
|
||||
detail: `Access revoked — credentials purged (${cleanedKeys} sub-key(s), ${oauthPurged} OAuth token(s)`
|
||||
detail: `Access revoked: credentials purged (${cleanedKeys} sub-key(s), ${oauthPurged} OAuth token(s)`
|
||||
+ `${provider !== id ? ` via provider "${provider}"` : ''})`,
|
||||
});
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ export const dataEraseRoutes: FastifyPluginAsync = async (server) => {
|
||||
requestedAt,
|
||||
markerPath,
|
||||
dataDirSnapshot: snapshot,
|
||||
instruction: 'Quit Waggle and relaunch — erasure completes during startup. The audit-receipt-*.json file in your data dir after relaunch records what was deleted.',
|
||||
instruction: 'Quit Waggle and relaunch. Erasure completes during startup. The audit-receipt-*.json file in your data dir after relaunch records what was deleted.',
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -266,7 +266,7 @@ export async function fleetRoutes(fastify: FastifyInstance) {
|
||||
// product being broken on every judge persona.
|
||||
persistMessage(fastify.localConfig.dataDir, wsId, spawnSessionId, {
|
||||
role: 'assistant',
|
||||
content: `I couldn't finish this run — the model didn't respond. Nothing was changed. You can retry from the Agent Center, or pick a different model in the chat header. (Details are in Events & Logs.)`,
|
||||
content: `I couldn't finish this run because the model didn't respond. Nothing was changed. You can retry from the Agent Center, or pick a different model in the chat header. (Details are in Events & Logs.)`,
|
||||
});
|
||||
} catch { /* persist best-effort */ }
|
||||
emitWaggleSignal({
|
||||
|
||||
@@ -470,7 +470,7 @@ export async function marketplaceRoutes(fastify: FastifyInstance) {
|
||||
approvalClass: 'elevated',
|
||||
action: 'approved',
|
||||
initiator: 'user',
|
||||
detail: `User forceInsecure override — installed despite blocked scan (severity=${sev}): `
|
||||
detail: `User forceInsecure override. Installed despite blocked scan (severity=${sev}): `
|
||||
+ result.scanResult.findings.map(f => f.title).join('; '),
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
@@ -518,7 +518,7 @@ export async function mcpRoutes(fastify: FastifyInstance) {
|
||||
if (stateBefore === 'starting') {
|
||||
return reply.code(409).send({
|
||||
ok: false,
|
||||
error: `MCP server "${id}" is currently starting — retry shortly`,
|
||||
error: `MCP server "${id}" is currently starting. Retry shortly.`,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ export async function mcpRoutes(fastify: FastifyInstance) {
|
||||
mode: 'static',
|
||||
tools: [],
|
||||
...(ok ? {} : { error: 'Catalog entry has no install command' }),
|
||||
note: 'Not installed — static manifest validation only (C21 fallback)',
|
||||
note: 'Not installed. Static manifest validation only (C21 fallback)',
|
||||
};
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ export async function mcpRoutes(fastify: FastifyInstance) {
|
||||
approvalClass: 'standard',
|
||||
action: 'uninstalled',
|
||||
initiator: 'user',
|
||||
detail: `MCP server revoked — removed from runtime and persisted config (${verifiedMarketplaceOrigin ? 'verified marketplace' : 'custom local'} origin)`,
|
||||
detail: `MCP server revoked: removed from runtime and persisted config (${verifiedMarketplaceOrigin ? 'verified marketplace' : 'custom local'} origin)`,
|
||||
});
|
||||
|
||||
return { ok: true, id, stoppedInstance: hadInstance, removedConfig };
|
||||
|
||||
@@ -145,7 +145,7 @@ export const personaRoutes: FastifyPluginAsync = async (fastify) => {
|
||||
// Check if LLM is available
|
||||
const llmStatus = fastify.agentState?.llmProvider;
|
||||
if (!llmStatus || llmStatus.health === 'unavailable') {
|
||||
return reply.code(503).send({ error: 'LLM not available — cannot generate persona' });
|
||||
return reply.code(503).send({ error: 'LLM not available. Cannot generate persona' });
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
@@ -287,7 +287,7 @@ export const profileRoutes: FastifyPluginAsync = async (fastify) => {
|
||||
try {
|
||||
const apiKey = fastify.vault?.get('anthropic')?.value;
|
||||
if (!apiKey) {
|
||||
return reply.code(503).send({ error: 'No Anthropic key — cannot analyze style' });
|
||||
return reply.code(503).send({ error: 'No Anthropic key. Cannot analyze style' });
|
||||
}
|
||||
|
||||
const proxyUrl = selfBaseUrl(fastify);
|
||||
@@ -344,7 +344,7 @@ Sample text:
|
||||
try {
|
||||
const apiKey = fastify.vault?.get('anthropic')?.value;
|
||||
if (!apiKey) {
|
||||
return reply.code(503).send({ error: 'No Anthropic key — cannot analyze brand' });
|
||||
return reply.code(503).send({ error: 'No Anthropic key. Cannot analyze brand' });
|
||||
}
|
||||
|
||||
const proxyUrl = selfBaseUrl(fastify);
|
||||
|
||||
@@ -154,7 +154,7 @@ export const routeProposalRoutes: FastifyPluginAsync = async (server) => {
|
||||
if (disclosed && chosen && chosen.egressDestination !== disclosed.egressDestination) {
|
||||
return reply.code(409).send({
|
||||
error: 'revalidation_failed',
|
||||
reason: 'chosen executor sends data to a different destination — re-propose to review the disclosure',
|
||||
reason: 'chosen executor sends data to a different destination. Re-propose to review the disclosure',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ function generateSessionSummary(messageLines: string[]): string | null {
|
||||
|
||||
parts.push(meta.join(' · '));
|
||||
|
||||
return parts.join(' — ') || null;
|
||||
return parts.join(' · ') || null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,7 +69,7 @@ export const skillsAuditRoutes: FastifyPluginAsync = async (server) => {
|
||||
}
|
||||
const llm = await buildAuditLLM(apiKey);
|
||||
if (!llm) {
|
||||
return reply.status(503).send({ error: '@ax-llm/ax is not available — cannot initialize the auditor.' });
|
||||
return reply.status(503).send({ error: '@ax-llm/ax is not available. Cannot initialize the auditor.' });
|
||||
}
|
||||
const llmCall = buildJudgeLLMCall(llm);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export const skillsHygieneRoutes: FastifyPluginAsync = async (server) => {
|
||||
}
|
||||
const llm = await createAnthropicEvolutionLLM(apiKey);
|
||||
if (!llm) {
|
||||
return reply.status(503).send({ error: '@ax-llm/ax is not available — cannot initialize the hygiene judge.' });
|
||||
return reply.status(503).send({ error: '@ax-llm/ax is not available. Cannot initialize the hygiene judge.' });
|
||||
}
|
||||
const llmCall = buildJudgeLLMCall(llm);
|
||||
const dryRun = request.body?.dryRun ?? false;
|
||||
|
||||
@@ -509,7 +509,7 @@ export const skillRoutes: FastifyPluginAsync = async (server) => {
|
||||
.replace(/^-+|-+$/g, '');
|
||||
|
||||
if (!kebabName || kebabName.length === 0) {
|
||||
return reply.status(400).send({ error: 'Invalid skill name — must contain at least one alphanumeric character' });
|
||||
return reply.status(400).send({ error: 'Invalid skill name. It must contain at least one alphanumeric character' });
|
||||
}
|
||||
|
||||
// Prevent path traversal
|
||||
|
||||
@@ -145,7 +145,7 @@ export async function telegramRoutes(server: FastifyInstance) {
|
||||
const { token, chatId } = getStoredCreds(server);
|
||||
if (!token || !chatId) {
|
||||
return reply.status(400).send({
|
||||
error: 'Telegram not configured — POST /api/telegram/config first',
|
||||
error: 'Telegram not configured. POST /api/telegram/config first',
|
||||
});
|
||||
}
|
||||
try {
|
||||
@@ -177,7 +177,7 @@ export async function telegramRoutes(server: FastifyInstance) {
|
||||
const { token, chatId } = getStoredCreds(server);
|
||||
if (!token || !chatId) {
|
||||
return reply.status(400).send({
|
||||
error: 'Telegram not configured — POST /api/telegram/config first',
|
||||
error: 'Telegram not configured. POST /api/telegram/config first',
|
||||
});
|
||||
}
|
||||
try {
|
||||
|
||||
@@ -158,7 +158,7 @@ export function buildTimeAwareGreeting(
|
||||
// `ws.created` from `workspaces.ts`), so we key the fresh-state branch on
|
||||
// `frameCount` alone — if there are no memories, there is nothing to brief.
|
||||
if ((opts.frameCount ?? 0) === 0) {
|
||||
return 'Welcome — anything you discuss here will be remembered.';
|
||||
return 'Welcome. Anything you discuss here will be remembered.';
|
||||
}
|
||||
|
||||
// Check inactivity override (>24 hours)
|
||||
|
||||
@@ -764,7 +764,7 @@ export const workspaceRoutes: FastifyPluginAsync = async (server) => {
|
||||
// workspace name already includes the word "workspace". The fallback now
|
||||
// names the workspace inline rather than treating "workspace" as a noun
|
||||
// suffix on top of the name.
|
||||
summary: summary || `Everything you discuss in ${ws.name} stays in context — decisions, research, and progress are remembered across sessions.`,
|
||||
summary: summary || `Everything you discuss in ${ws.name} stays in context: decisions, research, and progress are remembered across sessions.`,
|
||||
recentThreads,
|
||||
recentDecisions,
|
||||
suggestedPrompts,
|
||||
@@ -1104,7 +1104,7 @@ export const workspaceRoutes: FastifyPluginAsync = async (server) => {
|
||||
lines.push('## Recent Sessions');
|
||||
lines.push('');
|
||||
for (const s of sessions.slice(0, 10)) {
|
||||
lines.push(`- **${s.title}** — last active ${s.lastActive.slice(0, 10)}`);
|
||||
lines.push(`- **${s.title}** (last active ${s.lastActive.slice(0, 10)})`);
|
||||
}
|
||||
lines.push('');
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ export async function startService(options?: ServiceOptions): Promise<ServiceRes
|
||||
server.agentState.currentModel = localModels[0];
|
||||
} else {
|
||||
providerHealth = 'degraded';
|
||||
providerDetail = 'Built-in provider proxy (no API key — configure in Settings > API Keys)';
|
||||
providerDetail = 'Built-in provider proxy (no API key, configure in Settings > API Keys)';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,6 +124,16 @@ describe('DreamJournal record + persistence', () => {
|
||||
expect(j.read('2026-07-09')?.events).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('reads a quiet night saved with the older wording as the current summary', () => {
|
||||
fs.mkdirSync(path.join(dir, 'dreams'), { recursive: true });
|
||||
fs.writeFileSync(
|
||||
path.join(dir, 'dreams', '2026-07-09.json'),
|
||||
JSON.stringify({ date: '2026-07-09', events: [], summary: 'A quiet night — your memory was already tidy.' }),
|
||||
'utf8',
|
||||
);
|
||||
expect(new DreamJournal(dir).read('2026-07-09')?.summary).toBe(QUIET_NIGHT_SUMMARY);
|
||||
});
|
||||
|
||||
it('survives a corrupt day file by treating it as absent', () => {
|
||||
fs.mkdirSync(path.join(dir, 'dreams'), { recursive: true });
|
||||
fs.writeFileSync(path.join(dir, 'dreams', '2026-07-09.json'), '{nope', 'utf8');
|
||||
|
||||
Reference in New Issue
Block a user