context
Run-local working context owned by the CLI briefing for a single intent. Legacy remains the default; Bounded is opt-in. Intent and instructions are preserved exactly. Working state is derived only from typed execution reports, never parsed from model or artifact text. A test result records its tested revision: passing on revision A never validates later revision B. Compact history events are archived from the first action, with bulk contents retained in the existing result store. The separate archive admits at most 4096 events and 16777216 UTF-8 bytes. Capacity refusal stops subsequent model requests and preserves already completed effects. Bounded context retires old events in batches when a serialized agent request exceeds 49152 bytes or a 64-entry tail would discard history, aiming for 32768 bytes. Every serialized bounded request, including schemas and escaped lookup responses, must fit 65536 bytes; mandatory content that cannot fit is an explicit refusal. A stable prompt prefix changes only at a checkpoint, with changing state and candidates afterward. Both selection and argument generation may list and read archived history using existing result-reference selection semantics, at most eight lookups per stage and always within the request ceiling. Retrieval omits whole records when necessary and never truncates structured data. No summarization model calls are made. Context reports contain measurements only, no source payloads; absent provider counters remain unknown. This contract adds no persisted entity, interactive correction, durable session memory, training export, or governed-loop compaction behavior. Each classification, selection or argument request permits at most three identical model attempts on the same binding, only when llm marks a failure retriable and no stream event has been offered to the caller. The waits before attempts two and three are one and two seconds; a provider retry delay may extend a wait up to thirty seconds. Cancellation interrupts waits. Refusal, authorization, invalid requests, capacity failures and failures after stream output are never retried. Every attempt is checked against the request ceiling and measured separately, including failed attempts and their available usage. Exhaustion preserves the final error class and observation, clears retry eligibility and reports the attempt count. No effect is performed until argument generation succeeds and Commission revalidates the proposed action.
intake.context is one of intake's bounded contexts. All domains.
Types
ContextPolicy
intake.context.ContextPolicy is one of Legacy and Bounded.
ContextReport
intake.context.ContextReport is a record of six fields:
policy—intake.context.ContextPolicyrequests—List<intake.context.ContextRequestMetric>checkpoints—Integerretrievals—Integermodel_calls—Integerelapsed_ms—Integer
ContextRequestMetric
intake.context.ContextRequestMetric is a record of eight fields:
phase—intake.context.RequestPhaserequest_bytes—Integerelapsed_ms—Integerfinal_usage—Booleaninput_tokens—Optional<Integer>, which may be absentcache_read_tokens—Optional<Integer>, which may be absentcache_write_tokens—Optional<Integer>, which may be absentoutput_tokens—Optional<Integer>, which may be absent
HistoryEvent
intake.context.HistoryEvent is a record of five fields:
sequence—Integer- action —
String arguments—Stringreport—Stringartifacts—List<intake.results.StoredResult>
RefusalState
intake.context.RefusalState is a record of two fields:
- action —
String reason—String
RequestPhase
intake.context.RequestPhase is one of Classification, Selection and Arguments.
TestState
intake.context.TestState is a record of three fields:
exit_code—Optional<Integer>, which may be absenttimed_out—Booleantested_revision—Optional<String>, which may be absent
WorkingState
intake.context.WorkingState is a record of four fields:
latest_revision—Optional<String>, which may be absentlatest_test—Optional<intake.context.TestState>, which may be absentlatest_refusal—Optional<intake.context.RefusalState>, which may be absentrecent_artifacts—List<intake.results.StoredResult>
Three of the types above are reached by nothing else in this system: intake.context.ContextReport, intake.context.HistoryEvent and intake.context.WorkingState. No entity, view, command, event, error or crossing names them, so it is either vocabulary something outside this specification uses or a leftover — and only a person can tell which.
Generated from intake v1 · model digest 91e7b24c1442a41a622f4feaa84db250d7769d7784122bae93f2e0cda0c64c8e · contract digest slice-sha256/2:e3856919dfb0b8859558f0ab790844646412cf18b8692f0b7420823aa1f13cb8. Do not edit this file; change the specification and regenerate it with task docs-generate.