matimo 0.1.0-alpha.1 → 0.1.0-alpha.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 +83 -28
- package/dist/core/schema.d.ts +1 -1
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +8 -3
- package/dist/core/schema.js.map +1 -1
- package/dist/core/tool-loader.d.ts.map +1 -1
- package/dist/core/tool-loader.js +15 -4
- package/dist/core/tool-loader.js.map +1 -1
- package/dist/core/tool-registry.d.ts.map +1 -1
- package/dist/core/tool-registry.js +5 -1
- package/dist/core/tool-registry.js.map +1 -1
- package/dist/decorators/tool-decorator.d.ts.map +1 -1
- package/dist/decorators/tool-decorator.js +7 -4
- package/dist/decorators/tool-decorator.js.map +1 -1
- package/dist/encodings/parameter-encoding.d.ts.map +1 -1
- package/dist/encodings/parameter-encoding.js +9 -2
- package/dist/encodings/parameter-encoding.js.map +1 -1
- package/dist/executors/command-executor.d.ts.map +1 -1
- package/dist/executors/command-executor.js +5 -1
- package/dist/executors/command-executor.js.map +1 -1
- package/dist/executors/http-executor.d.ts.map +1 -1
- package/dist/executors/http-executor.js +5 -1
- package/dist/executors/http-executor.js.map +1 -1
- package/package.json +4 -4
- package/tools/calculator/calculator.ts +78 -0
- package/tools/calculator/definition.yaml +71 -0
- package/tools/echo-tool/definition.yaml +35 -0
- package/tools/examples/calculator.yaml +54 -0
- package/tools/examples/echo-tool.yaml +35 -0
- package/tools/examples/http-client.yaml +66 -0
- package/tools/github/definition.yaml +41 -0
- package/tools/gmail/README.md +1189 -0
- package/tools/gmail/create-draft/definition.yaml +99 -0
- package/tools/gmail/definition.yaml +49 -0
- package/tools/gmail/delete-message/definition.yaml +42 -0
- package/tools/gmail/get-message/definition.yaml +89 -0
- package/tools/gmail/list-messages/definition.yaml +84 -0
- package/tools/gmail/send-email/definition.yaml +95 -0
- package/tools/http-client/definition.yaml +73 -0
- package/tools/slack/README.md +200 -0
- package/tools/slack/assets/icon.svg +9 -0
- package/tools/slack/assets/logo-dark.svg +14 -0
- package/tools/slack/assets/logo-light.svg +14 -0
- package/tools/slack/assets/logo.svg +14 -0
- package/tools/slack/definition.yaml +54 -0
- package/tools/slack/get-user/definition.yaml +31 -0
- package/tools/slack/list-channels/definition.yaml +46 -0
- package/tools/slack/send-message/definition.yaml +30 -0
- package/tools/slack/slack_add_reaction/definition.yaml +45 -0
- package/tools/slack/slack_create_channel/definition.yaml +41 -0
- package/tools/slack/slack_get_channel_history/definition.yaml +58 -0
- package/tools/slack/slack_get_reactions/definition.yaml +36 -0
- package/tools/slack/slack_get_thread_replies/definition.yaml +45 -0
- package/tools/slack/slack_get_user_info/definition.yaml +32 -0
- package/tools/slack/slack_join_channel/definition.yaml +35 -0
- package/tools/slack/slack_reply_to_message/definition.yaml +49 -0
- package/tools/slack/slack_search_messages/definition.yaml +46 -0
- package/tools/slack/slack_send_channel_message/definition.yaml +34 -0
- package/tools/slack/slack_send_dm/definition.yaml +37 -0
- package/tools/slack/slack_set_channel_topic/definition.yaml +40 -0
- package/tools/slack/slack_upload_file/definition.yaml +152 -0
- package/docs/Gemfile +0 -5
- package/docs/RELEASES.md +0 -69
- package/docs/ROADMAP.md +0 -138
- package/docs/_config.yml +0 -27
- package/docs/api-reference/ERRORS.md +0 -445
- package/docs/api-reference/SDK.md +0 -582
- package/docs/api-reference/TYPES.md +0 -415
- package/docs/architecture/OAUTH.md +0 -1366
- package/docs/architecture/OVERVIEW.md +0 -564
- package/docs/assets/logo.png +0 -0
- package/docs/community/COMMIT_GUIDELINES.md +0 -552
- package/docs/framework-integrations/LANGCHAIN.md +0 -286
- package/docs/getting-started/QUICK_START.md +0 -211
- package/docs/getting-started/YOUR_FIRST_TOOL.md +0 -217
- package/docs/getting-started/installation.md +0 -124
- package/docs/index.md +0 -288
- package/docs/tool-development/DECORATOR_GUIDE.md +0 -633
- package/docs/tool-development/OAUTH_LINK.md +0 -5
- package/docs/tool-development/PROVIDER_CONFIGURATION.md +0 -458
- package/docs/tool-development/TESTING.md +0 -412
- package/docs/tool-development/TOOL_SPECIFICATION.md +0 -793
- package/docs/tool-development/YAML_TOOLS.md +0 -65
- package/docs/troubleshooting/FAQ.md +0 -391
- package/docs/user-guide/AUTHENTICATION.md +0 -255
- package/docs/user-guide/DEVELOPMENT_STANDARDS.md +0 -698
- package/docs/user-guide/SDK_PATTERNS.md +0 -316
- package/docs/user-guide/TOOL_DISCOVERY.md +0 -209
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matimo",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
4
|
-
"description": "Framework-agnostic YAML-driven tool ecosystem for AI agents.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
|
+
"description": "Universal tool provider SDK: Framework-agnostic YAML-driven tool ecosystem for AI agents. Execute 50+ pre-built tools (Slack, Gmail, GitHub, AWS, etc.) or define your own in YAML.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"dist",
|
|
48
|
+
"tools",
|
|
48
49
|
"README.md",
|
|
49
|
-
"LICENSE"
|
|
50
|
-
"docs"
|
|
50
|
+
"LICENSE"
|
|
51
51
|
],
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public"
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Calculator implementation
|
|
2
|
+
// This script is executed by the calculator tool
|
|
3
|
+
|
|
4
|
+
const [operation, aStr, bStr] = process.argv.slice(2);
|
|
5
|
+
const a = parseFloat(aStr);
|
|
6
|
+
const b = parseFloat(bStr);
|
|
7
|
+
|
|
8
|
+
// Normalize operation name to handle variations
|
|
9
|
+
const normalizeOperation = (op: string): string => {
|
|
10
|
+
const normalized = op.toLowerCase().trim();
|
|
11
|
+
|
|
12
|
+
// Map variations to canonical operation names
|
|
13
|
+
const operationMap: Record<string, string> = {
|
|
14
|
+
// Addition variants
|
|
15
|
+
'add': 'add',
|
|
16
|
+
'addition': 'add',
|
|
17
|
+
'sum': 'add',
|
|
18
|
+
'plus': 'add',
|
|
19
|
+
'+': 'add',
|
|
20
|
+
|
|
21
|
+
// Subtraction variants
|
|
22
|
+
'subtract': 'subtract',
|
|
23
|
+
'subtraction': 'subtract',
|
|
24
|
+
'minus': 'subtract',
|
|
25
|
+
'sub': 'subtract',
|
|
26
|
+
'-': 'subtract',
|
|
27
|
+
|
|
28
|
+
// Multiplication variants
|
|
29
|
+
'multiply': 'multiply',
|
|
30
|
+
'multiplication': 'multiply',
|
|
31
|
+
'times': 'multiply',
|
|
32
|
+
'product': 'multiply',
|
|
33
|
+
'mul': 'multiply',
|
|
34
|
+
'*': 'multiply',
|
|
35
|
+
'x': 'multiply',
|
|
36
|
+
|
|
37
|
+
// Division variants
|
|
38
|
+
'divide': 'divide',
|
|
39
|
+
'division': 'divide',
|
|
40
|
+
'div': 'divide',
|
|
41
|
+
'/': 'divide',
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return operationMap[normalized] || normalized;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const normalizedOp = normalizeOperation(operation);
|
|
48
|
+
|
|
49
|
+
let result: number;
|
|
50
|
+
|
|
51
|
+
switch (normalizedOp) {
|
|
52
|
+
case 'add':
|
|
53
|
+
result = a + b;
|
|
54
|
+
break;
|
|
55
|
+
case 'subtract':
|
|
56
|
+
result = a - b;
|
|
57
|
+
break;
|
|
58
|
+
case 'multiply':
|
|
59
|
+
result = a * b;
|
|
60
|
+
break;
|
|
61
|
+
case 'divide':
|
|
62
|
+
if (b === 0) {
|
|
63
|
+
console.error('Division by zero');
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
result = a / b;
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
console.error(`Unknown operation: ${operation}`);
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
console.log(JSON.stringify({
|
|
74
|
+
result,
|
|
75
|
+
operation: normalizedOp,
|
|
76
|
+
original_operation: operation,
|
|
77
|
+
operands: { a, b }
|
|
78
|
+
}));
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: calculator
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: "Perform basic arithmetic operations"
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
operation:
|
|
7
|
+
type: string
|
|
8
|
+
description: "The operation to perform. Accepts: add (addition, sum, plus), subtract (subtraction, minus), multiply (multiplication, times, product), divide (division)"
|
|
9
|
+
required: true
|
|
10
|
+
a:
|
|
11
|
+
type: number
|
|
12
|
+
description: "First operand"
|
|
13
|
+
required: true
|
|
14
|
+
b:
|
|
15
|
+
type: number
|
|
16
|
+
description: "Second operand"
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
execution:
|
|
20
|
+
type: command
|
|
21
|
+
command: "tsx"
|
|
22
|
+
args: ["tools/calculator/calculator.ts", "{operation}", "{a}", "{b}"]
|
|
23
|
+
|
|
24
|
+
output_schema:
|
|
25
|
+
type: object
|
|
26
|
+
properties:
|
|
27
|
+
result:
|
|
28
|
+
type: number
|
|
29
|
+
description: "Result of the operation"
|
|
30
|
+
operation:
|
|
31
|
+
type: string
|
|
32
|
+
operands:
|
|
33
|
+
type: object
|
|
34
|
+
properties:
|
|
35
|
+
a:
|
|
36
|
+
type: number
|
|
37
|
+
b:
|
|
38
|
+
type: number
|
|
39
|
+
|
|
40
|
+
error_handling:
|
|
41
|
+
retry: 2
|
|
42
|
+
backoff_type: exponential
|
|
43
|
+
initial_delay_ms: 500
|
|
44
|
+
|
|
45
|
+
examples:
|
|
46
|
+
- name: "Simple addition"
|
|
47
|
+
description: "Add 5 and 3"
|
|
48
|
+
params:
|
|
49
|
+
operation: "add"
|
|
50
|
+
a: 5
|
|
51
|
+
b: 3
|
|
52
|
+
- name: "Addition with variant"
|
|
53
|
+
description: "Add using 'addition' keyword"
|
|
54
|
+
params:
|
|
55
|
+
operation: "addition"
|
|
56
|
+
a: 10
|
|
57
|
+
b: 20
|
|
58
|
+
- name: "Subtraction"
|
|
59
|
+
description: "Subtract 3 from 10"
|
|
60
|
+
params:
|
|
61
|
+
operation: "subtract"
|
|
62
|
+
a: 10
|
|
63
|
+
b: 3
|
|
64
|
+
- name: "Multiplication"
|
|
65
|
+
description: "Multiply 4 and 7"
|
|
66
|
+
params:
|
|
67
|
+
operation: "multiply"
|
|
68
|
+
a: 4
|
|
69
|
+
b: 7
|
|
70
|
+
|
|
71
|
+
tags: [math, arithmetic, basic]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: echo-tool
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: "Echo back the input message - useful for testing"
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
message:
|
|
7
|
+
type: string
|
|
8
|
+
description: "The message to echo"
|
|
9
|
+
required: true
|
|
10
|
+
|
|
11
|
+
execution:
|
|
12
|
+
type: command
|
|
13
|
+
command: "echo"
|
|
14
|
+
args: ["{message}"]
|
|
15
|
+
|
|
16
|
+
output_schema:
|
|
17
|
+
type: object
|
|
18
|
+
properties:
|
|
19
|
+
message:
|
|
20
|
+
type: string
|
|
21
|
+
description: "The echoed message"
|
|
22
|
+
timestamp:
|
|
23
|
+
type: string
|
|
24
|
+
description: "ISO timestamp of execution"
|
|
25
|
+
|
|
26
|
+
error_handling:
|
|
27
|
+
retry: 1
|
|
28
|
+
|
|
29
|
+
examples:
|
|
30
|
+
- name: "Echo hello"
|
|
31
|
+
description: "Echo a greeting message"
|
|
32
|
+
params:
|
|
33
|
+
message: "Hello, Matimo!"
|
|
34
|
+
|
|
35
|
+
tags: [test, echo, basic]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: calculator
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: "Perform basic arithmetic operations"
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
operation:
|
|
7
|
+
type: string
|
|
8
|
+
description: "The operation to perform: add, subtract, multiply, divide"
|
|
9
|
+
required: true
|
|
10
|
+
enum: [add, subtract, multiply, divide]
|
|
11
|
+
a:
|
|
12
|
+
type: number
|
|
13
|
+
description: "First operand"
|
|
14
|
+
required: true
|
|
15
|
+
b:
|
|
16
|
+
type: number
|
|
17
|
+
description: "Second operand"
|
|
18
|
+
required: true
|
|
19
|
+
|
|
20
|
+
execution:
|
|
21
|
+
type: command
|
|
22
|
+
command: "node"
|
|
23
|
+
args: ["scripts/calculator.js", "{operation}", "{a}", "{b}"]
|
|
24
|
+
|
|
25
|
+
output_schema:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
result:
|
|
29
|
+
type: number
|
|
30
|
+
description: "Result of the operation"
|
|
31
|
+
operation:
|
|
32
|
+
type: string
|
|
33
|
+
operands:
|
|
34
|
+
type: object
|
|
35
|
+
properties:
|
|
36
|
+
a:
|
|
37
|
+
type: number
|
|
38
|
+
b:
|
|
39
|
+
type: number
|
|
40
|
+
|
|
41
|
+
error_handling:
|
|
42
|
+
retry: 2
|
|
43
|
+
backoff_type: exponential
|
|
44
|
+
initial_delay_ms: 500
|
|
45
|
+
|
|
46
|
+
examples:
|
|
47
|
+
- parameters:
|
|
48
|
+
operation: "add"
|
|
49
|
+
a: 5
|
|
50
|
+
b: 3
|
|
51
|
+
result:
|
|
52
|
+
result: 8
|
|
53
|
+
|
|
54
|
+
tags: [math, arithmetic, basic]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: echo-tool
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: "Echo back the input message - useful for testing"
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
message:
|
|
7
|
+
type: string
|
|
8
|
+
description: "The message to echo"
|
|
9
|
+
required: true
|
|
10
|
+
|
|
11
|
+
execution:
|
|
12
|
+
type: command
|
|
13
|
+
command: "echo"
|
|
14
|
+
args: ["{message}"]
|
|
15
|
+
|
|
16
|
+
output_schema:
|
|
17
|
+
type: object
|
|
18
|
+
properties:
|
|
19
|
+
message:
|
|
20
|
+
type: string
|
|
21
|
+
description: "The echoed message"
|
|
22
|
+
timestamp:
|
|
23
|
+
type: string
|
|
24
|
+
description: "ISO timestamp of execution"
|
|
25
|
+
|
|
26
|
+
error_handling:
|
|
27
|
+
retry: 1
|
|
28
|
+
|
|
29
|
+
examples:
|
|
30
|
+
- parameters:
|
|
31
|
+
message: "Hello, Matimo!"
|
|
32
|
+
result:
|
|
33
|
+
message: "Hello, Matimo!"
|
|
34
|
+
|
|
35
|
+
tags: [test, echo, basic]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: http-client
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: "Generic HTTP client for making API requests"
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
url:
|
|
7
|
+
type: string
|
|
8
|
+
description: "The URL to request"
|
|
9
|
+
required: true
|
|
10
|
+
method:
|
|
11
|
+
type: string
|
|
12
|
+
description: "HTTP method: GET, POST, PUT, DELETE"
|
|
13
|
+
required: false
|
|
14
|
+
default: "GET"
|
|
15
|
+
enum: [GET, POST, PUT, DELETE, PATCH]
|
|
16
|
+
headers:
|
|
17
|
+
type: object
|
|
18
|
+
description: "HTTP headers as key-value pairs"
|
|
19
|
+
required: false
|
|
20
|
+
body:
|
|
21
|
+
type: object
|
|
22
|
+
description: "Request body (for POST/PUT/PATCH)"
|
|
23
|
+
required: false
|
|
24
|
+
|
|
25
|
+
execution:
|
|
26
|
+
type: http
|
|
27
|
+
method: GET
|
|
28
|
+
url: "{url}"
|
|
29
|
+
headers: "{headers}"
|
|
30
|
+
body: "{body}"
|
|
31
|
+
|
|
32
|
+
output_schema:
|
|
33
|
+
type: object
|
|
34
|
+
properties:
|
|
35
|
+
status:
|
|
36
|
+
type: number
|
|
37
|
+
description: "HTTP status code"
|
|
38
|
+
statusText:
|
|
39
|
+
type: string
|
|
40
|
+
headers:
|
|
41
|
+
type: object
|
|
42
|
+
data:
|
|
43
|
+
type: object
|
|
44
|
+
description: "Response body"
|
|
45
|
+
|
|
46
|
+
error_handling:
|
|
47
|
+
retry: 3
|
|
48
|
+
backoff_type: exponential
|
|
49
|
+
initial_delay_ms: 1000
|
|
50
|
+
max_delay_ms: 10000
|
|
51
|
+
|
|
52
|
+
rate_limiting:
|
|
53
|
+
enabled: true
|
|
54
|
+
requests_per_minute: 60
|
|
55
|
+
|
|
56
|
+
examples:
|
|
57
|
+
- parameters:
|
|
58
|
+
url: "https://api.example.com/users"
|
|
59
|
+
method: "GET"
|
|
60
|
+
result:
|
|
61
|
+
status: 200
|
|
62
|
+
statusText: "OK"
|
|
63
|
+
data:
|
|
64
|
+
users: []
|
|
65
|
+
|
|
66
|
+
tags: [http, api, network, client]
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# GitHub OAuth2 Provider Definition
|
|
2
|
+
#
|
|
3
|
+
# This file defines the OAuth2 configuration for GitHub.
|
|
4
|
+
# All GitHub tools reference this provider definition.
|
|
5
|
+
#
|
|
6
|
+
# Users can override endpoints via environment variables or runtime config.
|
|
7
|
+
|
|
8
|
+
name: github-provider
|
|
9
|
+
type: provider
|
|
10
|
+
version: '1.0.0'
|
|
11
|
+
|
|
12
|
+
description: |
|
|
13
|
+
GitHub OAuth2 Provider Configuration
|
|
14
|
+
|
|
15
|
+
All GitHub tools use these endpoints for OAuth2 authentication.
|
|
16
|
+
|
|
17
|
+
Setup:
|
|
18
|
+
1. Go to GitHub Settings → Developer settings → OAuth Apps
|
|
19
|
+
2. Create new OAuth App
|
|
20
|
+
3. Note the Client ID and Client Secret
|
|
21
|
+
4. Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET environment variables
|
|
22
|
+
5. Set GITHUB_REDIRECT_URI to your callback URL
|
|
23
|
+
|
|
24
|
+
provider:
|
|
25
|
+
name: github
|
|
26
|
+
displayName: GitHub
|
|
27
|
+
|
|
28
|
+
# OAuth2 Endpoints
|
|
29
|
+
endpoints:
|
|
30
|
+
authorizationUrl: https://github.com/login/oauth/authorize
|
|
31
|
+
tokenUrl: https://github.com/login/oauth/access_token
|
|
32
|
+
|
|
33
|
+
# Standard scopes for GitHub API access
|
|
34
|
+
# Tools can override with their own scopes
|
|
35
|
+
defaultScopes:
|
|
36
|
+
- user:email
|
|
37
|
+
- repo
|
|
38
|
+
|
|
39
|
+
# Additional metadata
|
|
40
|
+
documentation: https://docs.github.com/en/developers/apps/building-oauth-apps
|
|
41
|
+
learnMore: https://github.com/settings/developers
|