@fractary/core 0.1.0 → 0.1.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 +183 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,39 +1,92 @@
|
|
|
1
1
|
# @fractary/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Core SDK for Fractary - Primitive operations for work tracking, repository management, specifications, logging, file storage, and documentation.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@fractary/core)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
7
|
|
|
7
8
|
## Overview
|
|
8
9
|
|
|
9
|
-
`@fractary/core` provides foundational
|
|
10
|
+
`@fractary/core` provides foundational infrastructure for managing software development workflows across multiple platforms. It implements primitive operations that can be used standalone or as building blocks for higher-level frameworks like `@fractary/faber`.
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
### Key Features
|
|
13
|
+
|
|
14
|
+
- **Multi-Platform Work Tracking**: Unified interface for GitHub Issues, Jira, and Linear
|
|
15
|
+
- **Repository Management**: Git operations with GitHub, GitLab, and Bitbucket integration
|
|
16
|
+
- **Specification Management**: Create, validate, and refine technical specifications
|
|
17
|
+
- **Log Management**: Capture, search, and archive session logs
|
|
18
|
+
- **File Storage**: Local and remote file operations with validation
|
|
19
|
+
- **Documentation Management**: Create, search, and export documentation
|
|
20
|
+
- **Type-Safe**: Full TypeScript support with comprehensive type definitions
|
|
21
|
+
|
|
22
|
+
## Modules
|
|
12
23
|
|
|
13
24
|
### Work Tracking
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
25
|
+
|
|
26
|
+
Manage work items across GitHub Issues, Jira, and Linear:
|
|
27
|
+
|
|
28
|
+
- Create, update, and fetch issues
|
|
29
|
+
- Manage comments, labels, and milestones
|
|
30
|
+
- Search and filter issues
|
|
31
|
+
- Track issue state and assignments
|
|
32
|
+
|
|
33
|
+
**Supported Platforms:**
|
|
34
|
+
- GitHub Issues (full support)
|
|
35
|
+
- Jira Cloud (full support)
|
|
36
|
+
- Linear (full support)
|
|
18
37
|
|
|
19
38
|
### Repository Management
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
39
|
+
|
|
40
|
+
Git and platform operations:
|
|
41
|
+
|
|
42
|
+
- Branch management (create, delete, list)
|
|
43
|
+
- Commit operations with semantic versioning
|
|
44
|
+
- Pull request workflows
|
|
45
|
+
- Tag management
|
|
46
|
+
- Worktree support
|
|
47
|
+
- Multi-platform support (GitHub, GitLab, Bitbucket)
|
|
48
|
+
|
|
49
|
+
**Supported Platforms:**
|
|
50
|
+
- GitHub (full support)
|
|
51
|
+
- GitLab (full support)
|
|
52
|
+
- Bitbucket (full support)
|
|
53
|
+
- Local Git operations (full support)
|
|
25
54
|
|
|
26
55
|
### Specification Management
|
|
27
|
-
Create and manage technical specifications with templates and validation.
|
|
28
56
|
|
|
29
|
-
|
|
30
|
-
|
|
57
|
+
Technical specification workflows:
|
|
58
|
+
|
|
59
|
+
- Create and validate specifications
|
|
60
|
+
- Template-based generation
|
|
61
|
+
- Refinement and versioning
|
|
62
|
+
- Specification search and indexing
|
|
63
|
+
|
|
64
|
+
### Log Management
|
|
65
|
+
|
|
66
|
+
Session and operation logging:
|
|
67
|
+
|
|
68
|
+
- Capture session logs
|
|
69
|
+
- Search and filter logs
|
|
70
|
+
- Archive and export
|
|
71
|
+
- Log type classification
|
|
31
72
|
|
|
32
73
|
### File Storage
|
|
33
|
-
File operations with support for local and cloud storage backends.
|
|
34
74
|
|
|
35
|
-
|
|
36
|
-
|
|
75
|
+
File operations with validation:
|
|
76
|
+
|
|
77
|
+
- Read, write, list, delete operations
|
|
78
|
+
- Pattern matching and filtering
|
|
79
|
+
- Local and remote storage
|
|
80
|
+
- File validation and safety checks
|
|
81
|
+
|
|
82
|
+
### Documentation Management
|
|
83
|
+
|
|
84
|
+
Documentation workflows:
|
|
85
|
+
|
|
86
|
+
- Create and update documentation
|
|
87
|
+
- Search and indexing
|
|
88
|
+
- Export to multiple formats
|
|
89
|
+
- Version tracking
|
|
37
90
|
|
|
38
91
|
## Installation
|
|
39
92
|
|
|
@@ -41,6 +94,48 @@ Documentation generation and management utilities.
|
|
|
41
94
|
npm install @fractary/core
|
|
42
95
|
```
|
|
43
96
|
|
|
97
|
+
## Quick Start
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
import { WorkManager, RepoManager, SpecManager } from '@fractary/core';
|
|
101
|
+
|
|
102
|
+
// Work tracking
|
|
103
|
+
const workManager = new WorkManager({
|
|
104
|
+
provider: 'github',
|
|
105
|
+
config: {
|
|
106
|
+
owner: 'myorg',
|
|
107
|
+
repo: 'myrepo',
|
|
108
|
+
token: process.env.GITHUB_TOKEN
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const issue = await workManager.createIssue({
|
|
113
|
+
title: 'Add user authentication',
|
|
114
|
+
body: 'Implement JWT-based authentication',
|
|
115
|
+
workType: 'feature',
|
|
116
|
+
labels: ['enhancement']
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// Repository operations
|
|
120
|
+
const repoManager = new RepoManager({
|
|
121
|
+
provider: 'github',
|
|
122
|
+
config: {
|
|
123
|
+
owner: 'myorg',
|
|
124
|
+
repo: 'myrepo',
|
|
125
|
+
token: process.env.GITHUB_TOKEN
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
await repoManager.createBranch('feature/auth', { base: 'main' });
|
|
130
|
+
|
|
131
|
+
// Specification management
|
|
132
|
+
const specManager = new SpecManager({ specDirectory: './specs' });
|
|
133
|
+
const spec = specManager.createSpec('Authentication System', {
|
|
134
|
+
workId: issue.number.toString(),
|
|
135
|
+
template: 'feature'
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
44
139
|
## Usage
|
|
45
140
|
|
|
46
141
|
### Work Tracking
|
|
@@ -49,7 +144,7 @@ npm install @fractary/core
|
|
|
49
144
|
import { WorkManager } from '@fractary/core/work';
|
|
50
145
|
|
|
51
146
|
const workManager = new WorkManager({
|
|
52
|
-
|
|
147
|
+
provider: 'github',
|
|
53
148
|
config: {
|
|
54
149
|
owner: 'myorg',
|
|
55
150
|
repo: 'myrepo',
|
|
@@ -60,9 +155,23 @@ const workManager = new WorkManager({
|
|
|
60
155
|
// Create an issue
|
|
61
156
|
const issue = await workManager.createIssue({
|
|
62
157
|
title: 'Add new feature',
|
|
63
|
-
|
|
64
|
-
|
|
158
|
+
body: 'Description of the feature',
|
|
159
|
+
workType: 'feature',
|
|
160
|
+
labels: ['enhancement'],
|
|
161
|
+
assignees: ['developer1']
|
|
65
162
|
});
|
|
163
|
+
|
|
164
|
+
// Fetch an issue
|
|
165
|
+
const fetchedIssue = await workManager.fetchIssue(123);
|
|
166
|
+
|
|
167
|
+
// Search issues
|
|
168
|
+
const openBugs = await workManager.searchIssues('is:open label:bug');
|
|
169
|
+
|
|
170
|
+
// Add comment
|
|
171
|
+
await workManager.createComment(123, 'Working on this now');
|
|
172
|
+
|
|
173
|
+
// Manage labels
|
|
174
|
+
await workManager.addLabels(123, ['priority:high', 'needs-review']);
|
|
66
175
|
```
|
|
67
176
|
|
|
68
177
|
### Repository Management
|
|
@@ -71,7 +180,7 @@ const issue = await workManager.createIssue({
|
|
|
71
180
|
import { RepoManager } from '@fractary/core/repo';
|
|
72
181
|
|
|
73
182
|
const repoManager = new RepoManager({
|
|
74
|
-
|
|
183
|
+
provider: 'github',
|
|
75
184
|
config: {
|
|
76
185
|
owner: 'myorg',
|
|
77
186
|
repo: 'myrepo',
|
|
@@ -80,18 +189,27 @@ const repoManager = new RepoManager({
|
|
|
80
189
|
});
|
|
81
190
|
|
|
82
191
|
// Create a branch
|
|
83
|
-
await repoManager.createBranch({
|
|
84
|
-
|
|
85
|
-
|
|
192
|
+
await repoManager.createBranch('feature/new-feature', { base: 'main' });
|
|
193
|
+
|
|
194
|
+
// Make commits with semantic versioning
|
|
195
|
+
repoManager.commit({
|
|
196
|
+
message: 'Add authentication middleware',
|
|
197
|
+
type: 'feat',
|
|
198
|
+
scope: 'auth',
|
|
199
|
+
files: ['src/middleware/auth.ts']
|
|
86
200
|
});
|
|
87
201
|
|
|
88
202
|
// Create a pull request
|
|
89
|
-
const pr = await repoManager.
|
|
203
|
+
const pr = await repoManager.createPR({
|
|
90
204
|
title: 'Add new feature',
|
|
205
|
+
body: 'PR description',
|
|
91
206
|
head: 'feature/new-feature',
|
|
92
|
-
base: 'main'
|
|
93
|
-
body: 'PR description'
|
|
207
|
+
base: 'main'
|
|
94
208
|
});
|
|
209
|
+
|
|
210
|
+
// Manage tags
|
|
211
|
+
repoManager.createTag('v1.0.0', { message: 'Release 1.0.0' });
|
|
212
|
+
repoManager.pushTag('v1.0.0');
|
|
95
213
|
```
|
|
96
214
|
|
|
97
215
|
### Specification Management
|
|
@@ -162,8 +280,43 @@ MIT
|
|
|
162
280
|
|
|
163
281
|
See the [Contributing Guide](../../CONTRIBUTING.md) for details on how to contribute to this project.
|
|
164
282
|
|
|
283
|
+
## Configuration
|
|
284
|
+
|
|
285
|
+
Configuration can be provided via files or environment variables:
|
|
286
|
+
|
|
287
|
+
```yaml
|
|
288
|
+
# .fractary/core.yaml
|
|
289
|
+
work:
|
|
290
|
+
provider: github
|
|
291
|
+
config:
|
|
292
|
+
owner: myorg
|
|
293
|
+
repo: myrepo
|
|
294
|
+
token: ${GITHUB_TOKEN}
|
|
295
|
+
|
|
296
|
+
repo:
|
|
297
|
+
provider: github
|
|
298
|
+
config:
|
|
299
|
+
owner: myorg
|
|
300
|
+
repo: myrepo
|
|
301
|
+
token: ${GITHUB_TOKEN}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
See the [Configuration Guide](../../docs/guides/configuration.md) for details.
|
|
305
|
+
|
|
306
|
+
## Documentation
|
|
307
|
+
|
|
308
|
+
- **[API Reference](../../docs/guides/api-reference.md)** - Complete API documentation
|
|
309
|
+
- **[Configuration Guide](../../docs/guides/configuration.md)** - Configuration options
|
|
310
|
+
- **[Integration Guide](../../docs/guides/integration.md)** - Integration patterns
|
|
311
|
+
- **[Examples](../../docs/examples/)** - Usage examples and patterns
|
|
312
|
+
|
|
313
|
+
## Related Packages
|
|
314
|
+
|
|
315
|
+
- **[@fractary/core-cli](../../../cli/)** - Command-line interface
|
|
316
|
+
- **[@fractary/core-mcp](../../../mcp/server/)** - MCP server for AI agents
|
|
317
|
+
|
|
165
318
|
## Links
|
|
166
319
|
|
|
167
320
|
- [GitHub Repository](https://github.com/fractary/core)
|
|
168
|
-
- [Documentation](https://docs.fractary.com/core)
|
|
169
321
|
- [Issue Tracker](https://github.com/fractary/core/issues)
|
|
322
|
+
- [NPM Package](https://www.npmjs.com/package/@fractary/core)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fractary/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Fractary Core SDK - Primitive operations for work tracking, repository management, specifications, logging, file storage, and documentation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|