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.
Files changed (64) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +198 -0
  3. package/dist/__evals__/runner.d.ts +2 -0
  4. package/dist/__evals__/runner.js +14687 -0
  5. package/dist/__evals__/runner.js.map +1 -0
  6. package/dist/api/server.d.ts +21 -0
  7. package/dist/api/server.js +1007 -0
  8. package/dist/api/server.js.map +1 -0
  9. package/dist/cli/bin.d.ts +1 -0
  10. package/dist/cli/bin.js +8427 -0
  11. package/dist/cli/bin.js.map +1 -0
  12. package/dist/core/agent-bus.d.ts +110 -0
  13. package/dist/core/agent-bus.js +242 -0
  14. package/dist/core/agent-bus.js.map +1 -0
  15. package/dist/core/cache.d.ts +66 -0
  16. package/dist/core/cache.js +160 -0
  17. package/dist/core/cache.js.map +1 -0
  18. package/dist/core/config.d.ts +1002 -0
  19. package/dist/core/config.js +429 -0
  20. package/dist/core/config.js.map +1 -0
  21. package/dist/core/indexer.d.ts +152 -0
  22. package/dist/core/indexer.js +481 -0
  23. package/dist/core/indexer.js.map +1 -0
  24. package/dist/core/llm-tracer.d.ts +2 -0
  25. package/dist/core/llm-tracer.js +241 -0
  26. package/dist/core/llm-tracer.js.map +1 -0
  27. package/dist/core/memory.d.ts +86 -0
  28. package/dist/core/memory.js +346 -0
  29. package/dist/core/memory.js.map +1 -0
  30. package/dist/core/opa-client.d.ts +51 -0
  31. package/dist/core/opa-client.js +157 -0
  32. package/dist/core/opa-client.js.map +1 -0
  33. package/dist/core/opa-policy-gate.d.ts +133 -0
  34. package/dist/core/opa-policy-gate.js +454 -0
  35. package/dist/core/opa-policy-gate.js.map +1 -0
  36. package/dist/core/orchestrator.d.ts +14 -0
  37. package/dist/core/orchestrator.js +1297 -0
  38. package/dist/core/orchestrator.js.map +1 -0
  39. package/dist/core/pii-detector.d.ts +82 -0
  40. package/dist/core/pii-detector.js +126 -0
  41. package/dist/core/pii-detector.js.map +1 -0
  42. package/dist/core/rag-engine.d.ts +121 -0
  43. package/dist/core/rag-engine.js +504 -0
  44. package/dist/core/rag-engine.js.map +1 -0
  45. package/dist/core/task-queue.d.ts +69 -0
  46. package/dist/core/task-queue.js +124 -0
  47. package/dist/core/task-queue.js.map +1 -0
  48. package/dist/core/telemetry.d.ts +56 -0
  49. package/dist/core/telemetry.js +94 -0
  50. package/dist/core/telemetry.js.map +1 -0
  51. package/dist/core/types.d.ts +328 -0
  52. package/dist/core/types.js +24 -0
  53. package/dist/core/types.js.map +1 -0
  54. package/dist/index.d.ts +21 -0
  55. package/dist/index.js +12444 -0
  56. package/dist/index.js.map +1 -0
  57. package/dist/llm-tracer-CIIujuO-.d.ts +493 -0
  58. package/dist/mcp/server.d.ts +2651 -0
  59. package/dist/mcp/server.js +676 -0
  60. package/dist/mcp/server.js.map +1 -0
  61. package/dist/orchestrator-DF89k_AK.d.ts +506 -0
  62. package/package.json +157 -0
  63. package/templates/README.md +7 -0
  64. 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
@@ -0,0 +1,2 @@
1
+
2
+ export { }