@orgloop/core 0.1.0 → 0.1.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 +77 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @orgloop/core
|
|
2
|
+
|
|
3
|
+
OrgLoop runtime engine -- library-first event routing for autonomous AI organizations. Load a config, wire up sources/actors/transforms/loggers, and run the event loop.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @orgloop/core
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { OrgLoop, loadConfig, InMemoryBus } from '@orgloop/core';
|
|
15
|
+
|
|
16
|
+
// Load and validate an orgloop.yaml
|
|
17
|
+
const config = await loadConfig('./orgloop.yaml');
|
|
18
|
+
|
|
19
|
+
// Create and start the engine
|
|
20
|
+
const engine = new OrgLoop({
|
|
21
|
+
config,
|
|
22
|
+
bus: new InMemoryBus(),
|
|
23
|
+
sources: { github: myGitHubSource },
|
|
24
|
+
actors: { reviewer: myReviewerActor },
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
await engine.start();
|
|
28
|
+
|
|
29
|
+
// Later...
|
|
30
|
+
await engine.stop();
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## API
|
|
34
|
+
|
|
35
|
+
### Engine
|
|
36
|
+
|
|
37
|
+
- `OrgLoop` -- main engine class (extends EventEmitter)
|
|
38
|
+
- `OrgLoopOptions` -- engine constructor options
|
|
39
|
+
- `EngineStatus` -- runtime status type
|
|
40
|
+
|
|
41
|
+
### Config
|
|
42
|
+
|
|
43
|
+
- `loadConfig(path, options?)` -- load and validate YAML config with env var substitution
|
|
44
|
+
- `buildConfig(raw)` -- build config from an object
|
|
45
|
+
|
|
46
|
+
### Event bus
|
|
47
|
+
|
|
48
|
+
- `InMemoryBus` -- default in-memory event bus
|
|
49
|
+
- `FileWalBus` -- durable write-ahead-log bus
|
|
50
|
+
|
|
51
|
+
### Stores
|
|
52
|
+
|
|
53
|
+
- `FileCheckpointStore` / `InMemoryCheckpointStore` -- source deduplication checkpoints
|
|
54
|
+
- `FileEventStore` / `InMemoryEventStore` -- event persistence
|
|
55
|
+
|
|
56
|
+
### Routing and transforms
|
|
57
|
+
|
|
58
|
+
- `matchRoutes(event, routes)` -- match events to routes using dot-path filters
|
|
59
|
+
- `executeTransformPipeline(event, transforms, options)` -- run sequential transforms
|
|
60
|
+
|
|
61
|
+
### Infrastructure
|
|
62
|
+
|
|
63
|
+
- `Scheduler` -- manages poll intervals with graceful start/stop
|
|
64
|
+
- `LoggerManager` -- fan-out to multiple loggers, error-isolated
|
|
65
|
+
- `WebhookServer` -- HTTP server for webhook-based sources
|
|
66
|
+
|
|
67
|
+
### Errors
|
|
68
|
+
|
|
69
|
+
- `OrgLoopError`, `ConfigError`, `ConnectorError`, `TransformError`, `DeliveryError`, `SchemaError`
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
Full documentation at [orgloop.ai](https://orgloop.ai)
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orgloop/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "OrgLoop runtime engine — library-first event routing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"ajv": "^8.17.0",
|
|
16
16
|
"js-yaml": "^4.1.0",
|
|
17
17
|
"uuid": "^11.0.0",
|
|
18
|
-
"@orgloop/sdk": "0.1.
|
|
18
|
+
"@orgloop/sdk": "0.1.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/js-yaml": "^4.0.9",
|