Skip to content

feat(elos): share a read-only learner snapshot with local agents (Hermes) - #22

Merged
eulogep merged 1 commit into
mainfrom
feat/hermes-state
Oct 23, 2026
Merged

eulogep merged 1 commit into
mainfrom
feat/hermes-state

Conversation

@eulogep

@eulogep eulogep commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • App (Données → Agent local): pick a folder once (File System Access API); ELOS writes elos-state.json and keeps it fresh while open (changes only, never prompting); download fallback; stop sharing anytime.
  • Content: due words/cards, difficulties, upcoming exams, streak, scheduler replay summary — never personal sentences, transcriptions, notes, answers or source passages (unit-tested).
  • MCP: elos_today, elos_progress, elos_exam_plan read ELOS_STATE_FILE, strict validation, stale (>24 h) warning, read-only.

Test plan

  • npm test 642/642 (snapshot privacy + 8 MCP integration tests), typecheck, eslint ., build
  • Browser 11/11: folder write (OPFS standing in for the native picker), personal sentences absent, folder remembered, manual sync, download fallback, stop sharing, 0 external requests, no page errors (fixed a hydration mismatch found here)

🤖 Generated with Claude Code

…mes)

App side (Données → Agent local):
- the learner picks a folder once (File System Access API, Chrome/Edge);
  ELOS writes elos-state.json there and keeps it fresh while open
  (every minute and when the tab is hidden, only if changed, never
  prompting); download fallback for other browsers; sharing can be stopped
- minimal content: words and cards due, difficulties, upcoming exams,
  streak, scheduler replay summary. Never personal sentences,
  transcriptions, notes, answers or source passages (tested)

MCP side: elos_today, elos_progress and elos_exam_plan read the file from
ELOS_STATE_FILE, validate it strictly, flag snapshots older than 24 h
and never write back or grant mastery.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
daily-english-mission Ready Ready Preview Oct 23, 2026 5:17am UTC

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80dc7ad9-71d1-49e7-8c6a-ba30feef8f2b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T05:20:59.228591Z a6a8fb8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@eulogep
eulogep merged commit 25687f2 into main Oct 23, 2026
5 checks passed
@eulogep
eulogep deleted the feat/hermes-state branch October 23, 2026 05:19

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a6a8fb8a64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +105 to +106
if (value?.format !== SNAPSHOT_FORMAT || value.version !== SNAPSHOT_VERSION || typeof value.generatedAt !== "string"
|| typeof value.today !== "string" || !value.dailyEnglish || !value.studio || !Array.isArray(value.exams)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate the complete snapshot structure

Reject malformed nested data here rather than accepting any truthy dailyEnglish and studio values. For example, a syntactically valid file with dailyEnglish: {} passes this check, after which elos_today dereferences dueWords.length and fails with an MCP tool error instead of returning the documented invalid-snapshot response. Validate the nested arrays, objects, scalar types, and date strings before casting to LearnerSnapshot.

AGENTS.md reference: AGENTS.md:L30-L31

Useful? React with 👍 / 👎.

},
studio: {
scheduler: input.studio.scheduler ?? "CURRENT_V1",
dueToday: (plan[0]?.due ?? []).slice(0, MAX_ITEMS).flatMap((id) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the total count when truncating due cards

When more than 30 cards are due—especially on a fresh Studio library, where every never-reviewed card is due today—this slice silently discards the remainder. elos_today then uses snapshot.studio.dueToday.length as the exact workload and tells the agent to review only 30 cards, so the generated study plan understates the learner's actual backlog. Keep the bounded item list, but include the untruncated total or a truncation marker.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — a6a8fb8a Deployed Oct 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant