matimo 0.1.0-alpha.2 → 0.1.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/README.md +128 -548
  2. package/package.json +24 -28
  3. package/packages/cli/bin/matimo.cjs +26 -0
  4. package/packages/cli/dist/cli.d.ts +6 -0
  5. package/packages/cli/dist/cli.d.ts.map +1 -0
  6. package/packages/cli/dist/cli.js +95 -0
  7. package/packages/cli/dist/cli.js.map +1 -0
  8. package/packages/cli/dist/commands/install.d.ts +6 -0
  9. package/packages/cli/dist/commands/install.d.ts.map +1 -0
  10. package/packages/cli/dist/commands/install.js +48 -0
  11. package/packages/cli/dist/commands/install.js.map +1 -0
  12. package/packages/cli/dist/commands/list.d.ts +9 -0
  13. package/packages/cli/dist/commands/list.d.ts.map +1 -0
  14. package/packages/cli/dist/commands/list.js +70 -0
  15. package/packages/cli/dist/commands/list.js.map +1 -0
  16. package/packages/cli/dist/commands/search.d.ts +2 -0
  17. package/packages/cli/dist/commands/search.d.ts.map +1 -0
  18. package/packages/cli/dist/commands/search.js +148 -0
  19. package/packages/cli/dist/commands/search.js.map +1 -0
  20. package/packages/core/dist/src/auth/oauth2-config.d.ts.map +1 -0
  21. package/packages/core/dist/src/auth/oauth2-config.js.map +1 -0
  22. package/packages/core/dist/src/auth/oauth2-handler.d.ts.map +1 -0
  23. package/packages/core/dist/src/auth/oauth2-handler.js.map +1 -0
  24. package/packages/core/dist/src/auth/oauth2-provider-loader.d.ts.map +1 -0
  25. package/packages/core/dist/src/auth/oauth2-provider-loader.js.map +1 -0
  26. package/{dist → packages/core/dist/src}/core/schema.d.ts +12 -2
  27. package/packages/core/dist/src/core/schema.d.ts.map +1 -0
  28. package/{dist → packages/core/dist/src}/core/schema.js +20 -6
  29. package/packages/core/dist/src/core/schema.js.map +1 -0
  30. package/{dist → packages/core/dist/src}/core/tool-loader.d.ts +16 -0
  31. package/packages/core/dist/src/core/tool-loader.d.ts.map +1 -0
  32. package/packages/core/dist/src/core/tool-loader.js +205 -0
  33. package/packages/core/dist/src/core/tool-loader.js.map +1 -0
  34. package/packages/core/dist/src/core/tool-registry.d.ts.map +1 -0
  35. package/{dist → packages/core/dist/src}/core/tool-registry.js +5 -1
  36. package/packages/core/dist/src/core/tool-registry.js.map +1 -0
  37. package/{dist → packages/core/dist/src}/core/types.d.ts +15 -1
  38. package/packages/core/dist/src/core/types.d.ts.map +1 -0
  39. package/{dist → packages/core/dist/src}/core/types.js.map +1 -1
  40. package/packages/core/dist/src/decorators/index.d.ts.map +1 -0
  41. package/packages/core/dist/src/decorators/index.js.map +1 -0
  42. package/packages/core/dist/src/decorators/tool-decorator.d.ts.map +1 -0
  43. package/{dist → packages/core/dist/src}/decorators/tool-decorator.js +7 -4
  44. package/packages/core/dist/src/decorators/tool-decorator.js.map +1 -0
  45. package/packages/core/dist/src/encodings/parameter-encoding.d.ts.map +1 -0
  46. package/{dist → packages/core/dist/src}/encodings/parameter-encoding.js +9 -2
  47. package/packages/core/dist/src/encodings/parameter-encoding.js.map +1 -0
  48. package/packages/core/dist/src/errors/matimo-error.d.ts.map +1 -0
  49. package/packages/core/dist/src/errors/matimo-error.js.map +1 -0
  50. package/packages/core/dist/src/executors/command-executor.d.ts.map +1 -0
  51. package/{dist → packages/core/dist/src}/executors/command-executor.js +5 -1
  52. package/packages/core/dist/src/executors/command-executor.js.map +1 -0
  53. package/packages/core/dist/src/executors/function-executor.d.ts +23 -0
  54. package/packages/core/dist/src/executors/function-executor.d.ts.map +1 -0
  55. package/packages/core/dist/src/executors/function-executor.js +164 -0
  56. package/packages/core/dist/src/executors/function-executor.js.map +1 -0
  57. package/packages/core/dist/src/executors/http-executor.d.ts.map +1 -0
  58. package/{dist → packages/core/dist/src}/executors/http-executor.js +5 -1
  59. package/packages/core/dist/src/executors/http-executor.js.map +1 -0
  60. package/{dist → packages/core/dist/src}/index.d.ts +5 -1
  61. package/packages/core/dist/src/index.d.ts.map +1 -0
  62. package/{dist → packages/core/dist/src}/index.js +3 -0
  63. package/packages/core/dist/src/index.js.map +1 -0
  64. package/packages/core/dist/src/integrations/langchain.d.ts +46 -0
  65. package/packages/core/dist/src/integrations/langchain.d.ts.map +1 -0
  66. package/packages/core/dist/src/integrations/langchain.js +197 -0
  67. package/packages/core/dist/src/integrations/langchain.js.map +1 -0
  68. package/{dist → packages/core/dist/src}/matimo-instance.d.ts +30 -4
  69. package/packages/core/dist/src/matimo-instance.d.ts.map +1 -0
  70. package/{dist → packages/core/dist/src}/matimo-instance.js +63 -10
  71. package/packages/core/dist/src/matimo-instance.js.map +1 -0
  72. package/packages/core/dist/tools/calculator/calculator.d.ts +26 -0
  73. package/packages/core/dist/tools/calculator/calculator.d.ts.map +1 -0
  74. package/packages/core/dist/tools/calculator/calculator.js +104 -0
  75. package/packages/core/dist/tools/calculator/calculator.js.map +1 -0
  76. package/packages/core/dist/tsconfig.tsbuildinfo +1 -0
  77. package/dist/auth/oauth2-config.d.ts.map +0 -1
  78. package/dist/auth/oauth2-config.js.map +0 -1
  79. package/dist/auth/oauth2-handler.d.ts.map +0 -1
  80. package/dist/auth/oauth2-handler.js.map +0 -1
  81. package/dist/auth/oauth2-provider-loader.d.ts.map +0 -1
  82. package/dist/auth/oauth2-provider-loader.js.map +0 -1
  83. package/dist/core/schema.d.ts.map +0 -1
  84. package/dist/core/schema.js.map +0 -1
  85. package/dist/core/tool-loader.d.ts.map +0 -1
  86. package/dist/core/tool-loader.js +0 -98
  87. package/dist/core/tool-loader.js.map +0 -1
  88. package/dist/core/tool-registry.d.ts.map +0 -1
  89. package/dist/core/tool-registry.js.map +0 -1
  90. package/dist/core/types.d.ts.map +0 -1
  91. package/dist/decorators/index.d.ts.map +0 -1
  92. package/dist/decorators/index.js.map +0 -1
  93. package/dist/decorators/tool-decorator.d.ts.map +0 -1
  94. package/dist/decorators/tool-decorator.js.map +0 -1
  95. package/dist/encodings/parameter-encoding.d.ts.map +0 -1
  96. package/dist/encodings/parameter-encoding.js.map +0 -1
  97. package/dist/errors/matimo-error.d.ts.map +0 -1
  98. package/dist/errors/matimo-error.js.map +0 -1
  99. package/dist/executors/command-executor.d.ts.map +0 -1
  100. package/dist/executors/command-executor.js.map +0 -1
  101. package/dist/executors/http-executor.d.ts.map +0 -1
  102. package/dist/executors/http-executor.js.map +0 -1
  103. package/dist/index.d.ts.map +0 -1
  104. package/dist/index.js.map +0 -1
  105. package/dist/matimo-instance.d.ts.map +0 -1
  106. package/dist/matimo-instance.js.map +0 -1
  107. package/docs/Gemfile +0 -5
  108. package/docs/RELEASES.md +0 -90
  109. package/docs/ROADMAP.md +0 -138
  110. package/docs/_config.yml +0 -27
  111. package/docs/api-reference/ERRORS.md +0 -445
  112. package/docs/api-reference/SDK.md +0 -582
  113. package/docs/api-reference/TYPES.md +0 -415
  114. package/docs/architecture/OAUTH.md +0 -1366
  115. package/docs/architecture/OVERVIEW.md +0 -564
  116. package/docs/assets/logo.png +0 -0
  117. package/docs/community/COMMIT_GUIDELINES.md +0 -552
  118. package/docs/framework-integrations/LANGCHAIN.md +0 -286
  119. package/docs/getting-started/QUICK_START.md +0 -212
  120. package/docs/getting-started/YOUR_FIRST_TOOL.md +0 -217
  121. package/docs/getting-started/installation.md +0 -124
  122. package/docs/index.md +0 -289
  123. package/docs/tool-development/DECORATOR_GUIDE.md +0 -633
  124. package/docs/tool-development/OAUTH_LINK.md +0 -5
  125. package/docs/tool-development/PROVIDER_CONFIGURATION.md +0 -458
  126. package/docs/tool-development/TESTING.md +0 -412
  127. package/docs/tool-development/TOOL_SPECIFICATION.md +0 -793
  128. package/docs/tool-development/YAML_TOOLS.md +0 -65
  129. package/docs/troubleshooting/FAQ.md +0 -391
  130. package/docs/user-guide/AUTHENTICATION.md +0 -255
  131. package/docs/user-guide/DEVELOPMENT_STANDARDS.md +0 -698
  132. package/docs/user-guide/SDK_PATTERNS.md +0 -316
  133. package/docs/user-guide/TOOL_DISCOVERY.md +0 -209
  134. /package/{dist → packages/core/dist/src}/auth/oauth2-config.d.ts +0 -0
  135. /package/{dist → packages/core/dist/src}/auth/oauth2-config.js +0 -0
  136. /package/{dist → packages/core/dist/src}/auth/oauth2-handler.d.ts +0 -0
  137. /package/{dist → packages/core/dist/src}/auth/oauth2-handler.js +0 -0
  138. /package/{dist → packages/core/dist/src}/auth/oauth2-provider-loader.d.ts +0 -0
  139. /package/{dist → packages/core/dist/src}/auth/oauth2-provider-loader.js +0 -0
  140. /package/{dist → packages/core/dist/src}/core/tool-registry.d.ts +0 -0
  141. /package/{dist → packages/core/dist/src}/core/types.js +0 -0
  142. /package/{dist → packages/core/dist/src}/decorators/index.d.ts +0 -0
  143. /package/{dist → packages/core/dist/src}/decorators/index.js +0 -0
  144. /package/{dist → packages/core/dist/src}/decorators/tool-decorator.d.ts +0 -0
  145. /package/{dist → packages/core/dist/src}/encodings/parameter-encoding.d.ts +0 -0
  146. /package/{dist → packages/core/dist/src}/errors/matimo-error.d.ts +0 -0
  147. /package/{dist → packages/core/dist/src}/errors/matimo-error.js +0 -0
  148. /package/{dist → packages/core/dist/src}/executors/command-executor.d.ts +0 -0
  149. /package/{dist → packages/core/dist/src}/executors/http-executor.d.ts +0 -0
package/README.md CHANGED
@@ -15,638 +15,218 @@
15
15
  <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-18+-green?style=for-the-badge" alt="Node.js"></a>
16
16
  </p>
17
17
 
18
- **Matimo** is a universal, configuration-driven AI tools ecosystem accessible through **multiple integration paths**. Define tools **once in YAML** and access them via SDK, MCP server, CLI, or HTTP across any AI framework or agent system.
19
-
20
- If you want tools that feel **fast, maintainable, and framework-agnostic**, this is it.
21
-
22
- [Documentation](./docs) · [Getting Started](./docs/getting-started/QUICK_START.md) · [API Reference](./docs/api-reference/SDK.md) · [Tool Spec](./docs/tool-development/TOOL_SPECIFICATION.md) · [GitHub](https://github.com/tallclub/matimo) · [Why Matimo?](#why-matimo)
23
-
24
- ## Quick Start (TL;DR)
25
-
26
- Runtime: **Node ≥18**, **pnpm 8.15+**
27
-
28
- ```bash
29
- # Clone and install
30
- git clone https://github.com/tallclub/matimo.git
31
- cd matimo
32
- pnpm install
33
- pnpm build
34
-
35
- # Run tests
36
- pnpm test
37
-
38
- # Start using
39
- const { matimo } = require('matimo');
40
- const m = await matimo.init('./tools');
41
- const result = await m.execute('calculator', { operation: 'add', a: 5, b: 3 });
42
- ```
43
-
44
- Prefer factory pattern (simple) or decorator pattern (class-based code). See [SDK Usage Patterns - Level 1](#level-1-pure-sdk-patterns-no-framework-required) for details.
45
-
46
- ---
47
-
48
- ## Why Matimo?
49
-
50
- ### The Problem It Solves
51
-
52
- Building agent workflows is exciting but painful: every framework (LangChain, CrewAI, AutoGen, LlamaIndex, custom TS agents, Claude via MCP, etc.) has its own way of defining, calling, and executing tools.
53
-
54
- You end up duplicating tool logic, schemas, and integrations repeatedly.
55
-
56
- **Matimo fixes this.** Define tools **once** in clean YAML files (with Zod validation for safety) and use them everywhere:
57
-
58
- - **Pure TypeScript SDK** (factory or decorator patterns)
59
- - **LangChain** (examples included)
60
- - **MCP Server** (Claude-native) — coming soon
61
- - **REST API** — coming soon
62
- - **CLI** — coming soon
63
- - **Python SDK** — coming soon
64
- - **Tool Marketplace** (2000+ tools goal) — coming soon
18
+ **Matimo** is a universal, configuration-driven AI tools ecosystem. Define tools **once in YAML** and use them everywhere SDK, MCP server, CLI, REST API, or any AI framework (LangChain, CrewAI, Claude, etc.).
65
19
 
66
20
  **Define once → Plug into any agent ecosystem.**
67
21
 
68
- ### Why Open Source?
69
-
70
- I built Matimo because I needed it while working on my own agent product — and I couldn't find a truly framework-agnostic, fully open-source alternative (most are paid or tightly coupled to one framework).
71
-
72
- I'm a solo developer (nomadic coder at heart) vibe coding, **all help is appriciated** to make matimo a go-to standard for agent tools.
73
-
74
- ### How You Can Help Right Now
75
-
76
- - ⭐ **Star the repo** to show support and increase visibility
77
- - 🐛 **Open issues** for bugs, missing features, or pain points
78
- - 💡 **Suggest tools** to add (YAML examples welcome!)
79
- - 🔀 **Submit PRs** — we follow TDD + Conventional Commits (see CONTRIBUTING.md)
80
- - 📢 **Spread the word** on X/Twitter, Reddit (r/LocalLLM, r/AI_Agents, etc.), Discord communities
81
-
82
- Let's build a simple, powerful shovel for the agentic world together.
83
-
84
- With ❤️
85
- [Sajesh](https://www.linkedin.com/in/sajeshnair/)
86
- Creator of Matimo
22
+ [📖 Documentation](./docs) · [🚀 Quick Start](./docs/getting-started/QUICK_START.md) · [📚 API Reference](./docs/api-reference/SDK.md) · [🛠️ Add Tools](./docs/tool-development/ADDING_TOOLS.md) · [🤖 Examples](./examples)
87
23
 
88
24
  ---
89
25
 
90
- ## Built so far
91
-
92
- **SDK with 2 Patterns**
93
-
94
- - Factory pattern (simple, recommended)
95
- - Decorator pattern (class-based agents)
96
-
97
- **Tool Execution & Discovery**
98
-
99
- - YAML/JSON tool definitions with validation
100
- - Command executor (shell commands + parameter templating)
101
- - HTTP executor (REST APIs with auth)
102
- - Tool registry with search, filter, discover
103
-
104
- **Quality & Type Safety**
105
-
106
- - 100% test passing
107
- - Full TypeScript strict mode (zero `any` types)
108
- - Zod schema validation
109
- - ESLint clean
110
-
111
- **3 Example Tools**
112
-
113
- - Calculator (command execution)
114
- - HTTP Client (HTTP execution)
115
- - Echo Tool (simple command)
116
-
117
- **4 Gmail Tools**
118
-
119
- - Create Draft
120
-
121
- - Get Message
122
- - List Message
123
- - Send Email
124
-
125
- ## Planned
126
- **Add Tools** - Github, Slack, Jira, Notion, etc
127
-
128
- **MCP Server** — Claude & MCP client integration
129
-
130
- **REST API** — HTTP endpoints for tool execution
131
-
132
- **CLI** — Command-line tool management & testing
133
-
134
- **OAuth2** — GitHub, Google, Slack authentication
135
-
136
- **Python SDK** — Multi-language support
137
-
138
- **Health Monitoring** — Detect API schema changes
139
-
140
- **Rate Limiting** — Token bucket algorithm per tool
141
-
142
-
143
- ## Installation
26
+ ## Quick Start
144
27
 
145
28
  ```bash
146
- # Coming soon to npm
147
29
  npm install matimo
148
- pnpm add matimo
149
30
 
150
- # For now: clone and build locally
151
- git clone https://github.com/tallclub/matimo.git
152
- cd matimo && pnpm install && pnpm build
31
+ # OR auto-discover tools from node_modules/@matimo/*
32
+ npm install matimo @matimo/slack @matimo/gmail
153
33
  ```
154
34
 
155
- ## SDK Usage Patterns
156
-
157
- ### Level 1: Pure SDK Patterns (No Framework Required)
158
-
159
- Use Matimo directly without any AI framework. Perfect for CLI tools, backends, scheduled jobs, and simple integrations.
160
-
161
- #### 1. Factory Pattern (Recommended for Simple Use Cases)
162
-
163
- Simplest, ergonomic, single-initialization API:
164
-
165
35
  ```typescript
166
- import { matimo } from 'matimo';
36
+ import { MatimoInstance } from 'matimo';
167
37
 
168
- // Initialize once
169
- const matimoInstance = await matimo.init('./tools');
38
+ // Factory pattern: Simple and direct
39
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
170
40
 
171
- // Execute tools by name
172
- const result = await matimoInstance.execute('calculator', {
173
- operation: 'add',
174
- a: 5,
175
- b: 3,
41
+ const result = await matimo.execute('slack-send-message', {
42
+ channel: '#general',
43
+ text: 'Hello from Matimo!',
176
44
  });
177
-
178
- // Discover tools
179
- const allTools = matimoInstance.listTools();
180
- const tool = matimoInstance.getTool('calculator');
181
- const mathTools = matimoInstance.getToolsByTag('math');
182
- const results = matimoInstance.searchTools('calculator');
183
- ```
184
-
185
- **Use when:** You need simple tool execution without LLM orchestration.
186
-
187
- #### 2. Decorator Pattern (Recommended for Class-Based Code)
188
-
189
- For class-based applications with automatic tool binding:
190
-
191
- ```typescript
192
- import { tool } from 'matimo';
193
- import { matimo } from 'matimo';
194
-
195
- // Initialize Matimo (once)
196
- const matimoInstance = await matimo.init('./tools');
197
-
198
- // NOTE: `setGlobalMatimoInstance()` is convenient for quick demos.
199
- // For production code prefer explicit injection (constructor/factory) or an explicit binder.
200
-
201
- // Constructor / DI example (recommended for production)
202
- class MyAgent {
203
- constructor(public matimo: MatimoInstance) {}
204
-
205
- @tool('calculator')
206
- async calculate(operation: string, a: number, b: number) {
207
- // @tool decorator intercepts this call
208
- // Argument order matches tool parameters: operation, a, b
209
- // Method body can be empty - decorator does the work
210
- }
211
-
212
- @tool('github-get-repo')
213
- async getRepo(owner: string, repo: string) {
214
- // @tool decorator intercepts this call
215
- // Argument order matches tool parameters: owner, repo
216
- // Method body can be empty - decorator does the work
217
- }
218
- }
219
-
220
- const agent = new MyAgent(matimoInstance);
221
- // When you call agent.calculate('add', 5, 3):
222
- // 1. @tool decorator intercepts the call
223
- // 2. Decorator maps arguments to parameters: { operation: 'add', a: 5, b: 3 }
224
- // 3. Decorator calls matimo.execute('calculator', {...})
225
- // 4. Result is returned to you
226
- const result = await agent.calculate('add', 5, 3);
227
45
  ```
228
46
 
229
- **Use when:** You prefer method-based calling style or class-based architecture.
230
-
231
- **How @tool decorator works:**
232
-
233
- - ✅ **Intercepts method calls** - Decorator intercepts and executes via Matimo
234
- - ✅ **Auto-maps arguments** - Method args become tool parameters (in order)
235
- - ✅ **Auto-executes tool** - Calls `matimo.execute(toolName, params)` automatically
236
- - ✅ **Returns tool result** - The result from Matimo is returned to you
237
- - ✅ **Fully scalable** - Add 100 tools = just add 100 `@tool()` decorated methods, no routing code
238
- - ✅ **Works with DI** - Uses instance property or global instance
239
- - ✅ **Method body optional** - Can be empty since decorator replaces it
240
-
241
- ### Level 2: Framework Integration Patterns (With AI Framework)
242
-
243
- Integrate Matimo tools with LangChain(TS), CrewAI (coming soon) , or other AI frameworks for intelligent tool orchestration. The LLM automatically decides which tool to use.
244
-
245
- #### LangChain Integration (Recommended for AI Agents)
246
-
247
- Three complete, production-ready examples in [examples/langchain](./examples/langchain):
47
+ See [Three Integration Patterns](#three-integration-patterns) and [examples/](./examples) for more.
248
48
 
249
- 1. **LangChain Official API** (⭐ Most Recommended)
250
- - Uses `createAgent()` + `tool()` from LangChain core
251
- - Automatic schema generation and tool orchestration
252
- - [See example](./examples/langchain/agents/langchain-agent.ts)
253
-
254
- 2. **Decorator Pattern with LangChain**
255
- - Uses `@tool()` decorators with OpenAI function calling
256
- - Integrates Matimo tools into class-based LangChain agents
257
- - [See example](./examples/langchain/agents/decorator-pattern-agent.ts)
258
-
259
- 3. **Factory Pattern with LangChain**
260
- - Direct `matimo.execute()` calls in LangChain agent
261
- - Simple functional approach
262
- - [See example](./examples/langchain/agents/factory-pattern-agent.ts)
263
-
264
- All examples load tools from YAML once and reuse them across patterns — **single source of truth**.
265
-
266
- **Quick Start:** See [examples/langchain/README.md](./examples/langchain/README.md) for setup instructions and running the agents.
267
-
268
- **Use when:** You need intelligent tool selection based on natural language prompts.
269
-
270
- ## Integration Paths
271
-
272
- ### SDK (Available Now)
49
+ ---
273
50
 
274
- **Level 1: Pure SDK** (No framework required)
51
+ ## Why Matimo?
275
52
 
276
- - **Factory Pattern** Simplest API for any use case
277
- - **Decorator Pattern** — Best for class-based code
53
+ **The Problem:** Every AI framework (LangChain, CrewAI, custom agents, etc.) defines tools differently. You duplicate tool logic across frameworks.
278
54
 
279
- See [SDK Usage Patterns - Level 1](#level-1-pure-sdk-patterns-no-framework-required) above for examples.
55
+ **The Solution:** Define tools **once** in clean YAML, use them **everywhere** — with built-in:
280
56
 
281
- **Level 2: Framework Integration** (With AI framework)
57
+ - TypeScript SDK (factory & decorator patterns)
58
+ - LangChain integration (with examples)
59
+ - Matimo CLI (tool discovery & management)
60
+ - Auto-discovery from npm packages
61
+ - OAuth2 support + parameter validation
282
62
 
283
- - **LangChain Integration** Production-ready AI agents with OpenAI GPT
284
- - **CrewAI Integration** — Coming in Phase 2
285
- - **Anthropic SDK Integration** — Coming in Phase 2
63
+ See [Contributing](./CONTRIBUTING.md) or [Why Matimo?](./docs/index.md#why-matimo) for the full story.
286
64
 
287
- See [SDK Usage Patterns - Level 2](#level-2-framework-integration-patterns-with-ai-framework) above and [examples/langchain/README.md](./examples/langchain/README.md) for complete working examples.
65
+ ---
288
66
 
289
- ### Advanced (Coming Soon)
67
+ ## Three Integration Patterns
290
68
 
291
- **MCP Server (Claude Integration)**
69
+ ### 1️⃣ Factory Pattern (Simplest)
292
70
 
293
71
  ```typescript
294
- // MCP Server - Coming in Phase 2
295
- // import { MCPServer } from 'matimo/mcp';
296
-
297
- const server = new MCPServer({
298
- toolsPath: './tools',
299
- autoLoad: true,
300
- });
301
-
302
- await server.start();
303
- // Claude can now discover and call all loaded tools
304
- ```
305
-
306
- **REST API (HTTP Endpoints)**
307
-
308
- ```bash
309
- # Coming soon
310
- matimo api --port 3000
311
-
312
- curl -X POST http://localhost:3000/tools/calculator/execute \
313
- -d '{"operation":"add","a":5,"b":3}'
72
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
73
+ const result = await matimo.execute('calculator', { operation: 'add', a: 5, b: 3 });
314
74
  ```
315
75
 
316
- **CLI (Command Line)**
76
+ ### 2️⃣ Decorator Pattern (Class-Based)
317
77
 
318
- ```bash
319
- matimo list # List all tools
320
- matimo execute calculator --operation add --a 5 --b 3
321
- matimo validate tools/calculator.yaml # Validate tool YAML
322
- matimo test calculator # Test tool
78
+ ```typescript
79
+ @tool('slack-send-message')
80
+ async sendMessage(channel: string, text: string) { /* Auto-executed */ }
323
81
  ```
324
82
 
325
- ## Tool Definition (YAML)
326
-
327
- Tools are defined once in YAML, executed everywhere. Each tool specifies its execution type, parameters, schema, and auth:
328
-
329
- ```yaml
330
- name: calculator
331
- version: 1.0.0
332
- description: Perform basic mathematical operations
333
-
334
- parameters:
335
- operation:
336
- type: string
337
- enum: [add, subtract, multiply, divide]
338
- required: true
339
- description: Mathematical operation
340
- a:
341
- type: number
342
- required: true
343
- description: First operand
344
- b:
345
- type: number
346
- required: true
347
- description: Second operand
83
+ ### 3️⃣ LangChain Integration
348
84
 
349
- execution:
350
- type: command
351
- command: ts-node
352
- args: ['tools/calculator/calculator.ts', '{operation}', '{a}', '{b}']
353
- timeout: 30000
354
-
355
- output_schema:
356
- type: object
357
- properties:
358
- result:
359
- type: number
360
- description: Calculation result
361
-
362
- error_handling:
363
- retry: 3
364
- backoff_type: exponential
365
- initial_delay_ms: 1000
85
+ ```typescript
86
+ const tools = matimo.listTools().map(tool => ({
87
+ type: 'function',
88
+ function: { name: tool.name, description: tool.description, ... }
89
+ }));
366
90
  ```
367
91
 
368
- ### Execution Types
92
+ See [SDK Usage Patterns](./docs/user-guide/SDK_PATTERNS.md) and [LangChain Integration](./docs/framework-integrations/LANGCHAIN.md) for details.
369
93
 
370
- **Implemented:**
371
-
372
- - **`command`** — Shell commands with parameter templating
373
- - **`http`** — REST APIs with auth and response validation
94
+ ---
374
95
 
375
- **Coming:**
96
+ ## Installation
376
97
 
377
- - **`script`** Safe JavaScript/Python execution (sandboxed)
378
- - **`docker`** — Containerized execution
379
- - **`custom`** — External executables
98
+ ### From npm (Recommended)
380
99
 
381
- ## Architecture
100
+ ```bash
101
+ npm install matimo
382
102
 
383
- ```
384
- ┌─────────────────────────────────────────────┐
385
- │ AI Agents & Frameworks │
386
- │ (Claude, LangChain, CrewAI, Custom) │
387
- └──────────┬────────────────┬─────────────────┘
388
- │ │
389
- ┌─────▼─────┐ ┌─────▼─────┐
390
- │ SDK │ │ MCP │
391
- │ │ │ │
392
- └─────┬─────┘ └──────┬────┘
393
- │ │
394
- └────────┬───────┘
395
-
396
- ┌──────────▼──────────┐
397
- │ Matimo Core │
398
- │ - Loader │
399
- │ - Validator │
400
- │ - Executors │
401
- └──────────┬──────────┘
402
-
403
- ┌────────────┼────────────┐
404
- │ │ │
405
- ▼ ▼ ▼
406
- ┌────────┐ ┌──────────┐ ┌────────┐
407
- │Command │ │ HTTP │ │ Schema │
408
- │Exec │ │ Exec │ │Validate│
409
- └────────┘ └──────────┘ └────────┘
410
- │ │ │
411
- └────────────┼────────────┘
412
-
413
- ┌───────────▼───────────┐
414
- │ Tool Definitions │
415
- │ (YAML/JSON files) │
416
- │ calculator │
417
- │ http-client │
418
- │ echo-tool │
419
- │ 1000+ coming soon │
420
- └───────────────────────┘
103
+ # Install tool providers
104
+ npm install @matimo/slack @matimo/gmail
421
105
  ```
422
106
 
423
- ## Project Structure
107
+ Then use with auto-discovery:
424
108
 
109
+ ```typescript
110
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
425
111
  ```
426
- matimo/
427
- ├── src/
428
- │ ├── core/ # Core types, schemas
429
- │ ├── executors/ # Command & HTTP execution
430
- │ ├── decorators/ # @tool decorator pattern
431
- │ ├── mcp/ # MCP server
432
- │ ├── cli/ # CLI interface
433
- │ ├── errors/ # Error handling
434
- │ └── logging/ # Structured logging
435
- ├── tools/
436
- │ ├── calculator/ # Calculator tool
437
- │ ├── echo-tool/ # Echo tool
438
- │ └── http-client/ # HTTP client tool
439
- ├── test/ # tests
440
- │ ├── unit/
441
- │ └── integration/
442
- ├── docs/
443
- │ ├── quick-start.md
444
- │ ├── api.md
445
- │ ├── tool-spec.md
446
- │ └── ...
447
- └── package.json
448
- ```
449
-
450
- ## Development
451
-
452
- ### Prerequisites
453
112
 
454
- - **Node.js** 18+
455
- - **pnpm** 8.15+
456
- - **TypeScript** 5.9+
457
-
458
- ### Setup
113
+ ### Matimo CLI (Tool Management)
459
114
 
460
115
  ```bash
461
- git clone https://github.com/tallclub/matimo.git
462
- cd matimo
463
- pnpm install
464
- pnpm build
465
- ```
116
+ npm install -g @matimo/cli
466
117
 
467
- ### Commands
468
-
469
- ```bash
470
- pnpm build # Compile TypeScript
471
- pnpm test # Run all tests
472
- pnpm test:watch # Watch mode
473
- pnpm test:coverage # Coverage report
474
- pnpm lint # ESLint
475
- pnpm format # Prettier formatting
118
+ matimo list # Show installed packages
119
+ matimo search email # Find tools
120
+ matimo install slack # Install tools
476
121
  ```
477
122
 
478
- ### Testing
123
+ See [CLI Docs](./packages/cli/README.md) for full reference.
479
124
 
480
- Matimo uses Jest with TypeScript. Tests follow TDD principles:
125
+ ### From Source (Contributors)
481
126
 
482
127
  ```bash
483
- pnpm test # All tests
484
- pnpm test types.test.ts # Specific file
485
- pnpm test:watch # Watch mode
486
- pnpm test:coverage # Coverage (target: 80%+)
487
- ```
488
-
489
- **Coverage Target:** 80%+ (currently 112 tests, 11+ suites)
490
-
491
- ## Community
492
-
493
- We welcome contributions!
494
-
495
- ### Getting Started
496
-
497
- 1. **Fork** the repository
498
- 2. **Create branch** (`git checkout -b feature/amazing-feature`)
499
- 3. **Write tests first** (TDD approach)
500
- 4. **Make changes**
501
- 5. **Run tests** (`pnpm test && pnpm lint`)
502
- 6. **Commit** with conventional commits
503
- 7. **Push** and open PR
504
-
505
- ### Commit Format
506
-
507
- We enforce [Conventional Commits](https://www.conventionalcommits.org/):
508
-
509
- ```
510
- feat(scope): short description
511
- fix(executor): validate parameters
512
- docs(readme): update guide
513
- test(decorator): add tests
128
+ git clone https://github.com/tallclub/matimo
129
+ cd matimo && pnpm install && pnpm build
130
+ pnpm test
131
+ cd examples/tools && pnpm install && pnpm agent:factory
514
132
  ```
515
133
 
516
- ### What Can You Contribute?
517
-
518
- - Core SDK improvements
519
- - Bug fixes
520
- - Documentation
521
- - Test coverage
522
- - Tool definitions
523
- - New executor types
524
- - Performance optimizations
525
- - Security
526
- - Ideas
527
-
528
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
529
-
530
- ## Documentation
531
-
532
- - **[Quick Start](./docs/getting-started/QUICK_START.md)** — Get up and running in 5 minutes
533
- - **[API Reference](./docs/api-reference/SDK.md)** — Complete SDK API
534
- - **[Tool Specification](./docs/tool-development/TOOL_SPECIFICATION.md)** — How to write YAML tools
535
- - **[Decorator Guide](./docs/tool-development/DECORATOR_GUIDE.md)** — Using @tool decorators
536
- - **[Commit Guidelines](./docs/community/COMMIT_GUIDELINES.md)** — Conventional commits
537
- - **[Development Standards](./docs/user-guide/DEVELOPMENT_STANDARDS.md)** — Code quality rules
538
- - **[Architecture Overview](./docs/architecture/OVERVIEW.md)** — System design and patterns
539
- - **[Framework Integrations](./docs/framework-integrations/LANGCHAIN.md)** — LangChain, CrewAI patterns
540
-
541
- ## Roadmap
542
-
543
- ### Foundation (Complete)
544
-
545
- **Completed:**
546
-
547
- - Tool loading (YAML/JSON)
548
- - Command & HTTP executors
549
- - Factory & Decorator patterns
550
- - Tool registry & discovery
551
- - 112+ tests (100% passing)
552
- - Full TypeScript strict mode
553
-
554
- ### Reliability (Coming)
555
-
556
- **Upcoming:**
134
+ ---
557
135
 
558
- - MCP server (Claude integration)
559
- - CLI tool management
560
- - REST API server
561
- - OAuth2 authentication
562
- - Rate limiting
563
- - Health monitoring
136
+ ## Features
564
137
 
565
- ### Ecosystem (Coming)
138
+ **Now:**
566
139
 
567
- **Future:**
140
+ - ✅ Factory & Decorator patterns (SDK)
141
+ - ✅ LangChain integration
142
+ - ✅ YAML tool definitions with Zod validation
143
+ - ✅ Slack & Gmail tools (20+ operations)
144
+ - ✅ Auto-discovery from npm packages
145
+ - ✅ Matimo CLI (install, list, search)
146
+ - ✅ OAuth2 support
147
+ - ✅ 100% test coverage, TypeScript strict mode
568
148
 
569
- - Python SDK
570
- - MCP
571
- - Skills/Workflows (multi-tool orchestration)
572
- - 2000+ pre-configured tools
149
+ **Coming Soon:**
573
150
 
574
- ## Performance Benchemark Expected
151
+ - 🔜 MCP Server (Claude integration)
152
+ - 🔜 REST API
153
+ - 🔜 More tool providers (GitHub, Stripe, Twilio, etc.)
154
+ - 🔜 Tool Marketplace
155
+ - 🔜 Python SDK
575
156
 
576
- - **Tool Execution:** <100ms overhead per call
577
- - **Schema Validation:** <10ms per request
578
- - **Memory:** ~50MB base + 1-2MB per loaded tool
579
- - **Concurrency:** 100+ simultaneous tools
157
+ ---
580
158
 
581
- ## Security
159
+ ## Adding Tools to Matimo
582
160
 
583
- ### Implemented
161
+ Create tool providers as independent npm packages:
584
162
 
585
- **Currently:**
163
+ ```bash
164
+ mkdir packages/github
165
+ cd packages/github && cat > package.json << 'EOF'
166
+ { "name": "@matimo/github", "type": "module", ... }
167
+ EOF
168
+
169
+ mkdir tools/github-create-issue
170
+ cat > tools/github-create-issue/definition.yaml << 'EOF'
171
+ name: github-create-issue
172
+ parameters:
173
+ owner: { type: string, required: true }
174
+ repo: { type: string, required: true }
175
+ title: { type: string, required: true }
176
+ execution:
177
+ type: http
178
+ method: POST
179
+ url: https://api.github.com/repos/{owner}/{repo}/issues
180
+ headers:
181
+ Authorization: "Bearer {GITHUB_TOKEN}"
182
+ EOF
183
+ ```
586
184
 
587
- - No hardcoded credentials (environment variables only)
588
- - Input validation (Zod schemas)
589
- - Safe error messages (no secret leaks)
590
- - Full TypeScript strict mode
185
+ Then publish to npm as `@matimo/github`. Users install and auto-discover:
591
186
 
592
- ### Coming
187
+ ```bash
188
+ npm install @matimo/github
189
+ # New tools automatically available!
190
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
191
+ ```
593
192
 
594
- **Next:**
193
+ See [Adding Tools to Matimo](./docs/tool-development/ADDING_TOOLS.md) for the complete 6-step guide.
595
194
 
596
- - Response validation against schemas
597
- - Health monitoring (detect API changes)
598
- - OAuth2 token management
599
- - Rate limiting
195
+ ---
600
196
 
601
- **Future:**
197
+ ## Documentation
602
198
 
603
- - Sandboxed execution (Docker/Firejail)
604
- - Encryption at rest
605
- - Audit logging
606
- - Zero-trust architecture
199
+ - [Getting Started](./docs/getting-started/)
200
+ - [API Reference](./docs/api-reference/SDK.md)
201
+ - [Tool Development](./docs/tool-development/ADDING_TOOLS.md)
202
+ - [Architecture Overview](./docs/architecture/OVERVIEW.md)
203
+ - [Contributing](./CONTRIBUTING.md)
607
204
 
608
- See [SECURITY.md](./SECURITY.md) for detailed guidelines.
205
+ ---
609
206
 
610
207
  ## License
611
208
 
612
209
  MIT © 2026 Matimo Contributors
613
210
 
614
- ## Support
615
-
616
- - 📖 [Docs](./docs)
617
- - 💬 [Discussions](https://github.com/tallclub/matimo/discussions)
618
- - 🐛 [Issues](https://github.com/tallclub/matimo/issues)
619
-
620
- ## Contributors
621
-
622
- <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
623
- [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
624
- <!-- ALL-CONTRIBUTORS-BADGE:END -->
625
-
626
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
627
- <!-- prettier-ignore-start -->
628
- <!-- markdownlint-disable -->
629
- <table>
630
- <tbody>
631
- <tr>
632
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/tallclub"><img src="https://avatars.githubusercontent.com/u/112923179?v=4?s=100" width="50px;" alt="tallclub" style="border-radius: 50%;"/>
633
- </tr>
634
- </tbody>
635
- </table>
211
+ ---
636
212
 
637
- <!-- markdownlint-restore -->
638
- <!-- prettier-ignore-end -->
213
+ ## Support the Project
639
214
 
640
- <!-- ALL-CONTRIBUTORS-LIST:END -->
215
+ - ⭐ Star the repo
216
+ - 🐛 Open issues for bugs or features
217
+ - 🔀 Submit PRs (see [Contributing](./CONTRIBUTING.md))
218
+ - 📢 Share on Twitter, Reddit, Discord
641
219
 
642
- Contributions are welcome — see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
220
+ ---
643
221
 
644
- ## Star History
222
+ ## Contributors
645
223
 
646
- [![Star History Chart](https://api.star-history.com/svg?repos=tallclub/matimo&type=date&legend=top-left)](https://www.star-history.com/#tallclub/matimo&type=date&legend=top-left)
224
+ <a href="https://github.com/tallclub/matimo/graphs/contributors">
225
+ <img src="https://contrib.rocks/image?repo=tallclub/matimo" />
226
+ </a>
647
227
 
648
228
  ---
649
229
 
650
- **Ready to integrate AI tools across your framework?**
230
+ ## Star History
651
231
 
652
- [Get Started Now →](./docs/getting-started/QUICK_START.md)
232
+ [![Star History Chart](https://api.star-history.com/svg?repos=tallclub/matimo&type=Date)](https://star-history.com/#tallclub/matimo&Date)