@baselineos/cli 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/.baseline/govern/audit-trail.json +61 -0
- package/.turbo/turbo-build.log +23 -0
- package/.turbo/turbo-test.log +80 -0
- package/LICENSE +17 -0
- package/README.md +19 -0
- package/dist/chunk-CCIHFLKI.js +1792 -0
- package/dist/cli.cjs +2290 -0
- package/dist/cli.d.cts +8 -0
- package/dist/cli.d.ts +8 -0
- package/dist/cli.js +470 -0
- package/dist/index.cjs +3488 -0
- package/dist/index.d.cts +616 -0
- package/dist/index.d.ts +616 -0
- package/dist/index.js +1664 -0
- package/in/.baseline/govern/audit-trail.json +61 -0
- package/package.json +45 -0
- package/src/__tests__/badge.test.ts +93 -0
- package/src/__tests__/cli.test.ts +22 -0
- package/src/__tests__/commands.test.ts +178 -0
- package/src/__tests__/schema.test.ts +114 -0
- package/src/__tests__/smoke.test.ts +15 -0
- package/src/__tests__/verify.test.ts +135 -0
- package/src/badge.ts +88 -0
- package/src/cli.ts +314 -0
- package/src/commands.ts +2228 -0
- package/src/config/megagem-config.json +266 -0
- package/src/index.ts +19 -0
- package/src/megagem.ts +1800 -0
- package/src/verify.ts +254 -0
- package/tsconfig.json +8 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "audit-1775397759564-86",
|
|
4
|
+
"type": "policy_created",
|
|
5
|
+
"actor": "system",
|
|
6
|
+
"policyId": "policy-1775397759564",
|
|
7
|
+
"details": {
|
|
8
|
+
"policyId": "policy-1775397759564",
|
|
9
|
+
"name": "baseline-default"
|
|
10
|
+
},
|
|
11
|
+
"timestamp": "2026-04-05T14:02:39.564Z"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"id": "audit-1775397759564-700",
|
|
15
|
+
"type": "policy_approved",
|
|
16
|
+
"actor": "baseline-cli",
|
|
17
|
+
"policyId": "policy-1775397759564",
|
|
18
|
+
"details": {
|
|
19
|
+
"policyId": "policy-1775397759564"
|
|
20
|
+
},
|
|
21
|
+
"timestamp": "2026-04-05T14:02:39.564Z"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "audit-1775397759564-83",
|
|
25
|
+
"type": "policy_evaluated",
|
|
26
|
+
"actor": "system",
|
|
27
|
+
"policyId": "policy-1775397759564",
|
|
28
|
+
"details": {
|
|
29
|
+
"policyId": "policy-1775397759564",
|
|
30
|
+
"passed": true,
|
|
31
|
+
"enforcementAction": "allow",
|
|
32
|
+
"violationCount": 0
|
|
33
|
+
},
|
|
34
|
+
"timestamp": "2026-04-05T14:02:39.564Z"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "audit-1775397759565-444",
|
|
38
|
+
"type": "policy_enforced",
|
|
39
|
+
"actor": "system",
|
|
40
|
+
"policyId": "policy-1775397759564",
|
|
41
|
+
"resourceId": "/home/runner/work/baseline/baseline/packages/cli",
|
|
42
|
+
"details": {
|
|
43
|
+
"policyId": "policy-1775397759564",
|
|
44
|
+
"resourceId": "/home/runner/work/baseline/baseline/packages/cli",
|
|
45
|
+
"enforcementAction": "allow"
|
|
46
|
+
},
|
|
47
|
+
"timestamp": "2026-04-05T14:02:39.565Z"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "audit-1775397759566-838",
|
|
51
|
+
"type": "compliance_checked",
|
|
52
|
+
"actor": "system",
|
|
53
|
+
"details": {
|
|
54
|
+
"complianceId": "compliance-1775397759566",
|
|
55
|
+
"standard": "ISO27001",
|
|
56
|
+
"compliant": true,
|
|
57
|
+
"violationCount": 0
|
|
58
|
+
},
|
|
59
|
+
"timestamp": "2026-04-05T14:02:39.566Z"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
> @baselineos/cli@0.1.0 build /home/runner/work/baseline/baseline/packages/cli
|
|
3
|
+
> tsup src/index.ts src/cli.ts --format esm,cjs --dts
|
|
4
|
+
|
|
5
|
+
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Target: es2022
|
|
9
|
+
[34mESM[39m Build start
|
|
10
|
+
[34mCJS[39m Build start
|
|
11
|
+
[32mCJS[39m [1mdist/cli.cjs [22m[32m89.59 KB[39m
|
|
12
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m122.91 KB[39m
|
|
13
|
+
[32mCJS[39m ⚡️ Build success in 95ms
|
|
14
|
+
[32mESM[39m [1mdist/cli.js [22m[32m19.06 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/index.js [22m[32m52.51 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/chunk-CCIHFLKI.js [22m[32m67.88 KB[39m
|
|
17
|
+
[32mESM[39m ⚡️ Build success in 96ms
|
|
18
|
+
[34mDTS[39m Build start
|
|
19
|
+
[32mDTS[39m ⚡️ Build success in 5548ms
|
|
20
|
+
[32mDTS[39m [1mdist/cli.d.ts [22m[32m185.00 B[39m
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m19.33 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/cli.d.cts [22m[32m185.00 B[39m
|
|
23
|
+
[32mDTS[39m [1mdist/index.d.cts [22m[32m19.33 KB[39m
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
> @baselineos/cli@0.1.0 test /home/runner/work/baseline/baseline/packages/cli
|
|
3
|
+
> vitest run
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
[1m[7m[36m RUN [39m[27m[22m [36mv2.1.9 [39m[90m/home/runner/work/baseline/baseline/packages/cli[39m
|
|
7
|
+
|
|
8
|
+
[32m✓[39m src/__tests__/commands.test.ts [2m([22m[2m7 tests[22m[2m)[22m[90m 72[2mms[22m[39m
|
|
9
|
+
[32m✓[39m src/__tests__/verify.test.ts [2m([22m[2m11 tests[22m[2m)[22m[90m 33[2mms[22m[39m
|
|
10
|
+
[32m✓[39m src/__tests__/schema.test.ts [2m([22m[2m27 tests[22m[2m)[22m[90m 49[2mms[22m[39m
|
|
11
|
+
[32m✓[39m src/__tests__/badge.test.ts [2m([22m[2m11 tests[22m[2m)[22m[90m 22[2mms[22m[39m
|
|
12
|
+
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
13
|
+
[22m[39m
|
|
14
|
+
██████╗ █████╗ ███████╗███████╗██╗ ██╗███╗ ██╗███████╗
|
|
15
|
+
██╔══██╗██╔══██╗██╔════╝██╔════╝██║ ██║████╗ ██║██╔════╝
|
|
16
|
+
██████╔╝███████║███████╗█████╗ ██║ ██║██╔██╗ ██║█████╗
|
|
17
|
+
██╔══██╗██╔══██║╚════██║██╔══╝ ██║ ██║██║╚██╗██║██╔══╝
|
|
18
|
+
██████╔╝██║ ██║███████║███████╗███████╗██║██║ ╚████║███████╗
|
|
19
|
+
╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═══╝╚══════╝
|
|
20
|
+
|
|
21
|
+
Baseline Protocol • Guided Onboarding
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Baseline Protocol CLI v0.1.0
|
|
25
|
+
|
|
26
|
+
Usage: baseline <command> [options]
|
|
27
|
+
|
|
28
|
+
Commands:
|
|
29
|
+
help Show this help message
|
|
30
|
+
status Show status of all protocol layers
|
|
31
|
+
onboard Run the guided onboarding flow
|
|
32
|
+
experience Run immersive onboarding experiences
|
|
33
|
+
init Initialize Baseline and write config
|
|
34
|
+
run Run the full Baseline workflow
|
|
35
|
+
index Index docs or context for retrieval
|
|
36
|
+
verify Verify policy compliance and evidence integrity
|
|
37
|
+
serve Start the Baseline MCP server
|
|
38
|
+
agents Show agent registry status
|
|
39
|
+
config Configure Baseline preferences
|
|
40
|
+
doctor Run diagnostics for Baseline readiness
|
|
41
|
+
version Show version information
|
|
42
|
+
|
|
43
|
+
Layer Commands:
|
|
44
|
+
--baseline Run full Baseline Protocol workflow
|
|
45
|
+
--baseline-lang Run Language layer only
|
|
46
|
+
--baseline-frame Run Frame layer only
|
|
47
|
+
--baseline-studio Run Studio layer only
|
|
48
|
+
--baseline-govern Run Governance layer only
|
|
49
|
+
--init Initialize a new Baseline project
|
|
50
|
+
--run Run the full workflow
|
|
51
|
+
--status Show system status
|
|
52
|
+
--help Show help information
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m4 tests[22m[2m)[22m[90m 13[2mms[22m[39m
|
|
56
|
+
[90mstdout[2m | src/__tests__/smoke.test.ts[2m > [22m[2mcli[2m > [22m[2mshould report status
|
|
57
|
+
[22m[39m[Baseline:Status]
|
|
58
|
+
Mode: inactive
|
|
59
|
+
Context: none
|
|
60
|
+
Queue: 0 commands
|
|
61
|
+
History: 0 executions
|
|
62
|
+
MEGAGEM: disconnected
|
|
63
|
+
Context Engine: disconnected
|
|
64
|
+
|
|
65
|
+
Governance Layers:
|
|
66
|
+
◌ lang armed last check: none
|
|
67
|
+
◌ frame armed last check: none
|
|
68
|
+
◌ studio armed last check: none
|
|
69
|
+
◌ govern armed last check: none
|
|
70
|
+
◌ experience armed last check: none
|
|
71
|
+
◌ autonomy armed last check: none
|
|
72
|
+
◌ persona armed last check: none
|
|
73
|
+
|
|
74
|
+
[32m✓[39m src/__tests__/smoke.test.ts [2m([22m[2m2 tests[22m[2m)[22m[90m 13[2mms[22m[39m
|
|
75
|
+
|
|
76
|
+
[2m Test Files [22m [1m[32m6 passed[39m[22m[90m (6)[39m
|
|
77
|
+
[2m Tests [22m [1m[32m62 passed[39m[22m[90m (62)[39m
|
|
78
|
+
[2m Start at [22m 14:02:38
|
|
79
|
+
[2m Duration [22m 4.66s[2m (transform 1.06s, setup 0ms, collect 1.53s, tests 203ms, environment 1ms, prepare 1.02s)[22m
|
|
80
|
+
|
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,19 @@
|
|
|
1
|
+
# @baselineos/cli
|
|
2
|
+
|
|
3
|
+
Baseline command-line interface package (`baseline` command).
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Provides the operator/developer command surface for guided runs, full workflow execution, API/MCP serving, and quality-oriented commands.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm --filter @baselineos/cli build
|
|
13
|
+
pnpm --filter @baselineos/cli test
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Integration
|
|
17
|
+
|
|
18
|
+
- Depends on all layer packages + `baselineos`
|
|
19
|
+
- Binary entrypoint: `dist/cli.js`
|