matimo 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (151) hide show
  1. package/README.md +136 -544
  2. package/package.json +24 -24
  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/approval/approval-handler.d.ts +74 -0
  21. package/packages/core/dist/approval/approval-handler.d.ts.map +1 -0
  22. package/packages/core/dist/approval/approval-handler.js +210 -0
  23. package/packages/core/dist/approval/approval-handler.js.map +1 -0
  24. package/{dist → packages/core/dist}/core/schema.d.ts +29 -4
  25. package/packages/core/dist/core/schema.d.ts.map +1 -0
  26. package/{dist → packages/core/dist}/core/schema.js +37 -6
  27. package/packages/core/dist/core/schema.js.map +1 -0
  28. package/packages/core/dist/core/tool-loader.d.ts +57 -0
  29. package/packages/core/dist/core/tool-loader.d.ts.map +1 -0
  30. package/packages/core/dist/core/tool-loader.js +250 -0
  31. package/packages/core/dist/core/tool-loader.js.map +1 -0
  32. package/{dist → packages/core/dist}/core/tool-registry.d.ts.map +1 -1
  33. package/{dist → packages/core/dist}/core/tool-registry.js +5 -1
  34. package/packages/core/dist/core/tool-registry.js.map +1 -0
  35. package/{dist → packages/core/dist}/core/types.d.ts +31 -1
  36. package/packages/core/dist/core/types.d.ts.map +1 -0
  37. package/{dist → packages/core/dist}/decorators/tool-decorator.d.ts.map +1 -1
  38. package/{dist → packages/core/dist}/decorators/tool-decorator.js +7 -4
  39. package/packages/core/dist/decorators/tool-decorator.js.map +1 -0
  40. package/{dist → packages/core/dist}/encodings/parameter-encoding.d.ts +1 -1
  41. package/{dist → packages/core/dist}/encodings/parameter-encoding.d.ts.map +1 -1
  42. package/{dist → packages/core/dist}/encodings/parameter-encoding.js +12 -4
  43. package/packages/core/dist/encodings/parameter-encoding.js.map +1 -0
  44. package/{dist → packages/core/dist}/errors/matimo-error.d.ts +8 -1
  45. package/packages/core/dist/errors/matimo-error.d.ts.map +1 -0
  46. package/{dist → packages/core/dist}/errors/matimo-error.js +23 -1
  47. package/packages/core/dist/errors/matimo-error.js.map +1 -0
  48. package/{dist → packages/core/dist}/executors/command-executor.d.ts.map +1 -1
  49. package/{dist → packages/core/dist}/executors/command-executor.js +5 -1
  50. package/packages/core/dist/executors/command-executor.js.map +1 -0
  51. package/packages/core/dist/executors/function-executor.d.ts +23 -0
  52. package/packages/core/dist/executors/function-executor.d.ts.map +1 -0
  53. package/packages/core/dist/executors/function-executor.js +181 -0
  54. package/packages/core/dist/executors/function-executor.js.map +1 -0
  55. package/packages/core/dist/executors/http-executor.d.ts +87 -0
  56. package/packages/core/dist/executors/http-executor.d.ts.map +1 -0
  57. package/packages/core/dist/executors/http-executor.js +324 -0
  58. package/packages/core/dist/executors/http-executor.js.map +1 -0
  59. package/{dist → packages/core/dist}/index.d.ts +9 -1
  60. package/packages/core/dist/index.d.ts.map +1 -0
  61. package/{dist → packages/core/dist}/index.js +10 -0
  62. package/packages/core/dist/index.js.map +1 -0
  63. package/packages/core/dist/integrations/langchain.d.ts +46 -0
  64. package/packages/core/dist/integrations/langchain.d.ts.map +1 -0
  65. package/packages/core/dist/integrations/langchain.js +197 -0
  66. package/packages/core/dist/integrations/langchain.js.map +1 -0
  67. package/packages/core/dist/logging/index.d.ts +3 -0
  68. package/packages/core/dist/logging/index.d.ts.map +1 -0
  69. package/packages/core/dist/logging/index.js +3 -0
  70. package/packages/core/dist/logging/index.js.map +1 -0
  71. package/packages/core/dist/logging/logger.d.ts +96 -0
  72. package/packages/core/dist/logging/logger.d.ts.map +1 -0
  73. package/packages/core/dist/logging/logger.js +53 -0
  74. package/packages/core/dist/logging/logger.js.map +1 -0
  75. package/packages/core/dist/logging/winston-logger.d.ts +29 -0
  76. package/packages/core/dist/logging/winston-logger.d.ts.map +1 -0
  77. package/packages/core/dist/logging/winston-logger.js +73 -0
  78. package/packages/core/dist/logging/winston-logger.js.map +1 -0
  79. package/{dist → packages/core/dist}/matimo-instance.d.ts +46 -4
  80. package/packages/core/dist/matimo-instance.d.ts.map +1 -0
  81. package/{dist → packages/core/dist}/matimo-instance.js +167 -15
  82. package/packages/core/dist/matimo-instance.js.map +1 -0
  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 +0 -29
  86. package/dist/core/tool-loader.d.ts.map +0 -1
  87. package/dist/core/tool-loader.js +0 -98
  88. package/dist/core/tool-loader.js.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/tool-decorator.js.map +0 -1
  92. package/dist/encodings/parameter-encoding.js.map +0 -1
  93. package/dist/errors/matimo-error.d.ts.map +0 -1
  94. package/dist/errors/matimo-error.js.map +0 -1
  95. package/dist/executors/command-executor.js.map +0 -1
  96. package/dist/executors/http-executor.d.ts +0 -26
  97. package/dist/executors/http-executor.d.ts.map +0 -1
  98. package/dist/executors/http-executor.js +0 -133
  99. package/dist/executors/http-executor.js.map +0 -1
  100. package/dist/index.d.ts.map +0 -1
  101. package/dist/index.js.map +0 -1
  102. package/dist/matimo-instance.d.ts.map +0 -1
  103. package/dist/matimo-instance.js.map +0 -1
  104. package/docs/Gemfile +0 -5
  105. package/docs/RELEASES.md +0 -69
  106. package/docs/ROADMAP.md +0 -138
  107. package/docs/_config.yml +0 -27
  108. package/docs/api-reference/ERRORS.md +0 -445
  109. package/docs/api-reference/SDK.md +0 -582
  110. package/docs/api-reference/TYPES.md +0 -415
  111. package/docs/architecture/OAUTH.md +0 -1366
  112. package/docs/architecture/OVERVIEW.md +0 -564
  113. package/docs/assets/logo.png +0 -0
  114. package/docs/community/COMMIT_GUIDELINES.md +0 -552
  115. package/docs/framework-integrations/LANGCHAIN.md +0 -286
  116. package/docs/getting-started/QUICK_START.md +0 -211
  117. package/docs/getting-started/YOUR_FIRST_TOOL.md +0 -217
  118. package/docs/getting-started/installation.md +0 -124
  119. package/docs/index.md +0 -288
  120. package/docs/tool-development/DECORATOR_GUIDE.md +0 -633
  121. package/docs/tool-development/OAUTH_LINK.md +0 -5
  122. package/docs/tool-development/PROVIDER_CONFIGURATION.md +0 -458
  123. package/docs/tool-development/TESTING.md +0 -412
  124. package/docs/tool-development/TOOL_SPECIFICATION.md +0 -793
  125. package/docs/tool-development/YAML_TOOLS.md +0 -65
  126. package/docs/troubleshooting/FAQ.md +0 -391
  127. package/docs/user-guide/AUTHENTICATION.md +0 -255
  128. package/docs/user-guide/DEVELOPMENT_STANDARDS.md +0 -698
  129. package/docs/user-guide/SDK_PATTERNS.md +0 -316
  130. package/docs/user-guide/TOOL_DISCOVERY.md +0 -209
  131. /package/{dist → packages/core/dist}/auth/oauth2-config.d.ts +0 -0
  132. /package/{dist → packages/core/dist}/auth/oauth2-config.d.ts.map +0 -0
  133. /package/{dist → packages/core/dist}/auth/oauth2-config.js +0 -0
  134. /package/{dist → packages/core/dist}/auth/oauth2-config.js.map +0 -0
  135. /package/{dist → packages/core/dist}/auth/oauth2-handler.d.ts +0 -0
  136. /package/{dist → packages/core/dist}/auth/oauth2-handler.d.ts.map +0 -0
  137. /package/{dist → packages/core/dist}/auth/oauth2-handler.js +0 -0
  138. /package/{dist → packages/core/dist}/auth/oauth2-handler.js.map +0 -0
  139. /package/{dist → packages/core/dist}/auth/oauth2-provider-loader.d.ts +0 -0
  140. /package/{dist → packages/core/dist}/auth/oauth2-provider-loader.d.ts.map +0 -0
  141. /package/{dist → packages/core/dist}/auth/oauth2-provider-loader.js +0 -0
  142. /package/{dist → packages/core/dist}/auth/oauth2-provider-loader.js.map +0 -0
  143. /package/{dist → packages/core/dist}/core/tool-registry.d.ts +0 -0
  144. /package/{dist → packages/core/dist}/core/types.js +0 -0
  145. /package/{dist → packages/core/dist}/core/types.js.map +0 -0
  146. /package/{dist → packages/core/dist}/decorators/index.d.ts +0 -0
  147. /package/{dist → packages/core/dist}/decorators/index.d.ts.map +0 -0
  148. /package/{dist → packages/core/dist}/decorators/index.js +0 -0
  149. /package/{dist → packages/core/dist}/decorators/index.js.map +0 -0
  150. /package/{dist → packages/core/dist}/decorators/tool-decorator.d.ts +0 -0
  151. /package/{dist → packages/core/dist}/executors/command-executor.d.ts +0 -0
package/README.md CHANGED
@@ -15,637 +15,229 @@
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:
18
+ <p align="center">
19
+ <a href="https://discord.gg/3JPt4mxWDV"><img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?style=for-the-badge&logo=discord&logoColor=white" alt="Discord"></a>
20
+ </p>
57
21
 
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
22
+ **Matimo** is a universal, configuration‑driven AI tools ecosystem. Define tools **once in YAML** and reuse them across the SDK, LangChain, custom agents, and a single MCP server, without re‑implementing schemas or fragmenting integration logic.
65
23
 
66
24
  **Define once → Plug into any agent ecosystem.**
67
25
 
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), so this project needs **your help** to become the 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
26
+ [📖 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
27
 
88
28
  ---
89
29
 
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
30
+ ## Quick Start
124
31
 
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
32
+ ### Installation
144
33
 
145
34
  ```bash
146
- # Coming soon to npm
147
35
  npm install matimo
148
- pnpm add matimo
149
-
150
- # For now: clone and build locally
151
- git clone https://github.com/tallclub/matimo.git
152
- cd matimo && pnpm install && pnpm build
36
+ # OR auto-discover tools from node_modules/@matimo/*
37
+ npm install matimo @matimo/slack @matimo/gmail
153
38
  ```
154
39
 
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:
40
+ ### Minimal Example (TypeScript)
164
41
 
165
42
  ```typescript
166
- import { matimo } from 'matimo';
167
-
168
- // Initialize once
169
- const matimoInstance = await matimo.init('./tools');
43
+ import { MatimoInstance } from '@matimo/core';
170
44
 
171
- // Execute tools by name
172
- const result = await matimoInstance.execute('calculator', {
173
- operation: 'add',
174
- a: 5,
175
- b: 3,
45
+ const matimo = await MatimoInstance.init({
46
+ autoDiscover: true,
176
47
  });
177
48
 
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);
49
+ const result = await matimo.execute('slack-send-message', {
50
+ channel: '#general',
51
+ text: 'Hello from Matimo!',
52
+ });
227
53
  ```
228
54
 
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)
55
+ See [Three Integration Patterns](#three-integration-patterns) and [examples/](./examples) for more.
246
56
 
247
- Three complete, production-ready examples in [examples/langchain](./examples/langchain):
57
+ ## What's Included
248
58
 
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)
59
+ Matimo ships with built-in support for:
253
60
 
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)
61
+ - **Core Tools**: File I/O, Web fetch, Command execution, Code search
62
+ - **Slack Integration**: Send messages, manage channels, read threads
63
+ - **Gmail Integration**: Send/read email, manage threads
64
+ - **GitHub Integration**: Issues, pull requests, releases
65
+ - **Postgres Tools**: Query/modify data with safety checks
66
+ - **HubSpot Tools**: Read/Write data to Hubspot CRM
67
+ - **Auto-Discovery**: Automatic detection of @matimo/\* providers from npm
68
+ - **Matimo CLI**: Tool discovery, installation, and management
69
+ - **OAuth2 Support**: Provider-agnostic authorization for Slack, Gmail, GitHub, etc.
70
+ - **Framework Support**: Factory pattern, Decorator pattern, LangChain, CrewAI
71
+ - **TypeScript SDK**: Full type safety and IDE support
258
72
 
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)
273
-
274
- **Level 1: Pure SDK** (No framework required)
73
+ ## Why Matimo?
275
74
 
276
- - **Factory Pattern** Simplest API for any use case
277
- - **Decorator Pattern** — Best for class-based code
75
+ **The Problem:** Every AI framework (LangChain, CrewAI, custom agents, etc.) defines tools differently. You duplicate tool logic across frameworks.
278
76
 
279
- See [SDK Usage Patterns - Level 1](#level-1-pure-sdk-patterns-no-framework-required) above for examples.
77
+ **The Solution:** Define tools **once** in clean YAML, use them **everywhere** — with built-in:
280
78
 
281
- **Level 2: Framework Integration** (With AI framework)
79
+ - TypeScript SDK (factory & decorator patterns)
80
+ - LangChain integration (with examples)
81
+ - Matimo CLI (tool discovery & management)
82
+ - Auto-discovery from npm packages
83
+ - OAuth2 support + parameter validation
282
84
 
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
85
+ See [Contributing](./CONTRIBUTING.md) for details.
286
86
 
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.
87
+ ---
288
88
 
289
- ### Advanced (Coming Soon)
89
+ ## Three Integration Patterns
290
90
 
291
- **MCP Server (Claude Integration)**
91
+ ### 1️⃣ Factory Pattern (Simplest)
292
92
 
293
93
  ```typescript
294
- import { MCPServer } from 'matimo/mcp';
295
-
296
- const server = new MCPServer({
297
- toolsPath: './tools',
298
- autoLoad: true,
299
- });
300
-
301
- await server.start();
302
- // Claude can now discover and call all loaded tools
303
- ```
304
-
305
- **REST API (HTTP Endpoints)**
306
-
307
- ```bash
308
- # Coming soon
309
- matimo api --port 3000
310
-
311
- curl -X POST http://localhost:3000/tools/calculator/execute \
312
- -d '{"operation":"add","a":5,"b":3}'
94
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
95
+ const result = await matimo.execute('calculator', { operation: 'add', a: 5, b: 3 });
313
96
  ```
314
97
 
315
- **CLI (Command Line)**
98
+ ### 2️⃣ Decorator Pattern (Class-Based)
316
99
 
317
- ```bash
318
- matimo list # List all tools
319
- matimo execute calculator --operation add --a 5 --b 3
320
- matimo validate tools/calculator.yaml # Validate tool YAML
321
- matimo test calculator # Test tool
100
+ ```typescript
101
+ @tool('slack-send-message')
102
+ async sendMessage(channel: string, text: string) { /* Auto-executed */ }
322
103
  ```
323
104
 
324
- ## Tool Definition (YAML)
325
-
326
- Tools are defined once in YAML, executed everywhere. Each tool specifies its execution type, parameters, schema, and auth:
105
+ ### 3️⃣ LangChain Integration
327
106
 
328
- ```yaml
329
- name: calculator
330
- version: 1.0.0
331
- description: Perform basic mathematical operations
332
-
333
- parameters:
334
- operation:
335
- type: string
336
- enum: [add, subtract, multiply, divide]
337
- required: true
338
- description: Mathematical operation
339
- a:
340
- type: number
341
- required: true
342
- description: First operand
343
- b:
344
- type: number
345
- required: true
346
- description: Second operand
347
-
348
- execution:
349
- type: command
350
- command: ts-node
351
- args: ['tools/calculator/calculator.ts', '{operation}', '{a}', '{b}']
352
- timeout: 30000
353
-
354
- output_schema:
355
- type: object
356
- properties:
357
- result:
358
- type: number
359
- description: Calculation result
360
-
361
- error_handling:
362
- retry: 3
363
- backoff_type: exponential
364
- initial_delay_ms: 1000
107
+ ```typescript
108
+ const tools = matimo.listTools().map(tool => ({
109
+ type: 'function',
110
+ function: { name: tool.name, description: tool.description, ... }
111
+ }));
365
112
  ```
366
113
 
367
- ### Execution Types
114
+ See [SDK Usage Patterns](./docs/user-guide/SDK_PATTERNS.md) and [LangChain Integration](./docs/framework-integrations/LANGCHAIN.md) for details.
368
115
 
369
- **Implemented:**
370
-
371
- - **`command`** — Shell commands with parameter templating
372
- - **`http`** — REST APIs with auth and response validation
116
+ ---
373
117
 
374
- **Coming:**
118
+ ## Installation
375
119
 
376
- - **`script`** Safe JavaScript/Python execution (sandboxed)
377
- - **`docker`** — Containerized execution
378
- - **`custom`** — External executables
120
+ ### From npm (Recommended)
379
121
 
380
- ## Architecture
122
+ ```bash
123
+ npm install matimo
381
124
 
382
- ```
383
- ┌─────────────────────────────────────────────┐
384
- │ AI Agents & Frameworks │
385
- │ (Claude, LangChain, CrewAI, Custom) │
386
- └──────────┬────────────────┬─────────────────┘
387
- │ │
388
- ┌─────▼─────┐ ┌─────▼─────┐
389
- │ SDK │ │ MCP │
390
- │ │ │ │
391
- └─────┬─────┘ └──────┬────┘
392
- │ │
393
- └────────┬───────┘
394
-
395
- ┌──────────▼──────────┐
396
- │ Matimo Core │
397
- │ - Loader │
398
- │ - Validator │
399
- │ - Executors │
400
- └──────────┬──────────┘
401
-
402
- ┌────────────┼────────────┐
403
- │ │ │
404
- ▼ ▼ ▼
405
- ┌────────┐ ┌──────────┐ ┌────────┐
406
- │Command │ │ HTTP │ │ Schema │
407
- │Exec │ │ Exec │ │Validate│
408
- └────────┘ └──────────┘ └────────┘
409
- │ │ │
410
- └────────────┼────────────┘
411
-
412
- ┌───────────▼───────────┐
413
- │ Tool Definitions │
414
- │ (YAML/JSON files) │
415
- │ calculator │
416
- │ http-client │
417
- │ echo-tool │
418
- │ 1000+ coming soon │
419
- └───────────────────────┘
125
+ # Install tool providers
126
+ npm install @matimo/slack @matimo/gmail
420
127
  ```
421
128
 
422
- ## Project Structure
129
+ Then use with auto-discovery:
423
130
 
131
+ ```typescript
132
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
424
133
  ```
425
- matimo/
426
- ├── src/
427
- │ ├── core/ # Core types, schemas
428
- │ ├── executors/ # Command & HTTP execution
429
- │ ├── decorators/ # @tool decorator pattern
430
- │ ├── mcp/ # MCP server
431
- │ ├── cli/ # CLI interface
432
- │ ├── errors/ # Error handling
433
- │ └── logging/ # Structured logging
434
- ├── tools/
435
- │ ├── calculator/ # Calculator tool
436
- │ ├── echo-tool/ # Echo tool
437
- │ └── http-client/ # HTTP client tool
438
- ├── test/ # tests
439
- │ ├── unit/
440
- │ └── integration/
441
- ├── docs/
442
- │ ├── quick-start.md
443
- │ ├── api.md
444
- │ ├── tool-spec.md
445
- │ └── ...
446
- └── package.json
447
- ```
448
-
449
- ## Development
450
134
 
451
- ### Prerequisites
452
-
453
- - **Node.js** 18+
454
- - **pnpm** 8.15+
455
- - **TypeScript** 5.9+
456
-
457
- ### Setup
135
+ ### Matimo CLI (Tool Management)
458
136
 
459
137
  ```bash
460
- git clone https://github.com/tallclub/matimo.git
461
- cd matimo
462
- pnpm install
463
- pnpm build
464
- ```
138
+ npm install -g @matimo/cli
465
139
 
466
- ### Commands
467
-
468
- ```bash
469
- pnpm build # Compile TypeScript
470
- pnpm test # Run all tests
471
- pnpm test:watch # Watch mode
472
- pnpm test:coverage # Coverage report
473
- pnpm lint # ESLint
474
- pnpm format # Prettier formatting
140
+ matimo list # Show installed packages
141
+ matimo search email # Find tools
142
+ matimo install slack # Install tools
475
143
  ```
476
144
 
477
- ### Testing
145
+ See [CLI Docs](./packages/cli/README.md) for full reference.
478
146
 
479
- Matimo uses Jest with TypeScript. Tests follow TDD principles:
147
+ ### From Source (Contributors)
480
148
 
481
149
  ```bash
482
- pnpm test # All tests
483
- pnpm test types.test.ts # Specific file
484
- pnpm test:watch # Watch mode
485
- pnpm test:coverage # Coverage (target: 80%+)
486
- ```
487
-
488
- **Coverage Target:** 80%+ (currently 112 tests, 11+ suites)
489
-
490
- ## Community
491
-
492
- We welcome contributions!
493
-
494
- ### Getting Started
495
-
496
- 1. **Fork** the repository
497
- 2. **Create branch** (`git checkout -b feature/amazing-feature`)
498
- 3. **Write tests first** (TDD approach)
499
- 4. **Make changes**
500
- 5. **Run tests** (`pnpm test && pnpm lint`)
501
- 6. **Commit** with conventional commits
502
- 7. **Push** and open PR
503
-
504
- ### Commit Format
505
-
506
- We enforce [Conventional Commits](https://www.conventionalcommits.org/):
507
-
508
- ```
509
- feat(scope): short description
510
- fix(executor): validate parameters
511
- docs(readme): update guide
512
- test(decorator): add tests
150
+ git clone https://github.com/tallclub/matimo
151
+ cd matimo && pnpm install && pnpm build
152
+ pnpm test
153
+ cd examples/tools && pnpm install && pnpm agent:factory
513
154
  ```
514
155
 
515
- ### What Can You Contribute?
516
-
517
- - Core SDK improvements
518
- - Bug fixes
519
- - Documentation
520
- - Test coverage
521
- - Tool definitions
522
- - New executor types
523
- - Performance optimizations
524
- - Security
525
- - Ideas
526
-
527
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for detailed guidelines.
528
-
529
- ## Documentation
530
-
531
- - **[Quick Start](./docs/getting-started/QUICK_START.md)** — Get up and running in 5 minutes
532
- - **[API Reference](./docs/api-reference/SDK.md)** — Complete SDK API
533
- - **[Tool Specification](./docs/tool-development/TOOL_SPECIFICATION.md)** — How to write YAML tools
534
- - **[Decorator Guide](./docs/tool-development/DECORATOR_GUIDE.md)** — Using @tool decorators
535
- - **[Commit Guidelines](./docs/community/COMMIT_GUIDELINES.md)** — Conventional commits
536
- - **[Development Standards](./docs/user-guide/DEVELOPMENT_STANDARDS.md)** — Code quality rules
537
- - **[Architecture Overview](./docs/architecture/OVERVIEW.md)** — System design and patterns
538
- - **[Framework Integrations](./docs/framework-integrations/LANGCHAIN.md)** — LangChain, CrewAI patterns
539
-
540
- ## Roadmap
541
-
542
- ### Foundation (Complete)
543
-
544
- **Completed:**
545
-
546
- - Tool loading (YAML/JSON)
547
- - Command & HTTP executors
548
- - Factory & Decorator patterns
549
- - Tool registry & discovery
550
- - 112+ tests (100% passing)
551
- - Full TypeScript strict mode
552
-
553
- ### Reliability (Coming)
554
-
555
- **Upcoming:**
556
-
557
- - MCP server (Claude integration)
558
- - CLI tool management
559
- - REST API server
560
- - OAuth2 authentication
561
- - Rate limiting
562
- - Health monitoring
563
-
564
- ### Ecosystem (Coming)
156
+ ---
565
157
 
566
- **Future:**
158
+ ## Features **Coming Soon:**
567
159
 
160
+ - More tool providers (Stripe, Twilio, Notion, etc.)
568
161
  - Python SDK
569
- - MCP
570
- - Skills/Workflows (multi-tool orchestration)
571
- - 2000+ pre-configured tools
162
+ - Custom Tool Marketplace
163
+ - MCP Server support
572
164
 
573
- ## Performance Benchemark Expected
165
+ ---
574
166
 
575
- - **Tool Execution:** <100ms overhead per call
576
- - **Schema Validation:** <10ms per request
577
- - **Memory:** ~50MB base + 1-2MB per loaded tool
578
- - **Concurrency:** 100+ simultaneous tools
167
+ ## Adding Tools to Matimo
579
168
 
580
- ## Security
169
+ If you build @matimo/<provider> following this pattern, we’ll list it in the official docs and README with you as maintainer.
581
170
 
582
- ### Implemented
171
+ Create tool providers as independent npm packages:
583
172
 
584
- **Currently:**
173
+ ```bash
174
+ mkdir packages/github
175
+ cd packages/github && cat > package.json << 'EOF'
176
+ { "name": "@matimo/github", "type": "module", ... }
177
+ EOF
178
+
179
+ mkdir tools/github-create-issue
180
+ cat > tools/github-create-issue/definition.yaml << 'EOF'
181
+ name: github-create-issue
182
+ parameters:
183
+ owner: { type: string, required: true }
184
+ repo: { type: string, required: true }
185
+ title: { type: string, required: true }
186
+ execution:
187
+ type: http
188
+ method: POST
189
+ url: https://api.github.com/repos/{owner}/{repo}/issues
190
+ headers:
191
+ Authorization: "Bearer {GITHUB_TOKEN}"
192
+ EOF
193
+ ```
585
194
 
586
- - No hardcoded credentials (environment variables only)
587
- - Input validation (Zod schemas)
588
- - Safe error messages (no secret leaks)
589
- - Full TypeScript strict mode
195
+ Then publish to npm as `@matimo/github`. Users install and auto-discover:
590
196
 
591
- ### Coming
197
+ ```bash
198
+ npm install @matimo/github
199
+ # New tools automatically available!
200
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
201
+ ```
592
202
 
593
- **Next:**
203
+ See [Adding Tools to Matimo](./docs/tool-development/ADDING_TOOLS.md) for the complete 6-step guide.
594
204
 
595
- - Response validation against schemas
596
- - Health monitoring (detect API changes)
597
- - OAuth2 token management
598
- - Rate limiting
205
+ ---
599
206
 
600
- **Future:**
207
+ ## Documentation
601
208
 
602
- - Sandboxed execution (Docker/Firejail)
603
- - Encryption at rest
604
- - Audit logging
605
- - Zero-trust architecture
209
+ - [Getting Started](./docs/getting-started/)
210
+ - [API Reference](./docs/api-reference/SDK.md)
211
+ - [Tool Development](./docs/tool-development/ADDING_TOOLS.md)
212
+ - [Architecture Overview](./docs/architecture/OVERVIEW.md)
213
+ - [Contributing](./CONTRIBUTING.md)
606
214
 
607
- See [SECURITY.md](./SECURITY.md) for detailed guidelines.
215
+ ---
608
216
 
609
217
  ## License
610
218
 
611
219
  MIT © 2026 Matimo Contributors
612
220
 
613
- ## Support
614
-
615
- - 📖 [Docs](./docs)
616
- - 💬 [Discussions](https://github.com/tallclub/matimo/discussions)
617
- - 🐛 [Issues](https://github.com/tallclub/matimo/issues)
618
-
619
- ## Contributors
620
-
621
- <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
622
- [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)
623
- <!-- ALL-CONTRIBUTORS-BADGE:END -->
624
-
625
- <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
626
- <!-- prettier-ignore-start -->
627
- <!-- markdownlint-disable -->
628
- <table>
629
- <tbody>
630
- <tr>
631
- <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%;"/>
632
- </tr>
633
- </tbody>
634
- </table>
221
+ ---
635
222
 
636
- <!-- markdownlint-restore -->
637
- <!-- prettier-ignore-end -->
223
+ ## Support the Project
638
224
 
639
- <!-- ALL-CONTRIBUTORS-LIST:END -->
225
+ - ⭐ Star the repo
226
+ - 🐛 Open issues for bugs or features
227
+ - 🔀 Submit PRs (see [Contributing](./CONTRIBUTING.md))
228
+ Best way to help: add a new provider (Notion, Jira, Stripe, Twilio…) or expand existing toolsets.
229
+ - 📢 Share on Twitter, Reddit, Discord
640
230
 
641
- Contributions are welcome — see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.
231
+ ---
642
232
 
643
- ## Star History
233
+ ## Contributors
644
234
 
645
- [![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)
235
+ <a href="https://github.com/tallclub/matimo/graphs/contributors">
236
+ <img src="https://contrib.rocks/image?repo=tallclub/matimo" />
237
+ </a>
646
238
 
647
239
  ---
648
240
 
649
- **Ready to integrate AI tools across your framework?**
241
+ ## Star History
650
242
 
651
- [Get Started Now →](./docs/QUICK_START.md)
243
+ [![Star History Chart](https://api.star-history.com/svg?repos=tallclub/matimo&type=Date)](https://star-history.com/#tallclub/matimo&Date)