@matimo/core 0.1.0-alpha.4 โ†’ 0.1.0-alpha.5

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 (2) hide show
  1. package/README.md +86 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @matimo/core โ€” Core SDK for Matimo
2
+
3
+ Matimo core provides the TypeScript SDK that loads, validates, and executes YAML-defined tools across frameworks.
4
+
5
+ ## ๐Ÿ“ฆ Installation
6
+
7
+ Install the unified package (includes core exports):
8
+
9
+ ```bash
10
+ # install unscope package which includes core and cli
11
+ npm install matimo
12
+ pnpm add matimo
13
+ # or install scoped core package directly
14
+ npm insatll @matimo/core
15
+ pnpm add @matimo/core
16
+ ```
17
+
18
+ ## ๐Ÿ”ง Purpose
19
+
20
+ `@matimo/core` contains:
21
+
22
+ - `MatimoInstance` โ€” initialization, discovery, registry, and execution API
23
+ - Executors (command, http, function)
24
+ - Decorator utilities (`@tool`, `setGlobalMatimoInstance`)
25
+ - Zod-based schema validation for YAML tool definitions
26
+ - Error types (`MatimoError`) and structured error codes
27
+
28
+ This package is intended to be imported by applications, CLIs, and provider packages.
29
+
30
+ ## ๐Ÿš€ Quick Start
31
+
32
+ ```typescript
33
+ import { MatimoInstance } from 'matimo';
34
+
35
+ // Auto-discover installed @matimo/* tool packages
36
+ const matimo = await MatimoInstance.init({ autoDiscover: true });
37
+
38
+ // List tools
39
+ console.log('Loaded', matimo.listTools().length, 'tools');
40
+
41
+ // Execute a tool
42
+ await matimo.execute('calculator', { operation: 'add', a: 1, b: 2 });
43
+ ```
44
+
45
+ ## ๐Ÿงฉ Usage Patterns
46
+
47
+ - Factory pattern: `MatimoInstance.init()` + `matimo.execute()`
48
+ - Decorator pattern: use `@tool()` and `setGlobalMatimoInstance()` for class-based code
49
+ - LangChain integration: convert Matimo tools to LangChain function schemas
50
+
51
+ See the full SDK docs: [docs/api-reference/SDK.md](../../docs/api-reference/SDK.md)
52
+
53
+ ## ๐Ÿ” Authentication
54
+
55
+ Tools declare authentication in their YAML definitions. `@matimo/core` supports:
56
+
57
+ - API keys (header/query)
58
+ - Bearer/basic tokens
59
+ - OAuth2 (provider integrations handled in provider packages)
60
+
61
+ Tokens are injected from environment variables by convention (for example `SLACK_BOT_TOKEN`, `GMAIL_ACCESS_TOKEN`).
62
+
63
+ ## ๐Ÿงช Testing & Development
64
+
65
+ To run core package tests:
66
+
67
+ ```bash
68
+ pnpm --filter "@matimo/core" test
69
+ ```
70
+
71
+ To build:
72
+
73
+ ```bash
74
+ pnpm --filter "@matimo/core" build
75
+ ```
76
+
77
+ ## ๐Ÿ“š Contributing
78
+
79
+ See the project CONTRIBUTING guide and `docs/tool-development/ADDING_TOOLS.md` for adding provider packages and tools.
80
+
81
+ - Contributing: https://github.com/tallclub/matimo/blob/main/CONTRIBUTING.md
82
+ - Add tools: ../../docs/tool-development/ADDING_TOOLS.md
83
+
84
+ ---
85
+
86
+ Part of the Matimo ecosystem โ€” define tools once, use them everywhere.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matimo/core",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "Core SDK for Matimo: Framework-agnostic YAML-driven tool ecosystem for AI agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",