AgentKernel class

The agent kernel — coordinates mission coalescing, cancellation, and partial-salvage (issue #388).

Single-Isolate Assumption (FR-009)

This kernel operates within a single Dart isolate. All missions, coalescing groups, and resource handles live in the same isolate's memory. Concurrency is cooperative (async/await on the event loop), not parallel. For multi-isolate pool support, override MissionExecutor with an implementation that proxies work over SendPort/ReceivePort — the kernel's coordination logic is unchanged.

Constructors

AgentKernel({KernelConfig config = const KernelConfig(), MissionExecutor? executor, PartialSalvager? salvager})

Properties

activeGroups Map<String, CoalescingGroup>
Active coalescing groups (canonical-key → group).
no setter
hashCode int
The hash code for this object.
no setterinherited
idempotencyCache IdempotencyCache
Idempotency cache (exposed for testing).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel(String missionId) Future<MissionOutcome>
Cancels a mission by id and returns the salvaged result (FR-003, FR-004, FR-005, FR-006).
introspect() IntrospectionSnapshot
Returns introspection data (FR-008).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
submit(Mission mission, {void onEvent(MissionEvent event)?}) Future<MissionOutcome>
Submits a mission. If an active coalescing group exists for the mission's key, the caller subscribes to that group's event stream and receives the same events. Otherwise, a new group is created and the mission executes once (FR-001, FR-002).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited