@stratix/testing 0.8.0 → 0.8.1
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 +12 -56
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -8,87 +8,43 @@
|
|
|
8
8
|
[](https://www.npmjs.com/package/@stratix/testing)
|
|
9
9
|
[](https://opensource.org/licenses/MIT)
|
|
10
10
|
|
|
11
|
-
[Documentation](https://stratix-dev.github.io/
|
|
11
|
+
[Documentation](https://stratix-dev.github.io/docs/)
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
-
> Part of **[Stratix Framework](https://stratix-dev.github.io/
|
|
15
|
+
> Part of **[Stratix Framework](https://stratix-dev.github.io/docs/)** - A TypeScript framework for building scalable applications with Domain-Driven Design, Hexagonal Architecture, and CQRS patterns.
|
|
16
16
|
>
|
|
17
|
-
> **New to Stratix?** Start with the [Getting Started Guide](https://stratix-dev.github.io/stratix/docs/getting-started/quick-start)
|
|
18
17
|
|
|
18
|
+
## ⚠️ Pre-Release Warning
|
|
19
|
+
|
|
20
|
+
**This is a pre-release version of @stratix/testing.**
|
|
21
|
+
|
|
22
|
+
This package is under active development and should be considered unstable. The API may change significantly between versions without prior notice. Features may be added, modified, or removed entirely. This package may also be deprecated or discontinued in future releases.
|
|
23
|
+
|
|
24
|
+
**Stable versions will be available starting from version 1.0.0.** Not recommended for production use. Use at your own risk.
|
|
19
25
|
|
|
20
26
|
## About This Package
|
|
21
27
|
|
|
22
28
|
`@stratix/testing` provides testing utilities, mocks, and helpers for testing Stratix applications and AI agents.
|
|
23
29
|
|
|
24
|
-
**This package includes:**
|
|
25
|
-
- MockLLMProvider for deterministic AI agent testing
|
|
26
|
-
- In-memory repository implementations
|
|
27
|
-
- Test data builders
|
|
28
|
-
- CQRS testing utilities
|
|
29
|
-
|
|
30
30
|
## About Stratix
|
|
31
31
|
|
|
32
32
|
Stratix is an AI-first TypeScript framework combining Domain-Driven Design, Hexagonal Architecture, and CQRS. It provides production-ready patterns for building scalable, maintainable applications with AI agents as first-class citizens.
|
|
33
33
|
|
|
34
34
|
**Key Resources:**
|
|
35
|
-
- [Documentation](https://stratix-dev.github.io/
|
|
36
|
-
- [Quick Start](https://stratix-dev.github.io/stratix/docs/getting-started/quick-start)
|
|
35
|
+
- [Documentation](https://stratix-dev.github.io/docs/)
|
|
37
36
|
- [Report Issues](https://github.com/stratix-dev/stratix/issues)
|
|
38
37
|
|
|
39
38
|
## Installation
|
|
40
39
|
|
|
41
40
|
**Prerequisites:**
|
|
42
41
|
- Node.js 18.0.0 or higher
|
|
43
|
-
- `@stratix/core` installed
|
|
44
42
|
|
|
43
|
+
**Installation:**
|
|
45
44
|
```bash
|
|
46
45
|
npm install --save-dev @stratix/testing
|
|
47
46
|
```
|
|
48
47
|
|
|
49
|
-
## Quick Start
|
|
50
|
-
|
|
51
|
-
```typescript
|
|
52
|
-
import { MockLLMProvider } from '@stratix/testing';
|
|
53
|
-
import { MyAgent } from './my-agent';
|
|
54
|
-
|
|
55
|
-
describe('MyAgent', () => {
|
|
56
|
-
it('should process input correctly', async () => {
|
|
57
|
-
const mockProvider = new MockLLMProvider({
|
|
58
|
-
responses: [{ content: 'Expected response', usage: { totalTokens: 10, cost: 0.001 } }]
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const agent = new MyAgent(mockProvider);
|
|
62
|
-
const result = await agent.run('test input');
|
|
63
|
-
|
|
64
|
-
expect(result.isSuccess).toBe(true);
|
|
65
|
-
expect(result.value).toBe('Expected response');
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Related Packages
|
|
71
|
-
|
|
72
|
-
**Essential:**
|
|
73
|
-
- [`@stratix/core`](https://www.npmjs.com/package/@stratix/core) - Core primitives and abstractions
|
|
74
|
-
- [`@stratix/runtime`](https://www.npmjs.com/package/@stratix/runtime) - Application runtime
|
|
75
|
-
|
|
76
|
-
**AI Testing:**
|
|
77
|
-
- [`@stratix/ai-openai`](https://www.npmjs.com/package/@stratix/ai-openai) - OpenAI LLM provider
|
|
78
|
-
- [`@stratix/ai-anthropic`](https://www.npmjs.com/package/@stratix/ai-anthropic) - Anthropic Claude provider
|
|
79
|
-
|
|
80
|
-
## Documentation
|
|
81
|
-
|
|
82
|
-
- [Getting Started](https://stratix-dev.github.io/stratix/docs/getting-started/quick-start)
|
|
83
|
-
- [Core Concepts](https://stratix-dev.github.io/stratix/docs/core-concepts/architecture-overview)
|
|
84
|
-
- [Plugin Architecture](https://stratix-dev.github.io/stratix/docs/plugins/plugin-architecture)
|
|
85
|
-
- [Complete Documentation](https://stratix-dev.github.io/stratix/)
|
|
86
|
-
|
|
87
|
-
## Support
|
|
88
|
-
|
|
89
|
-
- [GitHub Issues](https://github.com/stratix-dev/stratix/issues)
|
|
90
|
-
- [Documentation](https://stratix-dev.github.io/stratix/)
|
|
91
|
-
|
|
92
48
|
## License
|
|
93
49
|
|
|
94
50
|
MIT - See [LICENSE](https://github.com/stratix-dev/stratix/blob/main/LICENSE) for details.
|
|
@@ -97,4 +53,4 @@ MIT - See [LICENSE](https://github.com/stratix-dev/stratix/blob/main/LICENSE) fo
|
|
|
97
53
|
|
|
98
54
|
**[Stratix Framework](https://stratix-dev.github.io/stratix/)** - Build better software with proven patterns
|
|
99
55
|
|
|
100
|
-
</div>
|
|
56
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stratix/testing",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Testing utilities for Stratix AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"mock"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@stratix/runtime": "^0.8.
|
|
29
|
-
"@stratix/di": "^0.8.
|
|
30
|
-
"@stratix/core": "^0.8.
|
|
28
|
+
"@stratix/runtime": "^0.8.1",
|
|
29
|
+
"@stratix/di": "^0.8.1",
|
|
30
|
+
"@stratix/core": "^0.8.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "^20.10.0",
|