matimo 0.1.2 → 0.1.3

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.
package/README.md ADDED
@@ -0,0 +1,338 @@
1
+ # Matimo — Enable AI Agents To Build Themselves
2
+
3
+ <p align="center">
4
+ <img src="https://raw.githubusercontent.com/tallclub/matimo/main/docs/assets/logo.png" alt="Matimo Logo" width="300" />
5
+ </p>
6
+ <p align="center">
7
+ <strong>Self-extending agents with enterprise-grade control</strong>
8
+ </p>
9
+
10
+ <p align="center">
11
+ <a href="https://github.com/tallclub/matimo/actions/workflows/ci.yml?branch=main"><img src="https://img.shields.io/github/actions/workflow/status/tallclub/matimo/ci.yml?branch=main&style=for-the-badge" alt="CI status"></a>
12
+ <a href="https://www.npmjs.com/package/matimo"><img src="https://img.shields.io/npm/v/matimo.svg?style=for-the-badge" alt="npm version"></a>
13
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge" alt="MIT License"></a>
14
+ <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.9+-blue?style=for-the-badge" alt="TypeScript"></a>
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
+ </p>
17
+
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>
21
+
22
+ ## The TypeScript AI SDK with Meta-Tools, Policy Engine, Governance and Human-in-the-Loop Control
23
+
24
+ Give your agents **137+ production-ready tools** to start. Then activate **10 meta-tools** that let them create, validate, and approve new capabilities at runtime — governed by your **policy engine** with **human approval workflows** for critical actions.
25
+
26
+ **Why this matters:**
27
+
28
+ - 🔧 **Meta-Tools**: Agents write new tool definitions in YAML, validate schemas, approve for production, and hot-reload — all mid-conversation. No restart. No redeployment.
29
+
30
+ - 🛡️ **Policy Engine**: Classify every action by risk level (low/medium/high/critical). Block dangerous operations. Quarantine draft tools. Enforce your rules automatically.
31
+
32
+ - 🤝 **Human-in-the-Loop (HITL)**: Critical tools require human approval before execution. Configurable timeouts, approval manifests, audit trails. You stay in control.
33
+
34
+ - 🌐 **Universal Integration**: One YAML definition works across TypeScript, LangChain, Claude MCP, OpenAI. Write once, run everywhere.
35
+
36
+ > **Python SDK?** Install [`matimo` on PyPI](https://pypi.org/project/matimo/) — full feature parity with TypeScript.
37
+
38
+ ---
39
+
40
+ ### See It In Action
41
+
42
+ ```typescript
43
+ // Agent encounters a new API mid-task
44
+ const result = await matimo.execute('matimo_create_tool', {
45
+ name: 'stripe_create_payment',
46
+ definition: yamlContent, // Agent generates this
47
+ });
48
+
49
+ // Policy engine classifies risk → requires approval
50
+ // HITL callback triggers → human reviews and approves
51
+
52
+ await matimo.execute('matimo_reload_tools');
53
+
54
+ // Tool is now live and production-ready
55
+ const payment = await matimo.execute('stripe_create_payment', {
56
+ amount: 5000,
57
+ currency: 'usd',
58
+ });
59
+ ```
60
+
61
+ **Other SDKs give agents a toolbox. Matimo gives them a workshop — with safety guardrails.**
62
+
63
+ 🎯 **v0.1.0 Stable** (May 1, 2026) — 2,996 tests · 95%+ coverage · Production-ready
64
+
65
+ [📖 Documentation](https://github.com/tallclub/matimo/tree/main/docs) · [🚀 Quick Start](https://github.com/tallclub/matimo/blob/main/docs/getting-started/QUICK_START.md) · [📚 API Reference](https://github.com/tallclub/matimo/blob/main/docs/api-reference/SDK.md) · [🛠️ Add Tools](https://github.com/tallclub/matimo/blob/main/docs/tool-development/ADDING_TOOLS.md)
66
+
67
+ ---
68
+
69
+ ## Quick Start
70
+
71
+ ### Installation
72
+
73
+ ```bash
74
+ # Install the SDK + auto-discover provider tools
75
+ npm install matimo
76
+ npm install matimo @matimo/slack @matimo/gmail
77
+ ```
78
+
79
+ ### Minimal Example
80
+
81
+ ```typescript
82
+ import { MatimoInstance } from '@matimo/core';
83
+
84
+ const matimo = await MatimoInstance.init({
85
+ autoDiscover: true,
86
+ });
87
+
88
+ const result = await matimo.execute('slack_send_channel_message', {
89
+ channel: '#general',
90
+ text: 'Hello from Matimo!',
91
+ });
92
+ ```
93
+
94
+ ---
95
+
96
+ ## What's Included
97
+
98
+ - **Core Tools**: File I/O, Web fetch, Command execution, Code search
99
+ - **MCP Server**: Expose all tools via stdio or Streamable HTTP to Claude Desktop, Cursor, Windsurf, and any MCP client (`npx matimo mcp`)
100
+ - **Slack Integration**: Send messages, manage channels, reactions, threads, DMs
101
+ - **Gmail Integration**: Send/read email, manage threads, drafts
102
+ - **GitHub Integration**: Issues, pull requests, releases, code search
103
+ - **Notion Integration**: Pages, databases, blocks, search
104
+ - **HubSpot Tools**: Contacts, companies, deals, tickets
105
+ - **Postgres Tools**: Query/modify data with safety checks
106
+ - **Twilio Tools**: Send SMS/MMS, manage messages
107
+ - **Mailchimp Tools**: Audiences, subscribers, email campaigns
108
+ - **Auto-Discovery**: Automatic detection of `@matimo/*` providers from npm
109
+ - **Matimo CLI**: Tool discovery, setup wizard, MCP config generation
110
+ - **OAuth2 Support**: Provider-agnostic authorization for Slack, Gmail, GitHub, etc.
111
+ - **Framework Support**: Factory pattern, Decorator pattern, LangChain
112
+ - **Agent Skills System**: [SKILL.md](https://agentskills.io) knowledge files with semantic search, content chunking, and progressive disclosure
113
+ - **Policy Engine**: 9 security rules, HITL quarantine, hot-reload, SHA-256 integrity tracking, HMAC approvals, audit events
114
+
115
+ ---
116
+
117
+ ## Four Integration Patterns
118
+
119
+ ### 1️⃣ Factory Pattern (Simplest)
120
+
121
+ ```typescript
122
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
123
+ const result = await matimo.execute('calculator', { operation: 'add', a: 5, b: 3 });
124
+ ```
125
+
126
+ ### 2️⃣ Decorator Pattern (Class-Based)
127
+
128
+ ```typescript
129
+ @tool('slack_send_channel_message')
130
+ async sendMessage(channel: string, text: string) { /* Auto-executed */ }
131
+ ```
132
+
133
+ ### 3️⃣ LangChain Integration
134
+
135
+ ```typescript
136
+ import { convertToolsToLangChain } from 'matimo';
137
+ const tools = convertToolsToLangChain(matimo.listTools(), matimo);
138
+ ```
139
+
140
+ ### 4️⃣ MCP Server (Claude Desktop, Cursor, Windsurf, any MCP client)
141
+
142
+ ```bash
143
+ # Expose all installed @matimo/* tools via MCP in one command
144
+ npx matimo mcp
145
+
146
+ # Run the setup wizard to get a ready-to-paste client config
147
+ npx matimo mcp setup
148
+
149
+ # HTTP mode for remote access / Docker
150
+ npx matimo mcp --transport http --port 3000 --self-signed
151
+ ```
152
+
153
+ See [MCP Docs](https://github.com/tallclub/matimo/blob/main/docs/MCP.md) for the full reference.
154
+
155
+ ---
156
+
157
+ ## Installation
158
+
159
+ ```bash
160
+ npm install matimo
161
+
162
+ # Install tool providers
163
+ npm install @matimo/slack @matimo/gmail
164
+ ```
165
+
166
+ Then use with auto-discovery:
167
+
168
+ ```typescript
169
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
170
+ ```
171
+
172
+ ### Matimo CLI (Tool Management)
173
+
174
+ ```bash
175
+ npm install -g @matimo/cli
176
+
177
+ matimo list # Show installed packages
178
+ matimo search email # Find tools
179
+ matimo install slack # Install a provider
180
+ ```
181
+
182
+ ### From Source (Contributors)
183
+
184
+ ```bash
185
+ git clone https://github.com/tallclub/matimo
186
+ cd matimo && pnpm install && pnpm build
187
+ pnpm test
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Skills System
193
+
194
+ Matimo supports the [Agent Skills specification](https://agentskills.io) — structured knowledge files (`SKILL.md`) that teach agents domain expertise at runtime.
195
+
196
+ ```typescript
197
+ // Discover available skills (Level 1 — metadata only)
198
+ const skills = matimo.listSkills();
199
+
200
+ // Load a specific skill (Level 2 — full content)
201
+ const skill = matimo.getSkill('slack');
202
+
203
+ // Load only the sections you need (smart context management)
204
+ const content = matimo.getSkillContent('postgres', {
205
+ sections: ['Error Handling', 'Parameterized Queries'],
206
+ maxTokens: 500,
207
+ });
208
+
209
+ // Semantic search across all skills
210
+ const results = await matimo.semanticSearchSkills('How do I handle rate limiting?');
211
+ ```
212
+
213
+ **Each provider ships one skill** with domain knowledge for all its tools. Agents load skills on demand — no context bloat.
214
+
215
+ See [Skills Documentation](https://github.com/tallclub/matimo/blob/main/docs/skills/SKILLS.md) for the full guide.
216
+
217
+ ---
218
+
219
+ ## Policy Engine & HITL
220
+
221
+ Matimo includes a defense-in-depth policy engine for agent tool usage:
222
+
223
+ ```typescript
224
+ const matimo = await MatimoInstance.init({
225
+ toolPaths: ['./tools', './agent-tools'],
226
+ policyFile: './policy.yaml', // 9 security rules, domain allowlists
227
+ untrustedPaths: ['./agent-tools'], // Agent-created tools validated here
228
+ onHITL: async (request) => {
229
+ // Human-in-the-loop quarantine
230
+ console.log(`Approve ${request.toolName}? Risk: ${request.riskLevel}`);
231
+ return promptUser();
232
+ },
233
+ onEvent: (event) => auditLog.push(event),
234
+ });
235
+
236
+ // Hot-reload policy at runtime (no restart needed)
237
+ await matimo.reloadPolicy('./policy-prod.yaml');
238
+ ```
239
+
240
+ **Key features:**
241
+
242
+ - 9 deterministic security rules (SSRF detection, namespace protection, credential allowlists)
243
+ - HITL quarantine — medium-risk tools pause for human approval instead of auto-rejecting
244
+ - Policy hot-reload — swap policies at runtime with automatic tool re-validation
245
+ - SHA-256 integrity tracking + HMAC approval manifest
246
+ - Full audit trail via structured events
247
+
248
+ See [Policy & Lifecycle Docs](https://github.com/tallclub/matimo/blob/main/docs/api-reference/POLICY_AND_LIFECYCLE.md) for the complete reference.
249
+
250
+ ---
251
+
252
+ ## Adding Tools to Matimo
253
+
254
+ Create tool providers as independent npm packages. If you build `@matimo/<provider>` following this pattern, we'll list it in the official docs and README with you as maintainer.
255
+
256
+ ```bash
257
+ mkdir packages/github
258
+ cd packages/github && cat > package.json << 'EOF'
259
+ { "name": "@matimo/github", "type": "module", ... }
260
+ EOF
261
+
262
+ mkdir tools/github-create-issue
263
+ cat > tools/github-create-issue/definition.yaml << 'EOF'
264
+ name: github-create-issue
265
+ parameters:
266
+ owner: { type: string, required: true }
267
+ repo: { type: string, required: true }
268
+ title: { type: string, required: true }
269
+ execution:
270
+ type: http
271
+ method: POST
272
+ url: https://api.github.com/repos/{owner}/{repo}/issues
273
+ headers:
274
+ Authorization: "Bearer {GITHUB_TOKEN}"
275
+ EOF
276
+ ```
277
+
278
+ Then publish to npm as `@matimo/github`. Users install and auto-discover:
279
+
280
+ ```bash
281
+ npm install @matimo/github
282
+ # New tools automatically available!
283
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
284
+ ```
285
+
286
+ See [Adding Tools to Matimo](https://github.com/tallclub/matimo/blob/main/docs/tool-development/ADDING_TOOLS.md) for the complete guide.
287
+
288
+ ---
289
+
290
+ ## Documentation
291
+
292
+ - [Getting Started](https://github.com/tallclub/matimo/tree/main/docs/getting-started)
293
+ - [API Reference](https://github.com/tallclub/matimo/blob/main/docs/api-reference/SDK.md)
294
+ - [Skills System](https://github.com/tallclub/matimo/blob/main/docs/skills/SKILLS.md)
295
+ - [Policy Engine & Tool Lifecycle](https://github.com/tallclub/matimo/blob/main/docs/api-reference/POLICY_AND_LIFECYCLE.md)
296
+ - [LangChain Integration](https://github.com/tallclub/matimo/blob/main/docs/framework-integrations/LANGCHAIN.md)
297
+ - [Tool Development](https://github.com/tallclub/matimo/blob/main/docs/tool-development/ADDING_TOOLS.md)
298
+ - [Architecture Overview](https://github.com/tallclub/matimo/blob/main/docs/architecture/OVERVIEW.md)
299
+ - [Contributing](https://github.com/tallclub/matimo/blob/main/CONTRIBUTING.md)
300
+ - [Python SDK on PyPI](https://pypi.org/project/matimo/)
301
+
302
+ ---
303
+
304
+ ## License
305
+
306
+ MIT © 2026 Matimo Contributors
307
+
308
+ ---
309
+
310
+ ## Support the Project
311
+
312
+ - ⭐ Star the repo
313
+ - 🐛 Open issues for bugs or features
314
+ - 🔀 Submit PRs (see [Contributing](https://github.com/tallclub/matimo/blob/main/CONTRIBUTING.md))
315
+ - 📢 Share on Twitter, Reddit, Discord
316
+
317
+ ---
318
+
319
+ ## Contributors
320
+
321
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
322
+ <!-- prettier-ignore-start -->
323
+ <!-- markdownlint-disable -->
324
+
325
+ <div align="left">
326
+ <a href="https://github.com/tallclub"><img src="https://avatars.githubusercontent.com/u/112923179?v=4&s=60" width="60" height="60" style="border-radius:50%;margin:0 10px;" alt="tallclub" title="tallclub - Code 💻 Documentation 📖 Design 🎨 Review 👀 Ideas 🤔 Maintenance 🚧"/></a>
327
+ <a href="https://github.com/Genmin"><img src="https://avatars.githubusercontent.com/u/90125084?v=4&s=60" width="60" height="60" style="border-radius:50%;margin:0 10px;" alt="Genmin" title="Genmin - Code 💻 Security 🛡️"/></a>
328
+ </div>
329
+
330
+ <!-- markdownlint-enable -->
331
+ <!-- prettier-ignore-end -->
332
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
333
+
334
+ ---
335
+
336
+ ## Star History
337
+
338
+ [![Star History Chart](https://api.star-history.com/svg?repos=tallclub/matimo&type=Date)](https://star-history.com/#tallclub/matimo&Date)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "matimo",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "A framework-agnostic SDK with pre-built providers, a skills knowledge layer, MCP out of the box, and agents that autonomously build new capabilities — governed by a policy engine you control.",
5
5
  "main": "packages/core/dist/index.js",
6
6
  "types": "packages/core/dist/index.d.ts",
@@ -57,8 +57,8 @@
57
57
  "access": "public"
58
58
  },
59
59
  "dependencies": {
60
- "@matimo/cli": "0.1.2",
61
- "@matimo/core": "0.1.2"
60
+ "@matimo/cli": "0.1.3",
61
+ "@matimo/core": "0.1.3"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@commitlint/cli": "^20.3.1",
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Runtime-safe public surface for built-in tool files.
3
+ *
4
+ * Keep this entrypoint intentionally narrow to avoid coupling tools to the
5
+ * full package barrel and to reduce circular dependency risk.
6
+ */
7
+ export { MatimoError, ErrorCode } from '../errors/matimo-error.js';
8
+ export { getGlobalMatimoLogger } from '../logging/index.js';
9
+ export { getGlobalApprovalHandler } from '../approval/approval-handler.js';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Runtime-safe public surface for built-in tool files.
3
+ *
4
+ * Keep this entrypoint intentionally narrow to avoid coupling tools to the
5
+ * full package barrel and to reduce circular dependency risk.
6
+ */
7
+ export { MatimoError, ErrorCode } from '../errors/matimo-error.js';
8
+ export { getGlobalMatimoLogger } from '../logging/index.js';
9
+ export { getGlobalApprovalHandler } from '../approval/approval-handler.js';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC"}