Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion docs/development/STRUCTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,12 @@ shared/
│ ├── context_discipline.py # Master feature flag for the #3200 BRC context discipline: single EGG_CONTEXT_DISCIPLINE switch that enables the whole discipline (protected-root/queryable-env split + JIT pull + threshold reseed); subsumes the narrower EGG_SESSION_RESUME knob; default OFF (#3200)
│ ├── reseed.py # Resume-vs-reseed decision gate: compares resumed session occupancy against threshold (min(800_000, 0.80 × real_backend_window)) and chooses resume or reseed; bias-to-reseed on uncertainty (#3200)
│ ├── measurement.py # Emit-only per-event context-discipline measurement (#3249 / #3200): builds a MeasurementSnapshot of the six metrics (window occupancy, utilization, working-set vs real window, reseed frequency, root-cache hit rate, tokens/event) and emits through progress + heartbeat surfaces; gated on EGG_CONTEXT_MEASUREMENT (default OFF); pure observation — never changes the agent's exit code
│ └── queryable_env.py # JIT-pull queryable-environment renderers for the BRC event-pump (#3200): renders small stable POINTERS (git log recipe, BRC-memory path, read_peer_artifact / brc-transcript handles) in the protected root instead of inlining the bulk, to slow recency-driven context growth before auto-compaction
│ ├── queryable_env.py # JIT-pull queryable-environment renderers for the BRC event-pump (#3200): renders small stable POINTERS (git log recipe, BRC-memory path, read_peer_artifact / brc-transcript handles) in the protected root instead of inlining the bulk, to slow recency-driven context growth before auto-compaction
│ ├── working_heartbeat.py # Throttled in-tool-loop WORKING heartbeat emitter wired into the SDK session by client.py as a PostToolUse hook (#3341): restores the liveness signal for a long single-turn invocation so a busy agent does not trip the health monitor's heartbeat-silence tripwire; gated on pipeline context, EGG_WORKING_HEARTBEAT=false disables it
│ ├── auth_errors.py # The non-crash exit-code contract (EX_AUTH_FATAL / EX_RATE_LIMITED / EX_SESSION_TIMEOUT) the orchestrator supervises on, plus the credential and throttle classifiers (#3373)
│ ├── session_deadline.py # Makes the session's wall-clock budget visible to the agent: an absolute UTC deadline appended to the prompt, plus EGG_SESSION_DEADLINE_EPOCH / EGG_SESSION_BUDGET_SECONDS exported for tool calls and hooks; EGG_SESSION_DEADLINE_BANNER=false restores the pre-#3658 prompt (#3658)
│ ├── checkpoint.py # Best-effort in-pod `[salvage]` commit of the working tree when the session budget expires, so the boundary is clean rather than merely recoverable via the #3644 re-attach path; EGG_SESSION_TIMEOUT_CHECKPOINT=false disables it (#3658)
│ └── tests/ # In-package unit tests for the exit-code contract, session deadline, checkpoint, midturn messages, and working heartbeat
├── egg_anchor/ # Agent anchor mechanism for post-compaction state recovery
│ ├── __init__.py # Public API exports
│ ├── models.py # Pydantic models (AgentAnchor, AnchorMeta, ProgressItem, Decision, BRCState)
Expand Down
Loading