@baselineos/studio 0.1.0
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/.turbo/turbo-build.log +14 -0
- package/.turbo/turbo-test.log +16 -0
- package/LICENSE +17 -0
- package/README.md +19 -0
- package/dist/index.d.ts +210 -0
- package/dist/index.js +846 -0
- package/package.json +34 -0
- package/src/__tests__/manifest.test.ts +14 -0
- package/src/__tests__/smoke.test.ts +16 -0
- package/src/__tests__/workflow.test.ts +26 -0
- package/src/config/studio-system-config.json +224 -0
- package/src/index.ts +21 -0
- package/src/system.ts +885 -0
- package/tsconfig.json +9 -0
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@baselineos/studio",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Baseline Studio — Execution & Output Layer",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@baselineos/protocol-core": "1.0.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"tsup": "^8.0.0",
|
|
20
|
+
"typescript": "^5.7.0",
|
|
21
|
+
"vitest": "^2.1.0"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsup src/index.ts --format esm --dts",
|
|
28
|
+
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
29
|
+
"test": "vitest run",
|
|
30
|
+
"lint": "eslint src/",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"clean": "rm -rf dist"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { BaselineStudioSystem } from '../index.js';
|
|
3
|
+
|
|
4
|
+
describe('studio manifest', () => {
|
|
5
|
+
it('produces stable artifact hashes for identical output', async () => {
|
|
6
|
+
const studio = new BaselineStudioSystem();
|
|
7
|
+
|
|
8
|
+
const first = await studio.executeCommand('generate', { format: 'text' }, { foo: 'bar' });
|
|
9
|
+
const second = await studio.executeCommand('generate', { format: 'text' }, { foo: 'bar' });
|
|
10
|
+
|
|
11
|
+
expect(first.artifacts?.[0].hash).toBe(second.artifacts?.[0].hash);
|
|
12
|
+
expect(first.manifest?.hash).toBeDefined();
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { BaselineStudioSystem } from '../index.js';
|
|
3
|
+
|
|
4
|
+
describe('studio', () => {
|
|
5
|
+
it('should instantiate BaselineStudioSystem', () => {
|
|
6
|
+
const studio = new BaselineStudioSystem();
|
|
7
|
+
expect(studio).toBeDefined();
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('should report status', () => {
|
|
11
|
+
const studio = new BaselineStudioSystem();
|
|
12
|
+
const status = studio.getStatus();
|
|
13
|
+
expect(status).toBeDefined();
|
|
14
|
+
expect(status.system).toBeDefined();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { BaselineStudioSystem } from '../index.js';
|
|
3
|
+
|
|
4
|
+
describe('studio workflow', () => {
|
|
5
|
+
it('executes a command with a valid format', async () => {
|
|
6
|
+
const studio = new BaselineStudioSystem();
|
|
7
|
+
const result = await studio.executeCommand('generate', { format: 'json' }, {});
|
|
8
|
+
expect(result.success).toBe(true);
|
|
9
|
+
expect(result.command).toBe('generate');
|
|
10
|
+
expect(result.manifest).toBeDefined();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('renders templates deterministically', () => {
|
|
14
|
+
const studio = new BaselineStudioSystem();
|
|
15
|
+
studio.registerTemplate({
|
|
16
|
+
id: 'hello',
|
|
17
|
+
name: 'Hello',
|
|
18
|
+
format: 'text',
|
|
19
|
+
template: 'Hello {{user.name}}',
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const first = studio.renderTemplate('hello', { user: { name: 'Amani' } });
|
|
23
|
+
const second = studio.renderTemplate('hello', { user: { name: 'Amani' } });
|
|
24
|
+
expect(first).toBe(second);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
{
|
|
2
|
+
"system": {
|
|
3
|
+
"name": "Baseline Studio System",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Execution and output generation layer for Baseline Protocol",
|
|
6
|
+
"type": "studio-layer",
|
|
7
|
+
"architecture": "execution-orchestration"
|
|
8
|
+
},
|
|
9
|
+
"execution": {
|
|
10
|
+
"maxConcurrent": 10,
|
|
11
|
+
"timeout": 60000,
|
|
12
|
+
"retryAttempts": 5,
|
|
13
|
+
"retryDelay": 2000,
|
|
14
|
+
"backoffMultiplier": 1.5,
|
|
15
|
+
"maxRetryDelay": 30000,
|
|
16
|
+
"enableCircuitBreaker": true,
|
|
17
|
+
"circuitBreakerThreshold": 5,
|
|
18
|
+
"circuitBreakerTimeout": 60000,
|
|
19
|
+
"enableLoadBalancing": true,
|
|
20
|
+
"loadBalancingStrategy": "round-robin",
|
|
21
|
+
"enableHealthChecks": true,
|
|
22
|
+
"healthCheckInterval": 30000,
|
|
23
|
+
"enableMetrics": true,
|
|
24
|
+
"metricsCollection": ["execution_time", "success_rate", "error_rate", "throughput"]
|
|
25
|
+
},
|
|
26
|
+
"output": {
|
|
27
|
+
"formats": ["json", "yaml", "text", "table", "csv", "xml", "html"],
|
|
28
|
+
"defaultFormat": "text",
|
|
29
|
+
"prettyPrint": true,
|
|
30
|
+
"includeMetadata": true,
|
|
31
|
+
"includeTimestamps": true,
|
|
32
|
+
"includePerformance": true,
|
|
33
|
+
"compression": {
|
|
34
|
+
"enabled": false,
|
|
35
|
+
"algorithm": "gzip",
|
|
36
|
+
"level": 6
|
|
37
|
+
},
|
|
38
|
+
"encryption": {
|
|
39
|
+
"enabled": false,
|
|
40
|
+
"algorithm": "aes-256",
|
|
41
|
+
"keyRotation": false
|
|
42
|
+
},
|
|
43
|
+
"validation": {
|
|
44
|
+
"enabled": true,
|
|
45
|
+
"schema": "auto",
|
|
46
|
+
"strict": false
|
|
47
|
+
},
|
|
48
|
+
"customization": {
|
|
49
|
+
"enableCustomFormatters": true,
|
|
50
|
+
"enableTemplateEngine": true,
|
|
51
|
+
"enableDynamicFormatting": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"workflows": {
|
|
55
|
+
"maxSteps": 200,
|
|
56
|
+
"maxDepth": 20,
|
|
57
|
+
"enableRollback": true,
|
|
58
|
+
"enableCheckpoints": true,
|
|
59
|
+
"checkpointInterval": 10,
|
|
60
|
+
"rollbackStrategy": "automatic",
|
|
61
|
+
"enableParallelExecution": true,
|
|
62
|
+
"maxParallelSteps": 5,
|
|
63
|
+
"enableConditionalExecution": true,
|
|
64
|
+
"enableLooping": true,
|
|
65
|
+
"maxLoopIterations": 100,
|
|
66
|
+
"enableErrorHandling": true,
|
|
67
|
+
"errorHandlingStrategy": "continue-on-error",
|
|
68
|
+
"enableMonitoring": true,
|
|
69
|
+
"monitoringInterval": 1000,
|
|
70
|
+
"enableLogging": true,
|
|
71
|
+
"logLevel": "info",
|
|
72
|
+
"enableAuditing": true,
|
|
73
|
+
"auditTrail": true
|
|
74
|
+
},
|
|
75
|
+
"performance": {
|
|
76
|
+
"enableCaching": true,
|
|
77
|
+
"cacheSize": 5000,
|
|
78
|
+
"cacheTTL": 600000,
|
|
79
|
+
"cacheStrategy": "lru",
|
|
80
|
+
"enableProfiling": false,
|
|
81
|
+
"profilingLevel": "basic",
|
|
82
|
+
"enableOptimization": true,
|
|
83
|
+
"optimizationStrategies": ["query_optimization", "memory_optimization", "cpu_optimization"],
|
|
84
|
+
"enableLoadBalancing": true,
|
|
85
|
+
"loadBalancingAlgorithm": "least_connections",
|
|
86
|
+
"enableAutoScaling": false,
|
|
87
|
+
"autoScalingThreshold": 80,
|
|
88
|
+
"enableResourceMonitoring": true,
|
|
89
|
+
"resourceThresholds": {
|
|
90
|
+
"cpu": 80,
|
|
91
|
+
"memory": 80,
|
|
92
|
+
"disk": 85,
|
|
93
|
+
"network": 70
|
|
94
|
+
},
|
|
95
|
+
"enablePerformanceAlerts": true,
|
|
96
|
+
"alertThresholds": {
|
|
97
|
+
"response_time": 1000,
|
|
98
|
+
"throughput": 100,
|
|
99
|
+
"error_rate": 5
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"integration": {
|
|
103
|
+
"langSystem": {
|
|
104
|
+
"enabled": true,
|
|
105
|
+
"interface": "command_processing",
|
|
106
|
+
"dataFlow": "bidirectional",
|
|
107
|
+
"synchronization": "real-time"
|
|
108
|
+
},
|
|
109
|
+
"frameSystem": {
|
|
110
|
+
"enabled": true,
|
|
111
|
+
"interface": "context_management",
|
|
112
|
+
"dataFlow": "bidirectional",
|
|
113
|
+
"synchronization": "real-time"
|
|
114
|
+
},
|
|
115
|
+
"governSystem": {
|
|
116
|
+
"enabled": false,
|
|
117
|
+
"interface": "policy_enforcement",
|
|
118
|
+
"dataFlow": "unidirectional",
|
|
119
|
+
"synchronization": "on-demand"
|
|
120
|
+
},
|
|
121
|
+
"experienceSystem": {
|
|
122
|
+
"enabled": false,
|
|
123
|
+
"interface": "user_interaction",
|
|
124
|
+
"dataFlow": "bidirectional",
|
|
125
|
+
"synchronization": "real-time"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"security": {
|
|
129
|
+
"authentication": {
|
|
130
|
+
"required": true,
|
|
131
|
+
"methods": ["token", "oauth", "sso", "certificate"],
|
|
132
|
+
"timeout": 3600,
|
|
133
|
+
"refreshEnabled": true
|
|
134
|
+
},
|
|
135
|
+
"authorization": {
|
|
136
|
+
"required": true,
|
|
137
|
+
"method": "role-based",
|
|
138
|
+
"audit": true,
|
|
139
|
+
"granular": true
|
|
140
|
+
},
|
|
141
|
+
"encryption": {
|
|
142
|
+
"data_at_rest": true,
|
|
143
|
+
"data_in_transit": true,
|
|
144
|
+
"algorithm": "AES-256",
|
|
145
|
+
"key_management": "automated"
|
|
146
|
+
},
|
|
147
|
+
"logging": {
|
|
148
|
+
"enabled": true,
|
|
149
|
+
"level": "info",
|
|
150
|
+
"retention": "90d",
|
|
151
|
+
"encryption": true
|
|
152
|
+
},
|
|
153
|
+
"monitoring": {
|
|
154
|
+
"enabled": true,
|
|
155
|
+
"real_time": true,
|
|
156
|
+
"alerts": true,
|
|
157
|
+
"compliance": true
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"monitoring": {
|
|
161
|
+
"metrics": {
|
|
162
|
+
"enabled": true,
|
|
163
|
+
"collection": ["performance", "business", "infrastructure"],
|
|
164
|
+
"interval": 5000,
|
|
165
|
+
"retention": "30d"
|
|
166
|
+
},
|
|
167
|
+
"alerting": {
|
|
168
|
+
"enabled": true,
|
|
169
|
+
"channels": ["email", "slack", "webhook"],
|
|
170
|
+
"escalation": true,
|
|
171
|
+
"auto_resolution": false
|
|
172
|
+
},
|
|
173
|
+
"dashboard": {
|
|
174
|
+
"enabled": true,
|
|
175
|
+
"real_time": true,
|
|
176
|
+
"customizable": true,
|
|
177
|
+
"export": true
|
|
178
|
+
},
|
|
179
|
+
"reporting": {
|
|
180
|
+
"enabled": true,
|
|
181
|
+
"scheduled": true,
|
|
182
|
+
"formats": ["pdf", "html", "csv"],
|
|
183
|
+
"automation": true
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"deployment": {
|
|
187
|
+
"environments": {
|
|
188
|
+
"development": {
|
|
189
|
+
"config": "dev",
|
|
190
|
+
"features": ["debug", "profiling", "detailed_logging"]
|
|
191
|
+
},
|
|
192
|
+
"testing": {
|
|
193
|
+
"config": "test",
|
|
194
|
+
"features": ["validation", "testing", "mock_data"]
|
|
195
|
+
},
|
|
196
|
+
"staging": {
|
|
197
|
+
"config": "staging",
|
|
198
|
+
"features": ["monitoring", "performance", "security"]
|
|
199
|
+
},
|
|
200
|
+
"production": {
|
|
201
|
+
"config": "prod",
|
|
202
|
+
"features": ["optimization", "security", "monitoring"]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"scaling": {
|
|
206
|
+
"horizontal": true,
|
|
207
|
+
"vertical": true,
|
|
208
|
+
"auto": false,
|
|
209
|
+
"manual": true
|
|
210
|
+
},
|
|
211
|
+
"backup": {
|
|
212
|
+
"enabled": true,
|
|
213
|
+
"frequency": "daily",
|
|
214
|
+
"retention": "30d",
|
|
215
|
+
"encryption": true
|
|
216
|
+
},
|
|
217
|
+
"recovery": {
|
|
218
|
+
"enabled": true,
|
|
219
|
+
"rto": "4h",
|
|
220
|
+
"rpo": "1h",
|
|
221
|
+
"automated": true
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export {
|
|
2
|
+
BaselineStudioSystem,
|
|
3
|
+
ExecutionEngine,
|
|
4
|
+
OutputGenerator,
|
|
5
|
+
WorkflowManager,
|
|
6
|
+
ResultProcessor,
|
|
7
|
+
PerformanceOptimizer,
|
|
8
|
+
} from './system.js';
|
|
9
|
+
|
|
10
|
+
export type {
|
|
11
|
+
StudioSystemConfig,
|
|
12
|
+
ExecutionConfig,
|
|
13
|
+
OutputConfig,
|
|
14
|
+
WorkflowConfig,
|
|
15
|
+
PerformanceConfig,
|
|
16
|
+
StudioCommandResult,
|
|
17
|
+
WorkflowDefinition,
|
|
18
|
+
WorkflowResult,
|
|
19
|
+
ExecutionStats,
|
|
20
|
+
CacheEntry,
|
|
21
|
+
} from './system.js';
|