master
5 次代码提交
| 作者 | SHA1 | 备注 | 提交日期 | |
|---|---|---|---|---|
|
|
7d2586a2f9 |
Make micro new contract use local module (#4472)
Co-authored-by: Codex <codex@openai.com> |
||
|
|
aa7cd6dc3b |
Enhance support agent example and fix protoless service scaffolding (#2986)
goreleaser / goreleaser (push) Has been cancelled
* examples: support desk agent + blog walkthrough A real-world, runnable example (examples/support): customers/tickets/notify services become the agent's tools, a flow turns a ticket.created event into the agent's work, and an approval gate guards the one action that touches a customer. Runs with no API key (mock model) or against a live provider. Adds blog/28 'Building a Support Agent in Go' and indexes both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL * fix(new): protoless services by default; fix @latest install (#2985) micro new now scaffolds a reflection-based service by default — plain Go types registered via service.Handle, no .proto, no Makefile proto target. The generated project builds and runs with 'go run .' and zero external tooling. Protocol Buffers move behind --proto (the crud/pubsub/api templates imply it). When the proto workflow is used and protoc / protoc-gen-go / protoc-gen-micro are missing, print exact install instructions instead of failing with a cryptic plugin error. Also fixes the 'go install go-micro.dev/v6/cmd/micro@latest' version constraint conflict: the vanity go-import meta still advertised /v5, so Go fell back to the bare module and resolved an ancient v1.x tag. Advertise /v6 (keeping /v5 for existing users) and add a version-pin fallback note to the install docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL * fix(new,install): pin generated go.mod to current go-micro; lead install with prebuilt binary (#2985) - micro new now requires the exact go-micro version the CLI was built from (via build info), falling back to 'latest' for dev builds. An explicit require is also more robust than a bare import: 'go mod tidy' reliably resolves it, where a requireless go.mod could fail vanity discovery. - Make the precompiled binary (curl install.sh) the recommended install in the docs; demote 'go install' to a from-source option with the version-pin fallback note. - Sync the stale internal/scripts/install.sh to the working website script (it expected an old micro-OS-ARCH asset name; releases ship micro_OS_ARCH.tar.gz). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL * website: add corrected nginx vanity-import config (#2985) The live go-micro.dev handler echoed the full request path into the go-import prefix ($host$1), so go install go-micro.dev/v6/cmd/micro@latest got prefix go-micro.dev/v6/cmd/micro — a package, not the module root — and Go fell back to the ancient v1.x tags (version constraints conflict). Add a dedicated /vN location that emits the module root (go-micro.dev/vN) for any sub-path, and make the catch-all advertise the current module roots instead of echoing arbitrary paths. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
c7657f73f4 |
Refactor agent plan storage, update docs, and release v6 (#2977)
goreleaser / goreleaser (push) Has been cancelled
* test(harness): read agent plan from the scoped store
The store-scoping change moved an agent's plan from the default table
key agent/{name}/plan to its own table (database "agent", table {name},
key "plan"). The plan-delegate harness tests still read the old key and
failed with 'not found'; read through store.Scope(mem, "agent", name)
like the agent does.
* docs: orient agents-first across README, landing, and docs overview
Lead with agents (then services and flows), surface MCP + A2A as the
interop story, and frame agents as services. Landing hero and feature
grid reordered agents-first with an A2A gateway card.
* v6: module path go-micro.dev/v6, TLS secure by default, NewService
Cut v6. Three breaking changes, bundled so the major bump is paid once:
- Module path go-micro.dev/v5 -> go-micro.dev/v6 across all imports + go.mod.
- TLS verification on by default (was off). MICRO_TLS_SECURE removed;
MICRO_TLS_INSECURE=true opts out for self-signed/dev.
- micro.NewService(name, opts...) is the canonical service constructor,
symmetric with NewAgent/NewFlow; micro.New kept as a deprecated alias;
the old name-less NewService(opts...) removed. Generators emit NewService.
Also ports the JWT auth token provider in-module (go-micro.dev/v6/auth/jwt/token
on golang-jwt/jwt/v5), dropping the v5-pinned github.com/micro/plugins/v5/auth/jwt
and the deprecated dgrijalva/jwt-go.
Docs/README/landing updated to v6 and @latest; v5->v6 migration guide added;
CHANGELOG cut as [6.0.0]. Blog posts left at their historical versions.
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
fad2fd7af4 |
Claude/update docs roadmap f zd2 j (#2875)
* 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 * feat: enable multiple services in a single binary Remove global state mutations from service and cmd option functions so that configuring one service no longer overwrites another's settings. Key changes: - service/options.go: remove all DefaultXxx global writes from option functions; newOptions() now creates fresh Server, Client, Store, and Cache per service while sharing Registry, Broker, and Transport - cmd/cmd.go: newCmd() uses local copies instead of pointers to package globals; Before() no longer mutates DefaultXxx vars - cmd/options.go: remove global mutations from all option functions - service/service.go: export ServiceImpl type for cross-package use - service/group.go: new Group type for multi-service lifecycle - micro.go: add Start/Stop to Service interface, expose Group and NewGroup convenience function - examples/multi-service: working example with two services https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * docs: highlight multi-service binary support Add multi-service section to README with code example, update features list, add to examples index, and note in status summary. https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * feat: unify service API and clean up developer experience - Unified service creation: micro.New("name", opts...) as canonical API - Clean handler registration: service.Handle(handler, opts...) accepts server.HandlerOption args directly, no need to reach through Server() - Unexported serviceImpl: users interact through Service interface only - Service groups use Service interface (not concrete type) - Fixed Stop() to properly propagate BeforeStop/AfterStop errors - Fixed store init: error-level log instead of fatal on init failure - Updated all examples to use consistent patterns - Updated README, getting-started, MCP docs, and guides - Added blog post about the DX cleanup https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * fix: add blog post 5 to blog index Blog post 5 (Developer Experience Cleanup) existed as a file but was missing from the blog index page. https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc * feat: make micro new generate MCP-enabled services by default - main.go template includes mcp.WithMCP(":3001") by default - Handler template has agent-friendly doc comments with @example tags - Proto template has descriptive field comments - README includes MCP usage, Claude Code config, and tool description tips - Makefile adds mcp-tools, mcp-test, mcp-serve targets - go.mod updated to Go 1.22 - Added --no-mcp flag to opt out of MCP integration - Post-create output shows MCP endpoint URLs https://claude.ai/code/session_01GkduEhcrqcG45rdfYh8dAc --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
1dde737b64 | move micro cli and protoc-gen-micro to cmd/ |