baselineos 0.2.0-beta.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/LICENSE +17 -0
- package/README.md +198 -0
- package/dist/__evals__/runner.d.ts +2 -0
- package/dist/__evals__/runner.js +14687 -0
- package/dist/__evals__/runner.js.map +1 -0
- package/dist/api/server.d.ts +21 -0
- package/dist/api/server.js +1007 -0
- package/dist/api/server.js.map +1 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +8427 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/core/agent-bus.d.ts +110 -0
- package/dist/core/agent-bus.js +242 -0
- package/dist/core/agent-bus.js.map +1 -0
- package/dist/core/cache.d.ts +66 -0
- package/dist/core/cache.js +160 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/core/config.d.ts +1002 -0
- package/dist/core/config.js +429 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/indexer.d.ts +152 -0
- package/dist/core/indexer.js +481 -0
- package/dist/core/indexer.js.map +1 -0
- package/dist/core/llm-tracer.d.ts +2 -0
- package/dist/core/llm-tracer.js +241 -0
- package/dist/core/llm-tracer.js.map +1 -0
- package/dist/core/memory.d.ts +86 -0
- package/dist/core/memory.js +346 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/opa-client.d.ts +51 -0
- package/dist/core/opa-client.js +157 -0
- package/dist/core/opa-client.js.map +1 -0
- package/dist/core/opa-policy-gate.d.ts +133 -0
- package/dist/core/opa-policy-gate.js +454 -0
- package/dist/core/opa-policy-gate.js.map +1 -0
- package/dist/core/orchestrator.d.ts +14 -0
- package/dist/core/orchestrator.js +1297 -0
- package/dist/core/orchestrator.js.map +1 -0
- package/dist/core/pii-detector.d.ts +82 -0
- package/dist/core/pii-detector.js +126 -0
- package/dist/core/pii-detector.js.map +1 -0
- package/dist/core/rag-engine.d.ts +121 -0
- package/dist/core/rag-engine.js +504 -0
- package/dist/core/rag-engine.js.map +1 -0
- package/dist/core/task-queue.d.ts +69 -0
- package/dist/core/task-queue.js +124 -0
- package/dist/core/task-queue.js.map +1 -0
- package/dist/core/telemetry.d.ts +56 -0
- package/dist/core/telemetry.js +94 -0
- package/dist/core/telemetry.js.map +1 -0
- package/dist/core/types.d.ts +328 -0
- package/dist/core/types.js +24 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +12444 -0
- package/dist/index.js.map +1 -0
- package/dist/llm-tracer-CIIujuO-.d.ts +493 -0
- package/dist/mcp/server.d.ts +2651 -0
- package/dist/mcp/server.js +676 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/orchestrator-DF89k_AK.d.ts +506 -0
- package/package.json +157 -0
- package/templates/README.md +7 -0
- package/templates/baseline.config.ts +207 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
Copyright 2026 Baseline Protocol Foundation
|
|
6
|
+
|
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
you may not use this file except in compliance with the License.
|
|
9
|
+
You may obtain a copy of the License at
|
|
10
|
+
|
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
|
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
See the License for the specific language governing permissions and
|
|
17
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# baselineos
|
|
2
|
+
|
|
3
|
+
Agentic Governance Engine — autonomous AI task execution with built-in governance, audit trails, and evidence bundles.
|
|
4
|
+
|
|
5
|
+
**Status:** `0.2.0-beta.1`
|
|
6
|
+
**License:** Apache-2.0
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install baselineos
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or use directly:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx baselineos --version
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Interfaces
|
|
25
|
+
|
|
26
|
+
BaselineOS provides three interfaces for different use cases:
|
|
27
|
+
|
|
28
|
+
| Interface | Use Case | Entry Point |
|
|
29
|
+
|-----------|----------|-------------|
|
|
30
|
+
| **CLI** | Developer workflow, CI/CD | `baseline init / run / serve` |
|
|
31
|
+
| **SDK** | Programmatic integration | `import { Baseline } from 'baselineos'` |
|
|
32
|
+
| **API** | External system integration | REST + WebSocket on port 3141 |
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## CLI Quickstart
|
|
37
|
+
|
|
38
|
+
### 1. Initialize a project
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx baselineos init
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
This creates a `baseline.config.ts` in your project root with sensible defaults.
|
|
45
|
+
|
|
46
|
+
### 2. Index your knowledge base
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npx baselineos index
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Indexes markdown, code, and config files from paths defined in your config.
|
|
53
|
+
|
|
54
|
+
### 3. Run a governed task
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx baselineos run "Implement OAuth flow with acceptance criteria"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The orchestrator decomposes, executes, verifies, and reviews autonomously — producing an audit trail and evidence bundle for every task.
|
|
61
|
+
|
|
62
|
+
### 4. Start the server
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx baselineos serve
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Starts the REST API (port 3141), WebSocket stream, and MCP server.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## MCP Setup (Claude Desktop)
|
|
73
|
+
|
|
74
|
+
Add to your `claude_desktop_config.json`:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"baselineos": {
|
|
80
|
+
"command": "npx",
|
|
81
|
+
"args": ["baselineos", "mcp"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Config file location:**
|
|
88
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
89
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
90
|
+
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
91
|
+
|
|
92
|
+
Restart Claude Desktop. BaselineOS tools appear in the tool picker — 16 tools across task execution, knowledge retrieval, memory, and governance.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## SDK Quickstart
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { Baseline } from 'baselineos';
|
|
100
|
+
|
|
101
|
+
const baseline = new Baseline({
|
|
102
|
+
projectRoot: process.cwd(),
|
|
103
|
+
knowledge: ['./docs', './specs'],
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
await baseline.init();
|
|
107
|
+
|
|
108
|
+
// Run a governed task
|
|
109
|
+
const task = await baseline.run({
|
|
110
|
+
title: 'Implement OAuth',
|
|
111
|
+
description: 'Add OAuth 2.0 authentication flow',
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// Memory
|
|
115
|
+
await baseline.remember({ key: 'preference', value: { theme: 'dark' }, scope: 'long-term' });
|
|
116
|
+
const recalled = await baseline.recall({ key: 'preference', scope: 'all' });
|
|
117
|
+
|
|
118
|
+
// Knowledge retrieval
|
|
119
|
+
const results = await baseline.search('authentication patterns');
|
|
120
|
+
const context = await baseline.getContext('oauth');
|
|
121
|
+
|
|
122
|
+
// Evidence
|
|
123
|
+
const evidence = await baseline.getEvidenceBundle(task.id);
|
|
124
|
+
const audit = await baseline.getAuditTrail(task.id);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## API Quickstart
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Create a task
|
|
133
|
+
curl -X POST http://localhost:3141/api/tasks \
|
|
134
|
+
-H "Content-Type: application/json" \
|
|
135
|
+
-d '{"title":"Implement feature","description":"Add OAuth 2.0 flow"}'
|
|
136
|
+
|
|
137
|
+
# List tasks
|
|
138
|
+
curl http://localhost:3141/api/tasks
|
|
139
|
+
|
|
140
|
+
# Get system stats
|
|
141
|
+
curl http://localhost:3141/api/stats
|
|
142
|
+
|
|
143
|
+
# Search knowledge
|
|
144
|
+
curl -X POST http://localhost:3141/api/search \
|
|
145
|
+
-H "Content-Type: application/json" \
|
|
146
|
+
-d '{"query":"authentication","limit":10}'
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Full API documentation: [OpenAPI Spec](../../specs/api/openapi.yaml)
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Package Exports
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
import { Baseline } from 'baselineos'; // Main engine
|
|
157
|
+
import { Orchestrator } from 'baselineos/orchestrator'; // Task orchestration
|
|
158
|
+
import { MemorySystem } from 'baselineos/memory'; // Multi-scope memory
|
|
159
|
+
import { SemanticCache } from 'baselineos/cache'; // Semantic caching
|
|
160
|
+
import { KnowledgeIndexer } from 'baselineos/indexer'; // Knowledge indexing
|
|
161
|
+
import { MCPServer } from 'baselineos/mcp'; // MCP server
|
|
162
|
+
import { AnthropicEngine } from 'baselineos/engine'; // Execution engine
|
|
163
|
+
import { RAGEngine } from 'baselineos/rag'; // RAG retrieval
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
## Governance
|
|
169
|
+
|
|
170
|
+
Every task execution produces:
|
|
171
|
+
|
|
172
|
+
- **Audit trail** — append-only log of all operations
|
|
173
|
+
- **Evidence bundle** — exportable governance artifact (who approved, what policies governed, what happened)
|
|
174
|
+
- **Risk assessment** — complexity/impact analysis with mitigation tracking
|
|
175
|
+
- **Compliance checks** — standard-based validation (ISO 27001, NDPC, AfCFTA)
|
|
176
|
+
|
|
177
|
+
Governance is structural, not advisory. Policies are enforced at execution time.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Configuration
|
|
182
|
+
|
|
183
|
+
`baseline.config.ts` controls orchestrator behavior, LLM settings, caching, agents, and governance rules. See `templates/baseline.config.ts` for the full reference.
|
|
184
|
+
|
|
185
|
+
Key options:
|
|
186
|
+
|
|
187
|
+
| Option | Default | Description |
|
|
188
|
+
|--------|---------|-------------|
|
|
189
|
+
| `orchestrator.maxAutonomousComplexity` | `'complex'` | Tasks above this require human approval |
|
|
190
|
+
| `orchestrator.selfVerificationRequired` | `true` | Agent verifies own work before proceeding |
|
|
191
|
+
| `orchestrator.supervisorReviewThreshold` | `0.7` | Review if confidence below 70% |
|
|
192
|
+
| `governance.auditLevel` | `'basic'` | `none` / `basic` / `full` |
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
Apache-2.0 — Baseline Protocol Contributors
|