Commit Graph

12 Commits

Author SHA1 Message Date
Jordan Ritter 1fcc49e100 feat: remove open-genui rendering from starter template and registry 2026-04-15 16:37:56 -07:00
Jordan Ritter eecb252263 fix: resolve remaining starter crashes — ESM resolution, recursive chown, mastra version pins
1. Remove nested agent/package.json in TypeScript Dockerfile template to
   prevent ESM module resolution failure (claude-sdk-typescript)
2. Use chown -R for /app in all Dockerfile templates so runtime-created
   dirs (e.g. /app/src/mastra/public) are writable by non-root user
3. Pin mastra ecosystem deps to stable versions (1.6.0/1.25.0) in
   generation script — floating beta tags caused version drift between
   mastra CLI and @mastra/core
2026-04-15 15:57:17 -07:00
Jordan Ritter cffecf1fc1 fix: resolve 3 starter crash root causes — Docker home dir, path depth, import rewriting
1. EACCES on /home/app: Dockerfile templates now create home dir for
   non-root user before USER app (langgraph-ts, claude-sdk-ts, mastra)
2. IndexError Path.parents[4]: search_flights.py schema fallback now
   guards against shallow Docker paths (agno, claude-sdk-py, ms-agent-py)
3. Wrong import path: rewritePythonImports() now converts
   from agents.X to relative imports in starter agent dirs (langroid, crewai)
2026-04-15 09:27:08 -07:00
Jordan Ritter 580a3e9214 fix: langgraph-python starter agent — permissions, imports, and tools.py naming collision
Root causes (verified locally with docker build + run):
1. PermissionError: non-root user can't write .langgraph_api dir — fix: chown -R app:app /app
2. ImportError: relative imports fail in langgraph_cli context — fix: absolute imports
3. ValueError: tools.py and tools/ directory collision — fix: rename to tool_wrappers.py

Tested: docker run returns {"status":"ok","agent":"ok"}
2026-04-14 17:06:02 -07:00
Jordan Ritter 203e0adc9c fix: align langgraph-python starter with working demo package layout (#3907)
## Summary

- The langgraph-python starter crashes on Railway because `langgraph_cli
dev --config agent/langgraph.json` can't resolve module paths when
agents live in `agent/` with `dependencies: ["."]` pointing to `/app`
- Restructured starter to match the demo package's **proven working
layout**: agents in `src/agents/`, `langgraph.json` at project root,
entrypoint referencing root config
- Templatized `Dockerfile.python` with `{{AGENT_DIR}}` and
`{{DOCKER_EXTRA_COPY}}` variables so the generator handles different
agent directory structures
- Updated tests to use framework `agentDir` instead of hardcoding
`"agent"`
- All 17 starters regenerated, 518 tests passing

## Test plan

- [ ] Deploy langgraph-python starter to Railway — should return 200
like the demo package
- [ ] Verify other Python starters still build/deploy (Dockerfile
template changed for all)
- [ ] `npx tsx generate-starters.ts --check` passes
- [ ] All vitest suites pass: generate-starters.test.ts (248) +
starter-consistency.test.ts (270)
2026-04-14 15:29:03 -07:00
Jordan Ritter c8b5bfd890 fix: wider starter hero section, sticky renderer selector above sidebar 2026-04-14 15:26:24 -07:00
Jordan Ritter 8ca2b38557 fix: responsive iframe height and scrollable starter content 2026-04-14 15:07:00 -07:00
Jordan Ritter 695c945d3e fix: align langgraph-python starter with working demo package layout
The langgraph-python starter crashes on Railway because of a directory
structure mismatch: agents were in agent/ with langgraph.json inside
agent/, causing langgraph_cli to fail resolving module paths.

Match the demo package's working layout:
- Move agents from agent/ to src/agents/ (same as demo)
- Put langgraph.json at project root (same as demo)
- Point entrypoint at root langgraph.json instead of agent/langgraph.json
- Templatize Dockerfile.python with AGENT_DIR and DOCKER_EXTRA_COPY vars
- Skip langgraph.json path rewriting when agentDir matches agentSourceDir
- Update tests to use framework agentDir instead of hardcoding "agent"

Regenerate all 17 starters.
2026-04-14 14:37:37 -07:00
Jordan Ritter 32794abc71 fix: make adduser idempotent in all Dockerfile templates, regenerate starters 2026-04-14 14:26:32 -07:00
Jordan Ritter d6b865cb3a fix: add AG-UI SDK build-from-source step to spring-ai Dockerfile
The com.ag-ui.community artifacts aren't published to Maven Central,
so the Docker build fails when resolving dependencies. The demo package
Dockerfile already handles this by cloning the ag-ui repo and running
mvn install before building the agent — mirror that in the template
and regenerate the starter.
2026-04-14 14:10:03 -07:00
Jordan Ritter 55932c5441 fix: correct starter Dockerfiles for spring-ai (mvnw), ms-agent-dotnet (adduser), mastra (agent dir)
spring-ai: Use maven:3-eclipse-temurin-21 image with mvn instead of
missing ./mvnw wrapper.

ms-agent-dotnet: Replace addgroup/adduser (not available on aspnet:9.0)
with groupadd/useradd. Applied same fix to all four Dockerfile templates
for consistency.

mastra: Make Dockerfile.typescript template use {{AGENT_DIR}} variable
so mastra correctly gets src/mastra/ instead of hardcoded agent/.
Updated generate-starters.ts to substitute variables in Dockerfiles.
2026-04-14 13:48:11 -07:00
Jordan Ritter 7012a7e07b feat: add starter template, generation script, and comprehensive test suite
Canonical template at showcase/starters/template/ with Sales Dashboard
hero page, 5 GenUI rendering strategies, per-language Dockerfiles
(non-root user, agent health checks), and self-contained agent backends.

Generation script at showcase/scripts/generate-starters.ts:
- Python sys.path.insert removal + relative import rewriting
- TypeScript shared-tools import rewriting
- Deterministic output (sorted devDependencies, stable file ordering)
- --check mode for CI drift detection
- Strict error handling (throws on missing required inputs)

537 tests: generation unit tests (transform functions, entrypoint blocks),
cross-starter consistency checks (270), Playwright e2e interaction tests
(renderer switching, deal creation, suggestion verification).
2026-04-14 12:51:44 -07:00