Commit e8541da
feat(ag-ui): FakeAgent for offline cockpit demo (#140)
* docs: AG-UI FakeAgent implementation plan
5 tasks: implement FakeAgent + spec, provideFakeAgUiAgent + spec,
public-api exports, cockpit demo rewiring, verify + PR.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(ag-ui): FakeAgent + provideFakeAgUiAgent for offline demos
In-process AbstractAgent subclass that emits a canned streaming
response. Drop-in replacement for provideAgUiAgent({ url }) when
no real backend is available. Tests cover event ordering, token
streaming, and unsubscribe cancellation.
Deviation from plan: FakeAgent.run() is public (not protected) to
satisfy AbstractAgent's public abstract signature in @ag-ui/client@0.0.53.
Spec calls agent.run() directly rather than via (agent as any).run().
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* feat(cockpit): wire AG-UI streaming demo to FakeAgent
Demo runs end-to-end with no backend or network. Real-backend wiring
is one line away via provideAgUiAgent({ url: ... }).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* chore: override rxjs version to dedupe @ag-ui/client's nested install
@ag-ui/client@0.0.52 pins rxjs@7.8.1 exactly, which caused npm to
install rxjs in two locations (top-level 7.8.2 and nested 7.8.1
under node_modules/@ag-ui/client/). TypeScript saw the two Observable
types as incompatible across module boundaries when the AG-UI adapter
tried to subscribe to source.agent().
The npm override forces all rxjs resolutions to follow the project's
~7.8.0 range, deduping to a single hoisted install. ABI-compatible.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: preserve cross-platform swc bindings in lockfile after rxjs override
Previous commit (43ad74f) regenerated package-lock.json on macOS,
which silently dropped optional platform-specific @next/swc-* bindings
for non-darwin platforms. CI on Linux failed with 'Failed to load
native binding' on apps/cockpit/next.config.ts and apps/website/.
Restore main's lockfile then surgically remove only the nested
@ag-ui/client/node_modules/rxjs entry (the override target). Verified:
all 24 @next/swc-* entries present, single hoisted rxjs, npm ci passes
on clean checkout.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 68dce15 commit e8541da
9 files changed
Lines changed: 621 additions & 12 deletions
File tree
- cockpit/ag-ui/streaming/angular/src/app
- docs/superpowers/plans
- libs/ag-ui/src
- lib/testing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
0 commit comments