Commit ecd2947
feat(examples-chat): App mode — itinerary map cockpit on the langgraph canonical demo (#772)
* docs(spec): App mode on the langchain canonical demo — itinerary cockpit
Design for porting the ag-ui App-mode map/itinerary cockpit to
examples/chat (langgraph), single shared agent. Key divergence:
itinerary lives in graph state (per-thread checkpoint) alongside
messages, synced client-authoritatively via input.state + updateState;
no localStorage. Local-first; deploy deferred.
* docs(spec): drop seed data — empty start, agent builds the plan
No seed/seeding: a fresh thread starts empty; users prompt the agent
(via welcome suggestions) to generate a trip plan. Adds a first-class
Planner behavior & prompt-tuning section (recommend + populate app state
via client tools), empty-state CTA, and empty-thread live gate.
* docs(plan): implementation plan — App mode on the langchain canonical demo
16 tasks across 5 phases (spike → backend state/planner → frontend port
→ shell/wiring → verify). TDD, subagent-executable, local-first.
* feat(chat-graph): spike client-tool binding + client-tool-aware routing (#itinerary)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(chat-graph): add itinerary Stop state channel
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(chat-graph): planner framing + itinerary context injection when client tools present
* feat(examples-chat): wire Google Maps key via inject-env (local only)
Mirrors examples/ag-ui/angular: inject-env.mjs reads GOOGLE_MAPS_API_KEY/
GOOGLE_MAPS_MAP_ID from the repo-root .env and writes a gitignored
generated-keys.local.ts, swapped in via project.json fileReplacements.
Ships empty in CI; local/preview builds get the real value.
* feat(examples-chat): port map-bounds, geocoding, google-maps-loader
* feat(examples-chat): port ItineraryStore — empty start, value hydration, no localStorage
* feat(examples-chat): port itinerary panel/map/day-card/clear-day UI (langgraph agent)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(examples-chat): port itinerary client tools (drop get_itinerary, use demo agent)
Copies examples/ag-ui/angular/src/app/client-tools.ts into examples/chat/angular,
removing the get_itinerary tool, ITINERARY_AGENT ref, and ItineraryState interface
since the chat demo's DEMO_AGENT_REF/DemoState already covers agent typing and the
model now sees itinerary state via injected graph-state context instead of a
read round-trip.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(examples-chat): sync itinerary — submit state + value hydration + SDK checkpoint push
* fix(examples-chat): import vitest globals in client-tools.spec (build compiles specs)
tsconfig.app.json includes src/**/*.ts, so spec files are type-checked in
the AOT build; the T8 client-tools.spec relied on ambient describe/it/expect
and broke the build. Import them explicitly, matching sibling specs.
* feat(examples-chat): App-mode toggle + map-compatible routing (embed↔sidebar coercion)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(examples-chat): App-mode cockpit layout (map bg + itinerary overlay + sidenav→drawer)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(examples-chat): wire client tools + cockpit into modes; context-aware welcome suggestions
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix(examples-chat): drop dangling get_itinerary reference in client-tool error strings
get_itinerary was removed (the model sees the itinerary via injected graph
context); the move_stop/reorder_stop 'not found' errors no longer point at
a nonexistent tool.
* test(examples-chat): e2e App-mode cockpit (empty state + embed coercion)
* fix(examples-chat): reliably persist itinerary to checkpoint (retry mid-run 409)
The live gate caught that reload lost the trip: the client-tool resume loop
keeps the agent loading for the whole plan, so the run-gated updateState push
never fired with the final itinerary and the checkpoint kept the empty list
sent at first submit. Drop the isLoading gate and retry the updateState on the
409 a mid-run write returns until the run settles, so the final itinerary
always lands. Also guard hydration so a behind/empty server snapshot can't wipe
a populated local working copy mid-plan. Verified live: plan → reload restores.
* fix(examples-chat): retry checkpoint push only on 409, capped (review)
Address final-review findings: the retry now discriminates — only a mid-run
409 (conflict) is retried, and only up to MAX_PUSH_RETRIES, so a persistently
failing thread (404/auth/500) can't spin an unbounded background loop. Track
the retry timer, and correct the now-stale run-gated/500ms comment. Adds
isConflict unit tests.
* feat(examples-chat): dark map via colorScheme, drop cloud-style dependency
The map's dark theme was a cloud-based map style bound to a specific GCP
Map ID — brittle (lives in the Console, tied to one project/billing acct,
invisible to git). Replace it with an in-code colorScheme: DARK on the
vector map, which keeps AdvancedMarkers, works with any mapId (incl. the
DEMO_MAP_ID fallback), and is version-controlled + project-independent.
Kept as a plain string so the field carries no runtime google.maps
reference (map-canvas builds under jsdom in the shell specs).
* feat(examples-chat): map light/dark follows the app color scheme
The map now tracks the app's light/dark toggle (the <html data-color-scheme>
the shell reflects), not the gen-UI mode. mapColorScheme is derived from a
MutationObserver-backed signal; since Google's colorScheme is init-only, the
template remounts <google-map> via a scheme-keyed @for when it flips.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 26a517c commit ecd2947
45 files changed
Lines changed: 4053 additions & 66 deletions
File tree
- docs/superpowers
- plans
- specs
- examples/chat
- angular
- e2e
- public
- scripts
- src
- app
- modes
- shell
- environments
- python
- src
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
Lines changed: 1049 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 156 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
8 | 15 | | |
9 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
49 | 59 | | |
50 | 60 | | |
51 | 61 | | |
52 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
53 | 69 | | |
54 | 70 | | |
55 | 71 | | |
| |||
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
83 | 103 | | |
84 | 104 | | |
85 | 105 | | |
| |||
89 | 109 | | |
90 | 110 | | |
91 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
92 | 115 | | |
93 | 116 | | |
94 | 117 | | |
| |||
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments