Deep & Source Context
How septum_symbol delivers bounded source slices and TypeScript reference context with freshness and byte budgets.
septum_symbol (action: "context") uses two complementary context policies depending on the target language and requested options.
1. Deep TypeScript Context (context_mode: "deep")
Applied explicitly via context_mode: "deep" or automatically for .ts, .mts, and .cts declarations (when bounded source options are not supplied). Its policy identifier is referenced-typescript-declarations/v4.
How It Works
- Creates an isolated in-memory TypeScript program (
noLib: true,noResolve: true) informed by indexed import relationships rather than loading the entire workspace dependency graph. - Selects the target declaration followed by supporting local and imported declarations/type contracts up to 3 import edges.
- For type-only supporting classes, projects public instance signatures while omitting constructor bodies, private/protected/static members, and initializers.
- Supports limited static pruning for known literal call arguments (
selectionitems).
Bounds & Output Items
- Byte Budget (
budget_bytes): Default16,384bytes (accepted range2,048–2,097,152bytes), measured over the serialized content response envelope (not an LLM token count). - Selection Caps: Maximum
256items,64bound files,8 MiBselected source reads, and3import edges. - Item Kinds:
source(with 1-based inclusive spans and UTF-16 fragment offsets),type_contract,relationship,selection, anddiagnostic. - Continuation: Large outputs paginate via
continuationcursors bound to query and snapshot identity. Pagination does not recover declarations omitted due to capacity limits (omitted_by_capacity).
Scope Note: Deep context explicitly returns
task_sufficiency: "unknown"."complete"means complete relative to this bounded 3-edge policy—not certified sufficient for every business requirement or edit. TSX, JavaScript, and other languages use Bounded Source Inspection instead.
2. Bounded Source Inspection (context_mode: "source")
Applied explicitly via context_mode: "source", when include_source / source_start_line / source_line_limit are provided, or for non-TypeScript targets (.php, .py, .go, .rs, .java, .cs, .rb, .js, .tsx, .vue, .astro, .svelte).
- Reads lines inside the indexed declaration (
source_line_limitdefaults to120, max200). - Verifies current disk content against the indexed SHA-256 hash before returning lines, reporting
source_slice.status(current,stale,invalid_range,unavailable,out_of_scope,ambiguous). - Truncated slices supply
next_start_lineso agents can read subsequent sections cleanly. - Setting
include_source: falsereturns declaration metadata and injected/outbound hints without source text.