codex/devrel-3530
3 次代码提交
| 作者 | SHA1 | 备注 | 提交日期 | |
|---|---|---|---|---|
|
|
550033dcce |
Optimize image formats and fix lease re-registration issue (#2959)
* perf: convert generated PNGs to optimized JPEGs (12MB -> 1.5MB) The landing and docs loaded 18 AI-generated PNGs at 0.5-1MB each. They're 1200x800 RGB illustrations with no transparency, so they recompress ~8x as progressive JPEG (quality 82) with no visible loss. Convert all, update every reference (.png -> .jpg), and drop the originals (including the unused hero.png). Generated images: 12.3MB -> 1.5MB. * fix(registry/etcd): re-register when a lease silently expires (#2956) The keepalive rework (long-lived KeepAlive instead of KeepAliveOnce) moved lease renewal entirely onto the keepalive goroutine; the 30s periodic Register now skips on the 'unchanged' check. The goroutine only reacted to the keepalive channel closing, so a lease that expired server-side without a prompt channel close (e.g. a partition that outlasted the 90s TTL) left the node de-registered from etcd while the cache still believed it was registered — and nothing re-registered it. That is the hidden-failure mode reported in #2956. React to a non-positive TTL keepalive response the same as a channel close: drop the cached lease/hash so the next Register performs a full re-registration. Extract the loop into keepAliveLoop and unit-test the TTL-expired, channel-closed, and healthy paths (no etcd required). --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
c26d74a8a1 |
Add CRUD, pub/sub, and API gateway templates; update AI features (#2909)
* feat(website): redesign docs and blog layouts, add blog header images Redesign both layouts to match the new landing page: - Consistent nav bar with logo, Docs, Blog, GitHub, Reference, Home - Consistent footer with copyright and links - CSS custom properties for theming - Updated typography, spacing, and code block styling - Active sidebar link highlighting in docs - Dark mode support preserved Generate 4 blog header images via Atlas Cloud: - blog-deploy.png for post 1 (micro deploy) - blog-mcp.png for posts 2, 3, 7 (MCP-related) - blog-agents-demo.png for post 4 (agents demo) - blog-dx.png for post 5 (DX cleanup) - Reuse data-model.png for post 6 (model package) All 7 existing blog posts now have header images. * fix(website): prevent horizontal scroll on mobile landing page Add overflow-x: hidden on html and body. Set max-width: 100% and height: auto on all section and two-col images. Add overflow: hidden to .two-col grid. Constrain hero pre with max-width and overflow-x. Reduce font sizes and padding at mobile breakpoint. * feat(website): add images to remaining core doc pages Generate 5 more images via Atlas Cloud for docs: - registry.png: service discovery diagram - broker.png: pub/sub message broker pattern - transport.png: multi-transport layers (HTTP, gRPC, NATS) - config.png: dynamic configuration from multiple sources - observability.png: monitoring dashboard with metrics/traces Add images to registry.md, broker.md, transport.md, config.md, observability.md, and architecture.md. All 11 main doc pages now have header images. * feat: add sponsor logos to landing page, README images, and flows blog post Add Anthropic and Atlas Cloud sponsor logos to the landing page with links to their respective blog posts. Logos display at 0.7 opacity with hover effect. Add architecture and MCP agent images to the GitHub README for the Overview and MCP sections. Write blog post 9: "From Chat to Flows" — explores the concept of LLM-powered service orchestration. Compares micro chat's interactive model with persistent event-driven flows, shows how the existing building blocks (ai/tools, History, broker) could compose into a flow engine, discusses tradeoffs vs traditional orchestration (Step Functions, Temporal), and includes a working 15-line code example. Explicitly positions it as a concept for community feedback, not an announcement. * feat(website): add animated hero video to landing page Generate a 6-second hero video via Atlas Cloud's image-to-video API (gemini-omni-flash). Shows the microservices network diagram animating with data flowing between nodes. Replace the static hero image with an autoplay muted looping video element. Falls back to the static image via poster attribute and img fallback for browsers without video support. * feat(ai): add VideoModel interface with Atlas Cloud provider Add ai.VideoModel interface for video generation alongside Model and ImageModel. Supports text-to-video and image-to-video via VideoRequest with prompt, reference images, duration, aspect ratio, and resolution fields. Implement GenerateVideo for Atlas Cloud using their async API: POST /api/v1/model/generateVideo → poll /api/v1/model/prediction. Default model is gemini-omni-flash image-to-video. Polls every 5 seconds until completion or context cancellation. Register Atlas Cloud as a video provider via ai.RegisterVideo. Add 3 tests: registration, no-key error, compile-time interface check. Update ai/README.md with VideoModel docs. The ai package now covers all three modalities: - Model (text) — 7 providers - ImageModel (image) — 2 providers (Atlas Cloud, OpenAI) - VideoModel (video) — 1 provider (Atlas Cloud) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
ffe43e0e6d |
Claude/update docs roadmap f zd2 j (#2871)
* docs: update all four documentation guides and mark Q2 complete - ai-native-services: add WithMCP one-liner, standalone gateway, WebSocket client example, and OpenTelemetry observability section - mcp-security: add OTel distributed tracing, WebSocket authentication (connection-level and per-message), DeniedReason audit field - tool-descriptions: add manual overrides with WithEndpointDocs and export formats section - agent-patterns: add LangChain/LlamaIndex SDK pattern and standalone gateway production pattern with Docker example - Update roadmap: mark Q2 documentation as complete, Q2 at 100% - Update status: reflect all recent completions, shift priorities https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * feat: add agent demo example and blog post Add examples/agent-demo with a multi-service project management app (projects, tasks, team) that demonstrates AI agents interacting with Go Micro services through MCP. Includes seed data and example prompts. Add blog post 4 "Agents Meet Microservices: A Hands-On Demo" walking through the example code and showing cross-service agent workflows. https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc --------- Co-authored-by: Claude <noreply@anthropic.com> |