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.
- package/README.md +128 -548
- package/package.json +24 -28
- package/packages/cli/bin/matimo.cjs +26 -0
- package/packages/cli/dist/cli.d.ts +6 -0
- package/packages/cli/dist/cli.d.ts.map +1 -0
- package/packages/cli/dist/cli.js +95 -0
- package/packages/cli/dist/cli.js.map +1 -0
- package/packages/cli/dist/commands/install.d.ts +6 -0
- package/packages/cli/dist/commands/install.d.ts.map +1 -0
- package/packages/cli/dist/commands/install.js +48 -0
- package/packages/cli/dist/commands/install.js.map +1 -0
- package/packages/cli/dist/commands/list.d.ts +9 -0
- package/packages/cli/dist/commands/list.d.ts.map +1 -0
- package/packages/cli/dist/commands/list.js +70 -0
- package/packages/cli/dist/commands/list.js.map +1 -0
- package/packages/cli/dist/commands/search.d.ts +2 -0
- package/packages/cli/dist/commands/search.d.ts.map +1 -0
- package/packages/cli/dist/commands/search.js +148 -0
- package/packages/cli/dist/commands/search.js.map +1 -0
- package/packages/core/dist/src/auth/oauth2-config.d.ts.map +1 -0
- package/packages/core/dist/src/auth/oauth2-config.js.map +1 -0
- package/packages/core/dist/src/auth/oauth2-handler.d.ts.map +1 -0
- package/packages/core/dist/src/auth/oauth2-handler.js.map +1 -0
- package/packages/core/dist/src/auth/oauth2-provider-loader.d.ts.map +1 -0
- package/packages/core/dist/src/auth/oauth2-provider-loader.js.map +1 -0
- package/{dist → packages/core/dist/src}/core/schema.d.ts +12 -2
- package/packages/core/dist/src/core/schema.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/core/schema.js +20 -6
- package/packages/core/dist/src/core/schema.js.map +1 -0
- package/{dist → packages/core/dist/src}/core/tool-loader.d.ts +16 -0
- package/packages/core/dist/src/core/tool-loader.d.ts.map +1 -0
- package/packages/core/dist/src/core/tool-loader.js +205 -0
- package/packages/core/dist/src/core/tool-loader.js.map +1 -0
- package/packages/core/dist/src/core/tool-registry.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/core/tool-registry.js +5 -1
- package/packages/core/dist/src/core/tool-registry.js.map +1 -0
- package/{dist → packages/core/dist/src}/core/types.d.ts +15 -1
- package/packages/core/dist/src/core/types.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/core/types.js.map +1 -1
- package/packages/core/dist/src/decorators/index.d.ts.map +1 -0
- package/packages/core/dist/src/decorators/index.js.map +1 -0
- package/packages/core/dist/src/decorators/tool-decorator.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/decorators/tool-decorator.js +7 -4
- package/packages/core/dist/src/decorators/tool-decorator.js.map +1 -0
- package/packages/core/dist/src/encodings/parameter-encoding.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/encodings/parameter-encoding.js +9 -2
- package/packages/core/dist/src/encodings/parameter-encoding.js.map +1 -0
- package/packages/core/dist/src/errors/matimo-error.d.ts.map +1 -0
- package/packages/core/dist/src/errors/matimo-error.js.map +1 -0
- package/packages/core/dist/src/executors/command-executor.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/executors/command-executor.js +5 -1
- package/packages/core/dist/src/executors/command-executor.js.map +1 -0
- package/packages/core/dist/src/executors/function-executor.d.ts +23 -0
- package/packages/core/dist/src/executors/function-executor.d.ts.map +1 -0
- package/packages/core/dist/src/executors/function-executor.js +164 -0
- package/packages/core/dist/src/executors/function-executor.js.map +1 -0
- package/packages/core/dist/src/executors/http-executor.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/executors/http-executor.js +5 -1
- package/packages/core/dist/src/executors/http-executor.js.map +1 -0
- package/{dist → packages/core/dist/src}/index.d.ts +5 -1
- package/packages/core/dist/src/index.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/index.js +3 -0
- package/packages/core/dist/src/index.js.map +1 -0
- package/packages/core/dist/src/integrations/langchain.d.ts +46 -0
- package/packages/core/dist/src/integrations/langchain.d.ts.map +1 -0
- package/packages/core/dist/src/integrations/langchain.js +197 -0
- package/packages/core/dist/src/integrations/langchain.js.map +1 -0
- package/{dist → packages/core/dist/src}/matimo-instance.d.ts +30 -4
- package/packages/core/dist/src/matimo-instance.d.ts.map +1 -0
- package/{dist → packages/core/dist/src}/matimo-instance.js +63 -10
- package/packages/core/dist/src/matimo-instance.js.map +1 -0
- package/packages/core/dist/tools/calculator/calculator.d.ts +26 -0
- package/packages/core/dist/tools/calculator/calculator.d.ts.map +1 -0
- package/packages/core/dist/tools/calculator/calculator.js +104 -0
- package/packages/core/dist/tools/calculator/calculator.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/auth/oauth2-config.d.ts.map +0 -1
- package/dist/auth/oauth2-config.js.map +0 -1
- package/dist/auth/oauth2-handler.d.ts.map +0 -1
- package/dist/auth/oauth2-handler.js.map +0 -1
- package/dist/auth/oauth2-provider-loader.d.ts.map +0 -1
- package/dist/auth/oauth2-provider-loader.js.map +0 -1
- package/dist/core/schema.d.ts.map +0 -1
- package/dist/core/schema.js.map +0 -1
- package/dist/core/tool-loader.d.ts.map +0 -1
- package/dist/core/tool-loader.js +0 -98
- package/dist/core/tool-loader.js.map +0 -1
- package/dist/core/tool-registry.d.ts.map +0 -1
- package/dist/core/tool-registry.js.map +0 -1
- package/dist/core/types.d.ts.map +0 -1
- package/dist/decorators/index.d.ts.map +0 -1
- package/dist/decorators/index.js.map +0 -1
- package/dist/decorators/tool-decorator.d.ts.map +0 -1
- package/dist/decorators/tool-decorator.js.map +0 -1
- package/dist/encodings/parameter-encoding.d.ts.map +0 -1
- package/dist/encodings/parameter-encoding.js.map +0 -1
- package/dist/errors/matimo-error.d.ts.map +0 -1
- package/dist/errors/matimo-error.js.map +0 -1
- package/dist/executors/command-executor.d.ts.map +0 -1
- package/dist/executors/command-executor.js.map +0 -1
- package/dist/executors/http-executor.d.ts.map +0 -1
- package/dist/executors/http-executor.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/matimo-instance.d.ts.map +0 -1
- package/dist/matimo-instance.js.map +0 -1
- package/docs/Gemfile +0 -5
- package/docs/RELEASES.md +0 -90
- 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 -212
- package/docs/getting-started/YOUR_FIRST_TOOL.md +0 -217
- package/docs/getting-started/installation.md +0 -124
- package/docs/index.md +0 -289
- 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/{dist → packages/core/dist/src}/auth/oauth2-config.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/auth/oauth2-config.js +0 -0
- /package/{dist → packages/core/dist/src}/auth/oauth2-handler.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/auth/oauth2-handler.js +0 -0
- /package/{dist → packages/core/dist/src}/auth/oauth2-provider-loader.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/auth/oauth2-provider-loader.js +0 -0
- /package/{dist → packages/core/dist/src}/core/tool-registry.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/core/types.js +0 -0
- /package/{dist → packages/core/dist/src}/decorators/index.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/decorators/index.js +0 -0
- /package/{dist → packages/core/dist/src}/decorators/tool-decorator.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/encodings/parameter-encoding.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/errors/matimo-error.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/errors/matimo-error.js +0 -0
- /package/{dist → packages/core/dist/src}/executors/command-executor.d.ts +0 -0
- /package/{dist → packages/core/dist/src}/executors/http-executor.d.ts +0 -0
|
@@ -1,552 +0,0 @@
|
|
|
1
|
-
# Commit Guidelines — Conventional Commits
|
|
2
|
-
|
|
3
|
-
Guidelines for writing clear, semantic commit messages.
|
|
4
|
-
|
|
5
|
-
## Format
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
<type>(<scope>): <subject>
|
|
9
|
-
|
|
10
|
-
<body>
|
|
11
|
-
|
|
12
|
-
<footer>
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Components
|
|
16
|
-
|
|
17
|
-
### Type (required)
|
|
18
|
-
|
|
19
|
-
What kind of change is this?
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
feat: A new feature
|
|
23
|
-
fix: A bug fix
|
|
24
|
-
docs: Documentation only
|
|
25
|
-
style: Code style changes (formatting, semicolons, etc.)
|
|
26
|
-
refactor: Code refactoring without feature change
|
|
27
|
-
perf: Performance improvement
|
|
28
|
-
test: Test additions or updates
|
|
29
|
-
chore: Build, CI/CD, dependencies, package.json
|
|
30
|
-
ci: CI/CD configuration changes
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Scope (optional)
|
|
34
|
-
|
|
35
|
-
What part of the codebase is affected?
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
feat(executor): add HTTP executor
|
|
39
|
-
fix(schema): handle missing required fields
|
|
40
|
-
docs(api): update API reference
|
|
41
|
-
test(loader): add tool loader tests
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Common scopes:
|
|
45
|
-
- `executor` — Executor implementations
|
|
46
|
-
- `schema` — Schema validation
|
|
47
|
-
- `loader` — Tool loader
|
|
48
|
-
- `cli` — Command-line interface
|
|
49
|
-
- `mcp` — MCP server
|
|
50
|
-
- `types` — Type definitions
|
|
51
|
-
- `error` — Error handling
|
|
52
|
-
- `tool` — Tool definitions
|
|
53
|
-
- `test` — Testing infrastructure
|
|
54
|
-
- `docs` — Documentation
|
|
55
|
-
|
|
56
|
-
### Subject (required)
|
|
57
|
-
|
|
58
|
-
Short description of the change (50 characters max).
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
✓ add HTTP executor with response validation
|
|
62
|
-
✓ fix schema validation for missing fields
|
|
63
|
-
✓ update API reference documentation
|
|
64
|
-
✓ improve error messages
|
|
65
|
-
|
|
66
|
-
✗ added executor
|
|
67
|
-
✗ fixed things
|
|
68
|
-
✗ refactored code a lot
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Rules:**
|
|
72
|
-
- Imperative mood: "add" not "added" or "adds"
|
|
73
|
-
- Lowercase first letter
|
|
74
|
-
- No period at end
|
|
75
|
-
- Clear and specific
|
|
76
|
-
|
|
77
|
-
### Body (optional)
|
|
78
|
-
|
|
79
|
-
Detailed explanation of the change (72 characters per line).
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
The HTTP executor now validates responses against the output_schema
|
|
83
|
-
defined in the tool. This ensures that:
|
|
84
|
-
|
|
85
|
-
- API responses match the expected format
|
|
86
|
-
- Type safety is maintained across executions
|
|
87
|
-
- Invalid responses throw SchemaValidationError
|
|
88
|
-
|
|
89
|
-
Implementation uses Zod for schema validation, consistent with
|
|
90
|
-
the rest of the codebase.
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
**Guidelines:**
|
|
94
|
-
- Explain WHAT and WHY, not HOW
|
|
95
|
-
- Reference relevant issues
|
|
96
|
-
- Wrap at 72 characters
|
|
97
|
-
- Separate paragraphs with blank lines
|
|
98
|
-
|
|
99
|
-
### Footer (optional)
|
|
100
|
-
|
|
101
|
-
Reference issues and breaking changes.
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
Closes #123
|
|
105
|
-
Refs #456, #789
|
|
106
|
-
|
|
107
|
-
BREAKING CHANGE: Tool YAML format changed (see migration guide)
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Format:**
|
|
111
|
-
- `Closes #<issue>` — Automatically close issue when PR merges
|
|
112
|
-
- `Refs #<issue>` — Reference without closing
|
|
113
|
-
- `BREAKING CHANGE:` — Document breaking changes
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## Examples
|
|
118
|
-
|
|
119
|
-
### Feature
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
feat(executor): add HTTP executor with response validation
|
|
123
|
-
|
|
124
|
-
Implement HttpExecutor class to make HTTP requests with:
|
|
125
|
-
- Automatic parameter templating
|
|
126
|
-
- Response validation against output_schema
|
|
127
|
-
- Support for API authentication (bearer, api_key, basic)
|
|
128
|
-
- Timeout and error recovery
|
|
129
|
-
|
|
130
|
-
This enables defining tools that call external APIs and validate
|
|
131
|
-
responses, with full type safety.
|
|
132
|
-
|
|
133
|
-
Closes #42
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
### Bug Fix
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
fix(schema): handle missing required fields in tool definition
|
|
140
|
-
|
|
141
|
-
Previously, the schema validation would crash if a tool was missing
|
|
142
|
-
required fields. Now it returns a clear validation error with the
|
|
143
|
-
list of missing fields.
|
|
144
|
-
|
|
145
|
-
This improves error messages for developers writing tools and makes
|
|
146
|
-
debugging YAML syntax issues much easier.
|
|
147
|
-
|
|
148
|
-
Closes #38
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Documentation
|
|
152
|
-
|
|
153
|
-
```
|
|
154
|
-
docs(api-reference): document all executor methods
|
|
155
|
-
|
|
156
|
-
Add comprehensive API documentation for:
|
|
157
|
-
- CommandExecutor.execute()
|
|
158
|
-
- HttpExecutor.execute()
|
|
159
|
-
- ToolLoader.loadToolsFromDirectory()
|
|
160
|
-
|
|
161
|
-
Include parameter types, return values, error codes, and examples
|
|
162
|
-
for each method.
|
|
163
|
-
|
|
164
|
-
Refs #45
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Refactoring
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
refactor(error-handling): consolidate error classes
|
|
171
|
-
|
|
172
|
-
Move all error handling logic to MatimoError base class with
|
|
173
|
-
structured error codes. This reduces duplication and makes error
|
|
174
|
-
handling consistent across the codebase.
|
|
175
|
-
|
|
176
|
-
Changes:
|
|
177
|
-
- Create ErrorCode enum for standard codes
|
|
178
|
-
- Extend MatimoError for all error types
|
|
179
|
-
- Update all throw statements to use structured errors
|
|
180
|
-
- Add context objects to error messages
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
### Test
|
|
184
|
-
|
|
185
|
-
```
|
|
186
|
-
test(command-executor): add parameter templating tests
|
|
187
|
-
|
|
188
|
-
Add comprehensive test coverage for parameter substitution in
|
|
189
|
-
command execution:
|
|
190
|
-
- Single parameter: {param}
|
|
191
|
-
- Multiple parameters: {a} {b} {c}
|
|
192
|
-
- Parameter in nested strings: "--op={op}"
|
|
193
|
-
- Escaped parameters
|
|
194
|
-
- Missing parameters
|
|
195
|
-
|
|
196
|
-
Closes #51
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Chore
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
chore: upgrade TypeScript to 5.3
|
|
203
|
-
|
|
204
|
-
- Update package.json to use TypeScript 5.3
|
|
205
|
-
- Update tsconfig.json for new strict mode settings
|
|
206
|
-
- Fix type errors discovered by stricter checking
|
|
207
|
-
- Run full test suite to verify no regressions
|
|
208
|
-
```
|
|
209
|
-
|
|
210
|
-
### Breaking Change
|
|
211
|
-
|
|
212
|
-
```
|
|
213
|
-
refactor(schema): change tool YAML format
|
|
214
|
-
|
|
215
|
-
BREAKING CHANGE: Tool YAML files must now include execution_type
|
|
216
|
-
field. Update existing tools:
|
|
217
|
-
|
|
218
|
-
Before:
|
|
219
|
-
execution:
|
|
220
|
-
command: node script.js
|
|
221
|
-
|
|
222
|
-
After:
|
|
223
|
-
execution:
|
|
224
|
-
type: command
|
|
225
|
-
command: node script.js
|
|
226
|
-
|
|
227
|
-
See migration guide at docs/MIGRATION_v2.md
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Best Practices
|
|
233
|
-
|
|
234
|
-
### ✅ DO
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
✓ Write in imperative mood
|
|
238
|
-
✓ Keep subject under 50 characters
|
|
239
|
-
✓ Wrap body at 72 characters
|
|
240
|
-
✓ Explain WHY the change was made
|
|
241
|
-
✓ Reference related issues
|
|
242
|
-
✓ Use semantic types (feat, fix, etc.)
|
|
243
|
-
✓ Be specific and descriptive
|
|
244
|
-
✓ Keep commits focused (one thing per commit)
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### ❌ DON'T
|
|
248
|
-
|
|
249
|
-
```
|
|
250
|
-
✗ Use past tense ("added", "fixed")
|
|
251
|
-
✗ Make the subject too long
|
|
252
|
-
✗ Forget the type
|
|
253
|
-
✗ Combine multiple features in one commit
|
|
254
|
-
✗ Leave out important details
|
|
255
|
-
✗ Use vague descriptions ("fixes stuff")
|
|
256
|
-
✗ Write in passive voice
|
|
257
|
-
✗ Include multiple types in one commit
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
---
|
|
261
|
-
|
|
262
|
-
## Commit Scope Guide
|
|
263
|
-
|
|
264
|
-
### When to Use Scopes
|
|
265
|
-
|
|
266
|
-
**Good (clear and specific):**
|
|
267
|
-
```
|
|
268
|
-
feat(executor): add HTTP method support
|
|
269
|
-
fix(loader): handle YAML parse errors
|
|
270
|
-
docs(api): document error codes
|
|
271
|
-
test(schema): add validation tests
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
**Unclear (too broad):**
|
|
275
|
-
```
|
|
276
|
-
feat(src): add new code
|
|
277
|
-
fix(test): update tests
|
|
278
|
-
docs: various documentation
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
### Scope Examples by Area
|
|
282
|
-
|
|
283
|
-
#### Core Components
|
|
284
|
-
```
|
|
285
|
-
feat(executor) # Executor implementations
|
|
286
|
-
feat(loader) # Tool loader
|
|
287
|
-
feat(schema) # Schema validation
|
|
288
|
-
feat(registry) # Tool registry
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
#### Integration
|
|
292
|
-
```
|
|
293
|
-
feat(mcp) # MCP server
|
|
294
|
-
feat(cli) # CLI tools
|
|
295
|
-
feat(decorators) # Decorator support
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
#### Infrastructure
|
|
299
|
-
```
|
|
300
|
-
chore(build) # Build configuration
|
|
301
|
-
chore(ci) # CI/CD pipeline
|
|
302
|
-
chore(deps) # Dependencies
|
|
303
|
-
chore(types) # Type definitions
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
#### Documentation & Testing
|
|
307
|
-
```
|
|
308
|
-
docs(api) # API documentation
|
|
309
|
-
docs(guide) # User guides
|
|
310
|
-
test(unit) # Unit tests
|
|
311
|
-
test(integration) # Integration tests
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
---
|
|
315
|
-
|
|
316
|
-
## Commit Workflow
|
|
317
|
-
|
|
318
|
-
### Before Committing
|
|
319
|
-
|
|
320
|
-
1. Make sure changes are focused (one feature/fix)
|
|
321
|
-
2. Stage relevant files: `git add <files>`
|
|
322
|
-
3. Review changes: `git diff --staged`
|
|
323
|
-
4. Run tests: `pnpm test`
|
|
324
|
-
5. Check format: `pnpm lint && pnpm format`
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
# Stage specific files
|
|
328
|
-
git add src/executors/http-executor.ts test/unit/http-executor.test.ts
|
|
329
|
-
|
|
330
|
-
# Review changes
|
|
331
|
-
git diff --staged
|
|
332
|
-
|
|
333
|
-
# Verify everything works
|
|
334
|
-
pnpm build && pnpm test && pnpm lint
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Writing the Commit
|
|
338
|
-
|
|
339
|
-
1. Use `git commit` (not `git commit -m` for longer messages)
|
|
340
|
-
2. Follow the format: type(scope): subject
|
|
341
|
-
3. Add body if needed (blank line after subject)
|
|
342
|
-
4. Reference issues in footer
|
|
343
|
-
|
|
344
|
-
```bash
|
|
345
|
-
# Commits with detailed message
|
|
346
|
-
git commit
|
|
347
|
-
|
|
348
|
-
# Opens editor with template:
|
|
349
|
-
# feat(scope): subject
|
|
350
|
-
#
|
|
351
|
-
# Detailed body explaining the change.
|
|
352
|
-
# Multiple paragraphs separated by blank lines.
|
|
353
|
-
#
|
|
354
|
-
# Closes #123
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
### Example Workflow
|
|
358
|
-
|
|
359
|
-
```bash
|
|
360
|
-
# Create feature branch
|
|
361
|
-
git checkout -b feature/http-executor
|
|
362
|
-
|
|
363
|
-
# Make changes
|
|
364
|
-
# ... edit files ...
|
|
365
|
-
|
|
366
|
-
# Stage changes
|
|
367
|
-
git add src/executors/http-executor.ts
|
|
368
|
-
git add test/unit/http-executor.test.ts
|
|
369
|
-
|
|
370
|
-
# Verify
|
|
371
|
-
git diff --staged
|
|
372
|
-
pnpm test
|
|
373
|
-
|
|
374
|
-
# Commit with detailed message
|
|
375
|
-
git commit
|
|
376
|
-
|
|
377
|
-
# In editor:
|
|
378
|
-
# feat(executor): add HTTP executor with response validation
|
|
379
|
-
#
|
|
380
|
-
# Implement HttpExecutor class for making HTTP requests to APIs with:
|
|
381
|
-
# - Automatic parameter templating
|
|
382
|
-
# - Response validation against output_schema
|
|
383
|
-
# - Support for various authentication types
|
|
384
|
-
# - Built-in timeout and retry logic
|
|
385
|
-
#
|
|
386
|
-
# This enables defining tools that call external REST APIs while
|
|
387
|
-
# maintaining type safety and validation.
|
|
388
|
-
#
|
|
389
|
-
# Closes #42
|
|
390
|
-
|
|
391
|
-
# Push to remote
|
|
392
|
-
git push origin feat/http-executor
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
---
|
|
396
|
-
|
|
397
|
-
## Common Mistakes
|
|
398
|
-
|
|
399
|
-
### ❌ Too Vague
|
|
400
|
-
|
|
401
|
-
```
|
|
402
|
-
feat: update code
|
|
403
|
-
fix: bug fixes
|
|
404
|
-
docs: update docs
|
|
405
|
-
chore: maintenance
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
**Better:**
|
|
409
|
-
```
|
|
410
|
-
feat(executor): add HTTP method parameter support
|
|
411
|
-
fix(schema): validate enum values in parameters
|
|
412
|
-
docs(api): document all executor public methods
|
|
413
|
-
chore(deps): upgrade TypeScript to 5.3
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
### ❌ Multiple Changes
|
|
417
|
-
|
|
418
|
-
```
|
|
419
|
-
feat(executor): add HTTP support and fix timeout bug
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
**Better (two commits):**
|
|
423
|
-
```
|
|
424
|
-
feat(executor): add HTTP executor with response validation
|
|
425
|
-
fix(executor): handle timeout edge cases correctly
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
### ❌ Unclear Scope
|
|
429
|
-
|
|
430
|
-
```
|
|
431
|
-
feat(src): add new features
|
|
432
|
-
fix(test): improve tests
|
|
433
|
-
docs(docs): update documentation
|
|
434
|
-
```
|
|
435
|
-
|
|
436
|
-
**Better:**
|
|
437
|
-
```
|
|
438
|
-
feat(executor): add HTTP support
|
|
439
|
-
fix(loader): improve error messages
|
|
440
|
-
docs(api): document parameter validation
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
### ❌ Future Tense
|
|
444
|
-
|
|
445
|
-
```
|
|
446
|
-
feat(executor): will add HTTP support
|
|
447
|
-
fix(schema): will fix validation
|
|
448
|
-
```
|
|
449
|
-
|
|
450
|
-
**Better:**
|
|
451
|
-
```
|
|
452
|
-
feat(executor): add HTTP support
|
|
453
|
-
fix(schema): validate enum values
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
---
|
|
457
|
-
|
|
458
|
-
## Git Aliases
|
|
459
|
-
|
|
460
|
-
Create aliases for faster committing:
|
|
461
|
-
|
|
462
|
-
```bash
|
|
463
|
-
# Add to ~/.gitconfig
|
|
464
|
-
|
|
465
|
-
[alias]
|
|
466
|
-
co = checkout
|
|
467
|
-
br = branch
|
|
468
|
-
ci = commit
|
|
469
|
-
st = status
|
|
470
|
-
unstage = reset HEAD --
|
|
471
|
-
last = log -1 HEAD
|
|
472
|
-
visual = log --graph --oneline --all
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
Usage:
|
|
476
|
-
```bash
|
|
477
|
-
git co -b feat/my-feature
|
|
478
|
-
git ci # Opens commit editor
|
|
479
|
-
git visual # See commit graph
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
---
|
|
483
|
-
|
|
484
|
-
## Tools & Helpers
|
|
485
|
-
|
|
486
|
-
### commitizen (Guided Commits)
|
|
487
|
-
|
|
488
|
-
Interactively create commits:
|
|
489
|
-
|
|
490
|
-
```bash
|
|
491
|
-
pnpm add -D commitizen
|
|
492
|
-
npx cz # Interactive commit prompt
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
### husky (Pre-commit Hooks)
|
|
496
|
-
|
|
497
|
-
Prevent bad commits:
|
|
498
|
-
|
|
499
|
-
```bash
|
|
500
|
-
pnpm add -D husky
|
|
501
|
-
npx husky install
|
|
502
|
-
npx husky add .husky/commit-msg 'pnpm lint-staged'
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
### lint-staged
|
|
506
|
-
|
|
507
|
-
Lint before committing:
|
|
508
|
-
|
|
509
|
-
```bash
|
|
510
|
-
pnpm add -D lint-staged
|
|
511
|
-
|
|
512
|
-
# In package.json:
|
|
513
|
-
{
|
|
514
|
-
"lint-staged": {
|
|
515
|
-
"*.ts": ["eslint --fix", "prettier --write"],
|
|
516
|
-
"*.md": ["prettier --write"]
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
---
|
|
522
|
-
|
|
523
|
-
## See Also
|
|
524
|
-
|
|
525
|
-
- [CONTRIBUTING.md](../CONTRIBUTING.md) — Full contribution guide
|
|
526
|
-
- [DEVELOPMENT_STANDARDS.md](../user-guide/DEVELOPMENT_STANDARDS.md) — Code quality standards
|
|
527
|
-
- [Conventional Commits](https://www.conventionalcommits.org/) — Full specification
|
|
528
|
-
|
|
529
|
-
---
|
|
530
|
-
|
|
531
|
-
## Quick Reference
|
|
532
|
-
|
|
533
|
-
```
|
|
534
|
-
feat: New feature
|
|
535
|
-
fix: Bug fix
|
|
536
|
-
docs: Documentation
|
|
537
|
-
style: Formatting (no code change)
|
|
538
|
-
refactor: Code restructuring
|
|
539
|
-
perf: Performance improvement
|
|
540
|
-
test: Test changes
|
|
541
|
-
chore: Build, CI, dependencies
|
|
542
|
-
ci: CI configuration
|
|
543
|
-
|
|
544
|
-
Format: <type>(<scope>): <subject>
|
|
545
|
-
|
|
546
|
-
Rules:
|
|
547
|
-
- Imperative mood ("add" not "added")
|
|
548
|
-
- Lowercase first letter
|
|
549
|
-
- No period at end
|
|
550
|
-
- 50 chars for subject, 72 for body
|
|
551
|
-
- Reference issues: Closes #123
|
|
552
|
-
```
|