Repository navigation
docs(email): reconcile 0.4.0 docs — /init, voice, comprehensive CHANGELOG (schema 2.3) - #1986
Conversation
…t; bump 0.4.0 Closes three release-blocking spec/doc gaps in the email agent and bumps it to 0.4.0 across all four version locations. Gap 1 — /init endpoints undocumented in the npm package. GET /v1/email/init (readiness preflight, #1795) and POST /v1/email/init (streaming provisioning) shipped in the sidecar but were absent from the npm-facing docs. Added both to SPEC.md's endpoint table, rewrote the now-stale "readiness vs liveness" prose in SPEC/README/SKILL (the real readiness signal is GET /init, not "a triage returning 200"), added InitResponse/InitLemonadeStatus/InitModelStatus types to src/types.ts (matching the api_routes.py envelope), and a CHANGELOG bullet. Gap 2 — voice-style drafting (#1607) shipped but mislabeled + undocumented. It is live in the agent loop (build_voice_profile/clear_voice_profile, prompt injection via render_style_guidance) with no REST endpoint. Flipped specification.html's P5 card from "Planned" to "Wired" and reconciled the dependent counters (at-a-glance cards + stat boxes: 2 planned -> 1, 15 in-progress -> 16), and documented it as an agent-loop capability in the npm README/SKILL/SPEC alongside scheduled-send/snooze, with a CHANGELOG bullet. Gap 3 — specification.html schema-version drift. The doc is headlined 2.2 but several request/response defaults still showed 1.0/2.1. Updated the EmailTriage / EmailSearch / BatchTriage request defaults and the prescan/briefing curl responses to 2.2, matching contract.SCHEMA_VERSION. Remaining 1.0/2.0/2.1 mentions are legitimate historical/feature-introduction labels. Also: follow-up tracking (#1606) prose added to npm README/SKILL/SPEC for parity (was CHANGELOG-only), and an EmailBriefingResponse type for the briefing endpoint. Verified: npm run build clean, 59 npm tests pass, all four versions agree at 0.4.0.
|
Approve — this is a documentation + version-bump release PR for the email agent 0.4.0, and every claim in it checks out against the shipped code. It closes the spec/doc gaps a pre-release audit found: the new One low-priority miss and one release-sequencing thing to confirm, both in the details below — neither blocks merge. The scorecard staying at 0.3.0 is expected (it's the unchecked test-plan item, refreshed on the AMD eval pool separately). 🔍 Technical detailsVerification performed (all passed):
🟢 Stale version badge ( Not a finding, just confirm: Strengths:
|
The 0.4.0 docs typed and documented GET /v1/email/init but shipped "no client wrapper yet (call with fetch)" — so a host using the typed EmailClient still couldn't reach the readiness preflight without dropping to raw fetch, and client.ts still claimed the endpoint was "tracked separately." Add EmailClient.init(): it returns the InitResponse on both the 200 (ready) and 503 (not-ready) paths — 503 is the expected not-ready response whose body is a valid InitResponse, so it's parsed and returned, not thrown. Any other status still raises HttpError. Covers the gap with three tests (ready, not-ready-503, non-503-throws), an interface-table row, and the changelog clause; types.ts/SPEC/SKILL are unchanged (already in the release).
|
🟡 Three reference docs say "no client wrapper yet" for README.md's prose block, SPEC.md's Readiness vs liveness section, and SKILL.md's gotchas all tell integrators to call Fix: update the "no client wrapper yet" passages in SPEC.md, SKILL.md, and README.md prose to reference 🔍 Technical detailsThree docs claim "no client wrapper yet" for
But The raw |
Brings the branch up to schema 2.3 (triage reply scaffold #1984), caller auth #1706, runtime memory + stateful agent surface #1666, and the eval-CI changes. Conflict resolution: took main's regenerated 2.3 specification.html; reconciled SPEC.md to keep main's 2.3 contract notes plus the /init readiness + briefing additions; merged CHANGELOG so the 0.4.0 section carries every feature from both lines (/init #1795, voice #1607, agent surface + memory #1666, caller auth #1706, 2.3 scaffold #1984, follow-up, attachments, …). Also corrected 4 stale 'schema 2.2' claims to 2.3 in README/SPEC/SKILL.
|
🟡 Three docs added in this push say "no client wrapper yet — use The contradiction is sharpest in README.md, which says "no client wrapper yet; use 🔍 Technical detailsFiles that still claim "no wrapper yet" after this push:
All four should be updated to direct users to |
The main merge brought the #1706 caller-auth token and left the /init docs describing the endpoint as "no client wrapper yet — call it with a plain fetch." That is now both stale (this branch ships EmailClient.init()) and, for the SPEC example, wrong: a raw fetch("/v1/email/init") with no Authorization header now 401s under the new per-session bearer token. Point every readiness doc at init() instead: add it to the SPEC method list + REST-table row, replace the raw-fetch SPEC example with client.init(), and fix the README self-contradiction (it listed init() in the interface table but the prose still said "no wrapper"). The briefing and POST /v1/email/init "no wrapper yet" notes are left as-is — those are genuinely still unwrapped.
|
🟡 The fix is a one-liner: wrap the 🔍 Technical details
Missing test case ( |
…non-JSON 503 The 503 branch parsed e.bodyText unguarded, so a 503 whose body isn't the InitResponse JSON — e.g. a proxy / load-balancer HTML error page — threw a bare SyntaxError, breaking the documented contract that any status other than a valid not-ready 503 still surfaces as HttpError. Guard the parse and re-throw the original HttpError on failure; add a 503-with-HTML-body test.
# Conflicts: # hub/agents/npm/agent-email/CHANGELOG.md # hub/agents/npm/agent-email/README.md # hub/agents/npm/agent-email/SKILL.md # hub/agents/npm/agent-email/SPEC.md
Now that this branch adds the init() client method, correct the GET /v1/email/init docs that still said 'no client wrapper yet; use fetch' (README/SKILL/SPEC) to reference init() — it returns the InitResponse on both the 200 and 503 paths and attaches the per-session bearer token like every EmailClient method. Left the /briefing and POST /init 'no wrapper yet' notes intact (those remain fetch-only).
Brings the email agent's integrator-facing docs in line with the code as of the in-progress 0.4.0 (schema 2.3). Merged with
main, so this now sits on top of the 2.3 scaffold (#1984), caller auth (#1706), and memory/agent-surface (#1666) work.No release action — version stays where
mainhas it (0.4.0, staged), no tag, no publish. This is docs-only reconciliation to land while the other email PRs finish./initdocumented —GET(readiness preflight) +POST(provisioning) added to npm SPEC/README/SKILL/CHANGELOG;InitResponse/InitLemonadeStatus/InitModelStatusintypes.ts; the stale "readiness = a triage returning 200" prose replaced. (Pairs with theEmailClient.init()wrapper already on the branch.)## 0.4.0section now carries every feature from both lines: 2.3 reply scaffold (feat(email)!: triage returns a reply scaffold (no body), not an empty DraftReply #1984), caller auth (Harden the email sidecar's local REST API with caller authentication #1706), stateful agent surface + runtime memory (feat(email): runtime enable/disable of agent memory via API #1666),/init(feat(agent-email): add /v1/init readiness+provisioning endpoint (validate Lemonade + model) #1795), voice (feat(email): voice/style-matched drafting from Sent history #1607), follow-up tracking (feat(email): follow-up tracking — flag sent mail awaiting a reply #1606), attachments (feat(email): attachment handling (read exposes; draft/send accept) #1542), scheduled send/snooze (feat(email): scheduled send + snooze #1609), action-item tasks (feat(email): extract action items into a persistent task list #1605), briefing (feat(email): scheduled daily inbox briefing #1608), batch triage (feat(email): add batch triage endpoint alongside the single-email API (array in / array out) #1887).specification.htmltaken from main's regenerated 2.3 spec; 4 stale "current schema 2.2" claims in README/SPEC/SKILL corrected to 2.3.Test plan
npm run buildclean at 0.4.0 (types.ts incl.InitResponsecompiles)