1
0
mirror of https://github.com/go-micro/go-micro.git synced 2026-04-30 19:15:24 +02:00
Commit Graph

4020 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] b6be7e942e Add clarifying comments for dual metadata handling paths
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-13 14:15:37 +00:00
copilot-swe-agent[bot] 680de3a536 Apply code formatting with gofmt
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-13 14:13:30 +00:00
copilot-swe-agent[bot] 4aaba87ec3 Add --header and --metadata flags to micro call command
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-13 14:12:03 +00:00
copilot-swe-agent[bot] 233df2a626 Initial plan 2026-02-13 14:05:41 +00:00
Copilot abc7e3e052 Add MCP tools registry and agent playground to README and docs navigation (#2856)
* Initial plan

* Add MCP tools registry and agent playground to README and docs navigation

Co-authored-by: asim <17530+asim@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-12 17:56:02 +00:00
Asim Aslam 759ad1de50 x 2026-02-12 10:59:51 +00:00
Asim Aslam 92b9f84d79 x 2026-02-12 10:55:13 +00:00
Asim Aslam 3a605c461d x 2026-02-12 10:45:13 +00:00
Asim Aslam de615e0573 x 2026-02-12 10:34:53 +00:00
Asim Aslam 9d9968d66b scopes 2026-02-12 10:33:15 +00:00
Asim Aslam 9c3e883dff add safe names for tools 2026-02-12 10:15:57 +00:00
Asim Aslam 33e828acdd x 2026-02-12 10:11:58 +00:00
Asim Aslam a2442fa72e x 2026-02-12 10:07:20 +00:00
Asim Aslam c9a3584656 update docs 2026-02-12 10:01:26 +00:00
Asim Aslam 22fa349d5f . 2026-02-12 09:56:19 +00:00
Asim Aslam 2c7f612178 . 2026-02-12 09:55:18 +00:00
Copilot 06608d354e Add Anthropic model support to the agent (#2855)
* Initial plan

* Add MCP Playground page to web UI with tool discovery and calling

- Add playground.html template with chat-style agent prompt interface
- Add /playground route handler in server
- Add /api/mcp/tools endpoint to list available MCP tools
- Add /api/mcp/call endpoint to invoke MCP tools via RPC
- Add Playground link to sidebar navigation
- Playground auto-discovers services from registry and renders them as
  callable tools with input forms and activity logging

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Add playground.html template and fix .gitignore micro pattern

Fix .gitignore pattern 'micro' -> '/micro' to only ignore root-level
binary, not paths containing 'micro' as a component.

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Address code review: use crypto/rand for trace IDs, fix var redecl, remove dup comment

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Rename Playground to Agent, fix styling, add LLM-powered prompt

- Rename /playground to /agent, move Agent link to top of sidebar menu
- Fix template styling: use existing form/input/button CSS from styles.css
  instead of inline styles and form-plain class
- Add /api/agent/settings GET/POST endpoints for model API key, model
  name, and base URL configuration (stored in server store)
- Add /api/agent/prompt POST endpoint that sends user prompt to
  OpenAI-compatible LLM API with tool definitions from registry,
  executes any tool calls via RPC, and returns results with a
  follow-up LLM summary
- Show available tools in a table using existing table styles
- Prompt section is placed above settings for primary workflow

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Address code review: handle unmarshal errors, extract system prompt, improve param descriptions

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Add Anthropic model support to the agent

Support both OpenAI and Anthropic APIs in the agent prompt handler:
- Add provider selector (OpenAI/Anthropic) to settings UI and backend
- Auto-detect provider from base URL when not explicitly set
- Anthropic: use /v1/messages endpoint, x-api-key header, input_schema
  format for tools, content blocks for responses, tool_use/tool_result
  message format for follow-ups
- OpenAI: unchanged /v1/chat/completions with Bearer auth
- Default models: gpt-4o (OpenAI), claude-sonnet-4-20250514 (Anthropic)
- Provider-specific defaults for base URLs

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Remove duplicate Anthropic follow-up message construction

Co-authored-by: asim <17530+asim@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-12 09:32:27 +00:00
Copilot d8269fbdfb Document MCP integration and tool scopes implementation status (#2852)
* Initial plan

* Add comprehensive project status analysis and update roadmap

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Add executive summary of project status

Co-authored-by: asim <17530+asim@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-12 07:24:31 +00:00
Copilot ac47a4650a MCP gateway: add per-tool scopes, tracing, rate limiting, and audit logging (#2850)
* Initial plan

* Add MCP per-tool scopes, tracing, rate limiting, and audit logging

- Add Scopes field to Tool struct for per-tool scope requirements
- Add Auth (auth.Auth) integration to Options for token inspection
- Add trace ID generation (UUID) propagated via metadata to downstream RPCs
- Add per-tool rate limiting with configurable requests/sec and burst
- Add AuditFunc callback for immutable tool-call audit records
- Extract tool scopes from registry endpoint metadata ("scopes" key)
- Update both HTTP and stdio transports with auth/trace/rate/audit
- Add comprehensive tests for all new functionality

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Revert unrelated example go.mod changes

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Remove auto-generated example go.sum files

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Add WithEndpointScopes helper, gateway-level ToolScopes, and documentation

- Add server.WithEndpointScopes() for declaring per-endpoint auth scopes at
  handler registration time
- Add mcp.Options.ToolScopes for gateway-level scope overrides without
  changing individual services
- Update documented example to show WithEndpointScopes usage
- Update examples/mcp/README.md with scopes, tracing, and rate-limiting docs
- Update gateway/mcp/DOCUMENTATION.md with scopes section and FAQ
- Add tests for both new features

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Fix ToolScopes doc comment: clarify override (not merge) semantics

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Revert unrelated example go.mod/go.sum changes

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Rename ToolScopes to Scopes in MCP Options

The field name "Scopes" is more universal and consistent with how
auth scopes are used throughout go-micro. Updated all code references,
tests, and documentation.

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* MCP gateway: add per-tool scopes, tracing, rate limiting, and audit logging

Co-authored-by: asim <17530+asim@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-11 21:01:31 +00:00
asim f1cba0d617 update index 2026-02-11 15:30:35 +00:00
asim c658126b28 update index 2026-02-11 15:28:16 +00:00
asim 0d69e24a24 further mcp integrations 2026-02-11 14:29:26 +00:00
asim fe76f3ddb5 further mcp integrations v5.16.0 2026-02-11 14:12:21 +00:00
asim 3986738e2c stdio MCP transport and gateway refactor
Implement Q2 2026 roadmap items for AI-native microservices:

MCP stdio transport:
- JSON-RPC 2.0 over stdio for Claude Code integration
- Methods: initialize, tools/list, tools/call
- Auto-detection: stdio (no address) vs HTTP/SSE (with address)

micro mcp command:
- 'micro mcp serve' - start MCP server (stdio or HTTP)
- 'micro mcp list' - list available tools
- 'micro mcp test' - test a tool (placeholder)
- Enables Claude Code users to add microservices as tools

Gateway refactor:
- Created gateway/api package (reusable, 150 lines)
- Moved gateway logic from cmd/micro/server/gateway.go
- HandlerRegistrar pattern for flexibility
- cmd/micro/server/gateway.go now compatibility wrapper (72 lines)
- 50% code reduction, better separation of concerns
- Library users can now use gateway in custom apps

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 13:38:27 +00:00
asim e58d51c3ef update version in readme 2026-02-11 13:15:16 +00:00
asim bed7c4cc57 fix tests 2026-02-11 12:59:18 +00:00
asim e7335f945a noop auth fixed 2026-02-11 11:46:02 +00:00
asim 46e9940443 new 2026 roadmap 2026-02-11 11:37:14 +00:00
asim c9e582b966 go fmt 2026-02-11 11:25:43 +00:00
asim 7da9e58c81 fully functioning auth 2026-02-11 11:25:36 +00:00
Asim Aslam b1c63fa4ef Add MCP Integration section to README 2026-02-11 11:13:06 +00:00
asim e311586bd2 update mcp doc location 2026-02-11 11:09:04 +00:00
asim bc9d8c9a2b update mcp doc location 2026-02-11 11:03:13 +00:00
asim e2e0a9126f update mcp doc location 2026-02-11 11:00:49 +00:00
asim 4acb55733d update mcp doc location 2026-02-11 10:59:50 +00:00
asim 42efe1862a fix mcp exampl v5.15.0 2026-02-11 10:46:47 +00:00
asim 8d0180aef1 v5.15.0: Unified Gateway Architecture + MCP Support
Major Features:
- Unified gateway architecture (micro run + micro server use same code)
- MCP (Model Context Protocol) integration as library package
- AI-accessible microservices with 3 lines of code

Gateway Unification:
- Created reusable gateway module (cmd/micro/server/gateway.go)
- Updated micro run to use unified gateway (removed duplicate code)
- Conditional authentication (disabled in dev, required in prod)
- Reduced code duplication, simplified maintenance

MCP Integration:
- New library package: gateway/mcp
- Automatic service discovery → MCP tools
- HTTP/SSE transport support (stdio coming soon)
- Works for both library users and CLI users
- CLI flags: --mcp-address for micro run and micro server

Documentation:
- ADR-010: Unified Gateway Architecture
- CLI & Gateway Guide for users
- MCP Gateway README and examples
- Blog post: Making Your Microservices AI-Native with MCP

Breaking Changes: None (fully backward compatible)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 10:43:14 +00:00
asim ee76eb6d2c v5.15.0: Unified Gateway Architecture + MCP Support
Major Features:
- Unified gateway architecture (micro run + micro server use same code)
- MCP (Model Context Protocol) integration as library package
- AI-accessible microservices with 3 lines of code

Gateway Unification:
- Created reusable gateway module (cmd/micro/server/gateway.go)
- Updated micro run to use unified gateway (removed duplicate code)
- Conditional authentication (disabled in dev, required in prod)
- Reduced code duplication, simplified maintenance

MCP Integration:
- New library package: gateway/mcp
- Automatic service discovery → MCP tools
- HTTP/SSE transport support (stdio coming soon)
- Works for both library users and CLI users
- CLI flags: --mcp-address for micro run and micro server

Documentation:
- ADR-010: Unified Gateway Architecture
- CLI & Gateway Guide for users
- MCP Gateway README and examples
- Blog post: Making Your Microservices AI-Native with MCP

Breaking Changes: None (fully backward compatible)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 10:40:48 +00:00
Copilot 8d7eb01fb3 Add hosting.md documentation for go-micro services (#2848)
* Initial plan

* Add hosting.md documentation for go-micro services hosting options

Co-authored-by: asim <17530+asim@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
2026-02-11 10:10:05 +00:00
asim a38d7df106 go fmt 2026-02-04 14:37:40 +00:00
asim f9ba48897a fix build 2026-02-04 14:37:29 +00:00
Asim Aslam 547507b1a2 x 2026-02-04 14:14:41 +00:00
Asim Aslam 3bf02c634c x 2026-02-04 14:14:14 +00:00
Asim Aslam bab115a0bf dev UX optimisations 2026-02-04 14:12:59 +00:00
Asim Aslam 29ea3a21d6 update docs for dev UX 2026-02-04 14:01:16 +00:00
Asim Aslam bce53ce15e move all docs 2026-02-04 13:57:33 +00:00
Asim Aslam b867e490a0 fix docs reference points 2026-02-04 13:55:43 +00:00
Asim Aslam 48da4d3559 Removing genai as not relevant to microservices. 2026-02-04 13:42:59 +00:00
Asim Aslam 0cb85bf103 Add Discord link to README
Added Discord link to the README for community engagement.
2026-02-04 13:25:22 +00:00
Copilot a100a47340 Fix google.protobuf.Any JSON marshaling missing @type field (#2845)
* Initial plan

* Update JSON codec to use modern protojson for proper Any type support

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Add comprehensive tests for google.protobuf.Any JSON marshaling

Co-authored-by: asim <17530+asim@users.noreply.github.com>

* Revert codec/proto to old protobuf package for backward compatibility

Co-authored-by: asim <17530+asim@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: asim <17530+asim@users.noreply.github.com>
v5.14.0
2026-02-04 09:33:27 +00:00