codex/devrel-3152
6 次代码提交
| 作者 | 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> |
||
|
|
c4b4cbef25 |
refactor(ai): rename ToolSet to Tools, simplify wiring with WithTools (#2917)
Move tool discovery/execution fully into the ai package as ai.Tools (formerly ai.ToolSet), and simplify the usage model: - NewTools(reg, ai.ToolClient(c)) takes the execution client as an option instead of threading it through Handler(c) per call - New ai.WithTools(tools) option wires the tool handler into a model in one call, replacing ai.WithToolHandler(set.Handler(c)) - ai.DiscoverTools(reg) for one-shot discovery Before: set := ai.NewToolSet(reg) list, _ := set.Discover() m := ai.New(p, ai.WithToolHandler(set.Handler(client))) After: tools := ai.NewTools(reg, ai.ToolClient(client)) list, _ := tools.Discover() m := ai.New(p, ai.WithTools(tools)) Update ai/flow, micro chat, README, ai integration doc, Atlas Cloud guide, and blog posts 3/8/9/10. Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
7a1ab14847 |
docs: rewrite Anthropic blog post with updated content and new header image (#2910)
goreleaser / goreleaser (push) Has been cancelled
Rewrite blog/3 to reflect current state of the project: - Update numbers (7 providers, image/video support, micro chat) - Add "What Came After" section covering everything shipped since - Tighten prose, remove stale roadmap percentages - Replace generic MCP image with Claude-themed header generated via Atlas Cloud (orange AI orb connecting to service nodes) - Streamline code examples - Update star count and Try It section 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> |
||
|
|
beeaad748e |
Claude/update docs roadmap f zd2 j (#2868)
* feat: add LlamaIndex SDK for Go Micro services Add LlamaIndex integration package that enables LlamaIndex agents to discover and call Go Micro microservices through the MCP gateway. Follows the same pattern as the existing LangChain SDK. - GoMicroToolkit with from_gateway() factory and tool filtering - FunctionTool integration via llama_index.core.tools - Auth support, error handling, and retry configuration - Examples for basic agent and RAG + microservices workflows - Unit tests with mocked gateway responses https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * docs: update status for OTel, WebSocket, and LlamaIndex SDK completion Reflect recently completed work in roadmap and status documents: - Q2 progress: 85% -> 95% (WebSocket, LlamaIndex SDK done) - Q3 progress: 40% -> 50% (OpenTelemetry integration done) - Transports: 2 -> 3 (added WebSocket) - Agent SDKs: 1 -> 2 (added LlamaIndex) - Test coverage: 568 -> 1,000+ lines https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * feat: add WithMCP convenience option, improve startup banner, and blog post - Add mcp.WithMCP(":3000") service option for one-line MCP setup - Improve `micro run` startup banner to show Agent playground, MCP tools, and WebSocket endpoints prominently - Add blog post: "Building the AI-Native Future of Go Micro with Claude" covering WebSocket transport, OTel integration, LlamaIndex SDK, and Anthropic's Claude Max sponsorship - Update blog index and navigation links https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc --------- Co-authored-by: Claude <noreply@anthropic.com> |