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/package.json
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "baselineos",
|
|
3
|
+
"version": "0.2.0-beta.1",
|
|
4
|
+
"description": "Agentic Governance Engine — Autonomous AI task execution with self-supervision",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai",
|
|
7
|
+
"agents",
|
|
8
|
+
"autonomous",
|
|
9
|
+
"governance",
|
|
10
|
+
"orchestration",
|
|
11
|
+
"mcp",
|
|
12
|
+
"rag",
|
|
13
|
+
"llm"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://baselineos.dev",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/baselineos/baselineos.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"author": "BaselineOS <hello@baselineos.dev>",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"bin": {
|
|
26
|
+
"baseline": "./dist/cli/bin.js"
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./orchestrator": {
|
|
34
|
+
"import": "./dist/core/orchestrator.js",
|
|
35
|
+
"types": "./dist/core/orchestrator.d.ts"
|
|
36
|
+
},
|
|
37
|
+
"./memory": {
|
|
38
|
+
"import": "./dist/core/memory.js",
|
|
39
|
+
"types": "./dist/core/memory.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./cache": {
|
|
42
|
+
"import": "./dist/core/cache.js",
|
|
43
|
+
"types": "./dist/core/cache.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./indexer": {
|
|
46
|
+
"import": "./dist/core/indexer.js",
|
|
47
|
+
"types": "./dist/core/indexer.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./mcp": {
|
|
50
|
+
"import": "./dist/mcp/server.js",
|
|
51
|
+
"types": "./dist/mcp/server.d.ts"
|
|
52
|
+
},
|
|
53
|
+
"./engine": {
|
|
54
|
+
"import": "./dist/core/execution-engine.js",
|
|
55
|
+
"types": "./dist/core/execution-engine.d.ts"
|
|
56
|
+
},
|
|
57
|
+
"./rag": {
|
|
58
|
+
"import": "./dist/core/rag-engine.js",
|
|
59
|
+
"types": "./dist/core/rag-engine.d.ts"
|
|
60
|
+
},
|
|
61
|
+
"./bus": {
|
|
62
|
+
"import": "./dist/core/agent-bus.js",
|
|
63
|
+
"types": "./dist/core/agent-bus.d.ts"
|
|
64
|
+
},
|
|
65
|
+
"./opa": {
|
|
66
|
+
"import": "./dist/core/opa-policy-gate.js",
|
|
67
|
+
"types": "./dist/core/opa-policy-gate.d.ts"
|
|
68
|
+
},
|
|
69
|
+
"./telemetry": {
|
|
70
|
+
"import": "./dist/core/telemetry.js",
|
|
71
|
+
"types": "./dist/core/telemetry.d.ts"
|
|
72
|
+
},
|
|
73
|
+
"./pii": {
|
|
74
|
+
"import": "./dist/core/pii-detector.js",
|
|
75
|
+
"types": "./dist/core/pii-detector.d.ts"
|
|
76
|
+
},
|
|
77
|
+
"./llm-tracer": {
|
|
78
|
+
"import": "./dist/core/llm-tracer.js",
|
|
79
|
+
"types": "./dist/core/llm-tracer.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./queue": {
|
|
82
|
+
"import": "./dist/core/task-queue.js",
|
|
83
|
+
"types": "./dist/core/task-queue.d.ts"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"files": [
|
|
87
|
+
"dist",
|
|
88
|
+
"templates",
|
|
89
|
+
"README.md",
|
|
90
|
+
"LICENSE"
|
|
91
|
+
],
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"@anthropic-ai/sdk": "^0.30.0",
|
|
94
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
95
|
+
"@opentelemetry/api": "^1.9.0",
|
|
96
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.213.0",
|
|
97
|
+
"@opentelemetry/instrumentation-express": "^0.61.0",
|
|
98
|
+
"@opentelemetry/instrumentation-http": "^0.213.0",
|
|
99
|
+
"@opentelemetry/resources": "^2.6.0",
|
|
100
|
+
"@opentelemetry/sdk-node": "^0.213.0",
|
|
101
|
+
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
102
|
+
"@temporalio/activity": "^1.15.0",
|
|
103
|
+
"@temporalio/client": "^1.15.0",
|
|
104
|
+
"@temporalio/worker": "^1.15.0",
|
|
105
|
+
"@temporalio/workflow": "^1.15.0",
|
|
106
|
+
"better-sqlite3": "^11.0.0",
|
|
107
|
+
"bullmq": "^5.71.1",
|
|
108
|
+
"chalk": "^5.3.0",
|
|
109
|
+
"chromadb": "^3.4.0",
|
|
110
|
+
"commander": "^12.0.0",
|
|
111
|
+
"cosmiconfig": "^9.0.0",
|
|
112
|
+
"eventemitter3": "^5.0.0",
|
|
113
|
+
"express": "^4.18.0",
|
|
114
|
+
"glob": "^10.0.0",
|
|
115
|
+
"gray-matter": "^4.0.3",
|
|
116
|
+
"inquirer": "^9.0.0",
|
|
117
|
+
"langfuse": "^3.38.6",
|
|
118
|
+
"lru-cache": "^10.0.0",
|
|
119
|
+
"minisearch": "^7.2.0",
|
|
120
|
+
"ora": "^8.0.0",
|
|
121
|
+
"ws": "^8.16.0",
|
|
122
|
+
"zod": "^3.23.0",
|
|
123
|
+
"@baselineos/autonomy": "0.1.0",
|
|
124
|
+
"@baselineos/experience": "0.1.0",
|
|
125
|
+
"@baselineos/frame": "0.1.0",
|
|
126
|
+
"@baselineos/govern": "1.0.0",
|
|
127
|
+
"@baselineos/lang": "0.1.0",
|
|
128
|
+
"@baselineos/persona": "0.1.0",
|
|
129
|
+
"@baselineos/protocol-core": "1.0.0",
|
|
130
|
+
"@baselineos/studio": "0.1.0"
|
|
131
|
+
},
|
|
132
|
+
"devDependencies": {
|
|
133
|
+
"@types/better-sqlite3": "^7.6.0",
|
|
134
|
+
"@types/express": "^4.17.0",
|
|
135
|
+
"@types/inquirer": "^9.0.0",
|
|
136
|
+
"@types/node": "^22.0.0",
|
|
137
|
+
"@types/ws": "^8.5.0",
|
|
138
|
+
"tsup": "^8.0.0",
|
|
139
|
+
"typescript": "^5.7.0",
|
|
140
|
+
"vitest": "^2.1.0"
|
|
141
|
+
},
|
|
142
|
+
"engines": {
|
|
143
|
+
"node": ">=20.0.0"
|
|
144
|
+
},
|
|
145
|
+
"publishConfig": {
|
|
146
|
+
"access": "public"
|
|
147
|
+
},
|
|
148
|
+
"scripts": {
|
|
149
|
+
"build": "tsup",
|
|
150
|
+
"dev": "tsup --watch",
|
|
151
|
+
"test": "vitest run",
|
|
152
|
+
"lint": "eslint src/",
|
|
153
|
+
"typecheck": "tsc --noEmit",
|
|
154
|
+
"clean": "rm -rf dist",
|
|
155
|
+
"eval": "node --experimental-vm-modules dist/__evals__/runner.js"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BaselineOS Configuration Template
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by `baseline init`.
|
|
5
|
+
* Edit it to customize your BaselineOS setup.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { BaselineConfig } from 'baselineos';
|
|
9
|
+
|
|
10
|
+
const config: BaselineConfig = {
|
|
11
|
+
/**
|
|
12
|
+
* Project name (optional, used for display)
|
|
13
|
+
*/
|
|
14
|
+
name: 'my-project',
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Paths to index for knowledge retrieval.
|
|
18
|
+
* BaselineOS indexes markdown, code, and config files from these paths.
|
|
19
|
+
*/
|
|
20
|
+
knowledge: [
|
|
21
|
+
'./docs',
|
|
22
|
+
'./specs',
|
|
23
|
+
'./knowledge',
|
|
24
|
+
],
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Orchestrator configuration.
|
|
28
|
+
* Controls autonomous task execution behavior.
|
|
29
|
+
*/
|
|
30
|
+
orchestrator: {
|
|
31
|
+
/**
|
|
32
|
+
* Tasks above this complexity require human approval.
|
|
33
|
+
* Options: 'trivial' | 'simple' | 'moderate' | 'complex' | 'epic'
|
|
34
|
+
*
|
|
35
|
+
* - trivial: Quick fixes, typos
|
|
36
|
+
* - simple: Single-file changes
|
|
37
|
+
* - moderate: Multi-file, single feature
|
|
38
|
+
* - complex: Multi-feature, architectural
|
|
39
|
+
* - epic: Major initiatives (always requires human)
|
|
40
|
+
*/
|
|
41
|
+
maxAutonomousComplexity: 'complex',
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Require self-verification at every step.
|
|
45
|
+
* Agent verifies its own work before proceeding.
|
|
46
|
+
*/
|
|
47
|
+
selfVerificationRequired: true,
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Confidence threshold below which supervisor review is triggered.
|
|
51
|
+
* 0.7 = Review if less than 70% confident.
|
|
52
|
+
*/
|
|
53
|
+
supervisorReviewThreshold: 0.7,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Percentage of tasks to send through quality review (spot-check).
|
|
57
|
+
* 0.1 = 10% of tasks randomly selected for quality audit.
|
|
58
|
+
*/
|
|
59
|
+
qualityReviewSampleRate: 0.1,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Default trust score for new agents (0-100).
|
|
63
|
+
*/
|
|
64
|
+
defaultTrustScore: 70,
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Maximum retry attempts per task before escalating.
|
|
68
|
+
*/
|
|
69
|
+
defaultMaxAttempts: 3,
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* LLM configuration.
|
|
74
|
+
*/
|
|
75
|
+
llm: {
|
|
76
|
+
provider: 'anthropic',
|
|
77
|
+
model: 'claude-sonnet-4-20250514',
|
|
78
|
+
// apiKey: process.env.ANTHROPIC_API_KEY,
|
|
79
|
+
maxTokens: 8000,
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Cache configuration.
|
|
84
|
+
*/
|
|
85
|
+
cache: {
|
|
86
|
+
ttl: 86400000, // 24 hours
|
|
87
|
+
maxSize: 10000,
|
|
88
|
+
similarityThreshold: 0.85,
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* RAG configuration (optional).
|
|
93
|
+
* Controls hybrid retrieval (BM25 + ChromaDB vector search).
|
|
94
|
+
*/
|
|
95
|
+
rag: {
|
|
96
|
+
/** ChromaDB host — start with: docker compose -f docker/docker-compose.chromadb.yml up -d */
|
|
97
|
+
chromaHost: 'localhost',
|
|
98
|
+
chromaPort: 8000,
|
|
99
|
+
/** OpenAI API key for embeddings — omit to use BM25-only mode */
|
|
100
|
+
// openaiApiKey: process.env.OPENAI_API_KEY,
|
|
101
|
+
chunkSize: 1500,
|
|
102
|
+
chunkOverlap: 200,
|
|
103
|
+
maxChunksPerCollection: 1000,
|
|
104
|
+
|
|
105
|
+
/** ABAC role profiles — different roles see different RAG results */
|
|
106
|
+
roles: {
|
|
107
|
+
developer: {
|
|
108
|
+
collections: ['codebase', 'protocols', 'decisions', 'domain'],
|
|
109
|
+
sensitivity: 'internal',
|
|
110
|
+
repos: [],
|
|
111
|
+
scopes: ['engineering'],
|
|
112
|
+
},
|
|
113
|
+
'compliance-officer': {
|
|
114
|
+
collections: ['compliance', 'protocols', 'decisions', 'domain'],
|
|
115
|
+
sensitivity: 'restricted',
|
|
116
|
+
repos: [],
|
|
117
|
+
scopes: ['compliance', 'audit'],
|
|
118
|
+
},
|
|
119
|
+
public: {
|
|
120
|
+
collections: ['domain', 'protocols'],
|
|
121
|
+
sensitivity: 'public',
|
|
122
|
+
repos: [],
|
|
123
|
+
scopes: [],
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Custom agents (optional).
|
|
130
|
+
* Add domain-specific executor agents with specialized capabilities.
|
|
131
|
+
*/
|
|
132
|
+
agents: [
|
|
133
|
+
// Example: Backend specialist
|
|
134
|
+
// {
|
|
135
|
+
// id: 'backend-expert',
|
|
136
|
+
// name: 'Backend Developer',
|
|
137
|
+
// role: 'executor',
|
|
138
|
+
// capabilities: ['typescript', 'nodejs', 'postgresql', 'redis'],
|
|
139
|
+
// domains: ['api', 'database', 'backend'],
|
|
140
|
+
// },
|
|
141
|
+
|
|
142
|
+
// Example: Frontend specialist
|
|
143
|
+
// {
|
|
144
|
+
// id: 'frontend-expert',
|
|
145
|
+
// name: 'Frontend Developer',
|
|
146
|
+
// role: 'executor',
|
|
147
|
+
// capabilities: ['react', 'typescript', 'css', 'accessibility'],
|
|
148
|
+
// domains: ['ui', 'frontend', 'components'],
|
|
149
|
+
// },
|
|
150
|
+
],
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Governance rules (optional).
|
|
154
|
+
* Control what actions require approval and what resources are restricted.
|
|
155
|
+
*/
|
|
156
|
+
governance: {
|
|
157
|
+
/**
|
|
158
|
+
* Actions that always require human approval.
|
|
159
|
+
* Examples: 'deploy', 'delete-database', 'modify-permissions'
|
|
160
|
+
*/
|
|
161
|
+
requireApproval: [],
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Resources that agents cannot access.
|
|
165
|
+
* Examples: 'production-database', 'billing-api'
|
|
166
|
+
*/
|
|
167
|
+
restricted: [],
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Audit level: 'none' | 'basic' | 'full'
|
|
171
|
+
* - none: No audit logging
|
|
172
|
+
* - basic: Log task starts/completions
|
|
173
|
+
* - full: Log all agent actions
|
|
174
|
+
*/
|
|
175
|
+
auditLevel: 'basic',
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Governance pillar validators.
|
|
179
|
+
* Each pillar can be independently enabled and configured.
|
|
180
|
+
* All 7 pillars are enabled by default.
|
|
181
|
+
*/
|
|
182
|
+
validators: {
|
|
183
|
+
/** Policy enforcement — evaluate and enforce governance policies at execution time */
|
|
184
|
+
policy: { enabled: true, enforcement: 'warn' },
|
|
185
|
+
|
|
186
|
+
/** Risk assessment — evaluate complexity/impact before task execution */
|
|
187
|
+
risk: { enabled: true, blockOnCritical: true },
|
|
188
|
+
|
|
189
|
+
/** Compliance checks — validate against regulatory standards */
|
|
190
|
+
compliance: { enabled: true, standards: ['ISO-27001'] },
|
|
191
|
+
|
|
192
|
+
/** Approval workflows — require human sign-off for high-impact actions */
|
|
193
|
+
approval: { enabled: true, requiredApprovers: [] },
|
|
194
|
+
|
|
195
|
+
/** Permission gating — ABAC-based resource access control */
|
|
196
|
+
permission: { enabled: true },
|
|
197
|
+
|
|
198
|
+
/** Cost tracking — monitor and enforce token/resource budgets */
|
|
199
|
+
cost: { enabled: true },
|
|
200
|
+
|
|
201
|
+
/** Evidence production — generate exportable governance bundles */
|
|
202
|
+
evidence: { enabled: true, autoExport: false, exportPath: '.baseline/evidence' },
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export default config;
|