This repository was archived by the owner on Apr 18, 2026. It is now read-only.
feat(scripting): ag-ui session adapter + M1 API migration#186
Open
runyaga wants to merge 3 commits into
Open
Conversation
AgUiSessionAdapter merges six source observables into a single Stream<BaseEvent>: - Stream<BridgeEvent> → 1:1 base events (via AgUiBridgeAdapter) + ACTIVITY_SNAPSHOT CustomEvents (via ActivitySnapshotMapper) - AgentSession.runState → STATE_SNAPSHOT + STATE_DELTA at agent.run - AgentSession.sessionState → STATE_SNAPSHOT + STATE_DELTA at agent.session - AgentSession.lastExecutionEvent → execution.* CustomEvents - StatefulPluginObservation signals → STATE_SNAPSHOT + STATE_DELTA at plugin.<key> - AgUiHttpObserver → http.* CustomEvents (REST + SSE via same observer) New types: - AgUiSessionAdapter — orchestrates all sources, owns lifecycle - StatefulPluginObservation — key + signal pair for plugin state - ActivitySnapshotMapper — BridgeEvent → ACTIVITY_SNAPSHOT with locked vocabulary (run_start/end/error, skill_tool_start/args/result) - StateSignalTracker — first emission → StateSnapshotEvent, subsequent → StateDeltaEvent (RFC 6902 replace patch) - AgUiHttpObserver — implements HttpObserver, emits http.* CustomEvents A5 (encodeFrame) is already provided by ag_ui's EventEncoder.encodeSSE. A6 (PluginRegistry.statefulObservations) and A7 (MontyScriptEnvironment wiring) follow after dart_monty M1 merges. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Delete layer0–layer2 integration tests that broke due to dart_monty sub-package migration; upgrade dart_monty ref to latest main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- MontyResult.value is now MontyValue (non-nullable); replace Map literals
with MontyDict/MontyString/MontyBool/MontyList subtypes
- BridgeTextStart/Content/End removed; collect output from
BridgeRunFinished.printOutput instead
- MontyBridge.register now takes {String? category}; add registerOs and
schemasByCategory to test fakes
- MockMontyPlatform call history moved to mock.history.*
(lastRunCode, lastStartCode, lastStartExternalFunctions, etc.)
- buildIntrospectionFunctions returns [help] only (list_functions removed);
update count assertions from +2 to +1 introspection
- MontyValue.dartValue used for text extraction in MontyExecutionService
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AgUiSessionAdapter,ActivitySnapshotMapper,StateSignalTracker,AgUiHttpObserverinsoliplex_scripting/lib/src/agui/— merges bridge events, agent signals, plugin state signals, and HTTP observer into a singleStream<BaseEvent>soliplex_interpreter_montyandsoliplex_scriptingtests to the dart_monty M1 API —MontyValuetyped results,BridgeRunFinished.printOutputoutput model,mock.history.*call history, updatedMontyBridgeinterface (register({category}),registerOs,schemasByCategory), introspection count −1 (list_functionsremoved)Test plan
dart testinsoliplex_interpreter_monty— 54 tests passdart testinsoliplex_scripting— 189 tests passdart analyze --fatal-infosin both packages — 0 issues🤖 Generated with Claude Code