Skip to main content

Module middleware

Module middleware 

Source
Expand description

Ordered middleware and capability registration.

Modules§

artifacts
Agent-published session files and their frontend presentation.
attachments
User uploads exposed to the owning workspace.
bots
Gateway-backed Bot identity and collaboration capabilities.
compaction
Context compaction policy and provider routing.
context_offloading
Durable masking of stale tool output in active model context.
extensions
Standalone skills and activated Agent Plugin packages.
instructions
Bounded workspace instruction discovery.
manifest
Core-owned middleware configuration manifests.
messages
Durable conversation-message delivery.
scratchpad
Durable session, Swarm, and global notes for agent self-improvement.
session_files
Protected, session-bound storage shared by uploads and agent artifacts.
sessions
Chat catalog, durable forking, and Bot-scoped thread search middleware.
subagents
Durable asynchronous child-agent middleware.
tasks
Optional durable todo planning.
tools
Tool registry, dispatch, and minimal filesystem tools.

Structs§

ActiveCommandContext
Mutable turn state exposed to a capability command that can run immediately.
CompactContext
State exposed immediately before or after context compaction.
FrontendExtensions
Read-only middleware UI surface consumed by a frontend shell.
MessageQueue
Mutable scoped view of messages retained until their delivery boundary.
MessageRouteContext
Mutable state exposed to the middleware preparing conversation messages.
MessageSubmitContext
Mutable state exposed before a prepared next-turn message enters durable context.
MiddlewareCommandContext
State available to a middleware-owned frontend command.
MiddlewareCommandOutput
Result of a middleware-owned frontend command.
MiddlewareStack
A validated, declaration-ordered middleware pipeline.
ModelContext
Mutable state exposed immediately before a model request.
ModelRequestContext
Request-only model input exposed after every durable PreModel hook.
PermissionRequestContext
Mutable policy boundary for a sandbox approval request.
PostToolUseContext
Mutable model-visible result exposed after an executed tool call.
PreToolUseContext
Mutable policy boundary for one normalized model-requested tool call.
PromptSection
One middleware-owned section of the assembled system prompt.
QueuedMessageSnapshot
Read-only startup snapshot containing only one middleware’s queued messages.
QueuedMessageView
Read-only queued message owned by the middleware receiving it.
RuntimeContext
Durable runtime identity exposed while middleware starts a session.
SessionStartContext
Mutable state shared by the declaration-ordered SessionStart hooks.
StopContext
Mutable policy boundary immediately before normal turn completion.
ToolExposureContext
Live capability state used to hide registered tools at a model boundary.
TurnEndContext
State exposed when the loop finishes or aborts a turn.
TurnIdentity
Stable facts shared by hooks that run within one active turn.

Enums§

SessionStartSource
Why Middleware::session_start is running.
SubmissionResult
Result of one middleware-owned submission.

Traits§

Middleware
A capability contribution to the single ordered agent pipeline.

Type Aliases§

FrontendEventSink
Sends middleware-owned UI updates without depending on a concrete frontend.