feat BREAKING calendar feat/calendar-events-v0 #1 / 6
aaronrene · 1 day ago · Jun 18, 2026 · Diff

feat(calendar): enforce agent context tiers in retrieval API (Phase 1E)

Add server-side agent calendar retrieval that enforces enabled_for_agents and agent_context_tier_max (0–2 redaction) independently of the display toggle, plus the org policy cap. New lib/calendar/agent-retrieval.mjs and GET /api/v1/calendar/agent-context route fail closed: agents-disabled calendars and policy cap 0 yield nothing, tier 1 omits the (untrusted) summary, and tier 3+ is rejected (deferred). Seven-tier tests cover unit, integration, e2e, stress, data-integrity, performance, and security (injection summary, policy caps, route auth contract). Documents the endpoint and schemas in openapi.yaml; scopes the section-source route contract test to its own route slice.

sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd sha
+6 ~1 symbols
852 changed · 852 in snapshot files
sha256:b3d4635caeeaa9529f019dab88d0680ae9a9a5b429c0d5487064c62d983e15c0 snapshot
+6
symbols added
~1
symbol modified
852
files changed
852
files in snapshot
0
dead code introduced
Semantic Changes 7 symbols
~ lib/calendar/agent-retrieval.mjs .mjs 3 symbols added
+ parseAgentContextTier function function parseAgentContextTier L74–85
+ resolveEffectiveTier function function resolveEffectiveTier L96–102
+ retrieveAgentCalendarContext function function retrieveAgentCalendarContext L117–211
+ buildBulkIcs function function buildBulkIcs L20–35
+ readRepoFile function function readRepoFile L26–28
+ buildBulkIcs function function buildBulkIcs L21–37
Files Changed
+852
852 in snapshot
+ .env.example .example
+ .gitignore .gitignore
+ .gitleaks.toml .toml
+ .museattributes .museattributes
+ .museignore .museignore
+ .nvmrc .nvmrc
+ AGENTS.md .md
+ README.md .md
+ backups/.gitignore .gitignore
+ cli/index.mjs .mjs
+ docs/SPEC.md .md
+ hub/roles.mjs .mjs
+ lib/air.mjs .mjs
+ lib/chunk.mjs .mjs
+ lib/vault.mjs .mjs
+ lib/write.mjs .mjs
+ netlify.toml .toml
+ package.json .json
+ public/.gitkeep .gitkeep
+ vault/meta/.gitkeep .gitkeep
+ web/index.html .html

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:65ccb454656ea5acdea0a10e559b78bcde1eb6ff753ecc2911bc99d1c3d7cadd --body "your comment"