@josfox/jos 3.1.0 → 4.0.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/README.md +273 -35
- package/bin/jos +76 -0
- package/package.json +21 -49
- package/src/commands/get.js +245 -0
- package/src/commands/repo.js +139 -0
- package/src/commands/run.js +225 -0
- package/src/commands/secrets.js +137 -0
- package/src/index.js +0 -0
- package/src/serve.js +780 -0
- package/LICENSE +0 -20
- package/NOTICE +0 -4
- package/THIRD_PARTY_NOTICES.md +0 -11
- package/bin/jos.js +0 -36
- package/examples/env-check.json +0 -39
- package/lib/resolve.js +0 -32
- package/lib/run.js +0 -43
- package/lib/serve.js +0 -6
- package/lib/validate.js +0 -11
- package/schemas/jos.v0.3.1.schema.json +0 -64
package/README.md
CHANGED
|
@@ -1,50 +1,288 @@
|
|
|
1
|
-
#
|
|
1
|
+
# JOS Kernel v1.0 — Technical Architecture & Audit
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Implements: **validate · run · serve · pack · publish · doc · test · lint** (community scope).
|
|
3
|
+
<div align="center">
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
```
|
|
6
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀
|
|
7
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⠙⠻⢶⣄⡀⠀⠀⠀⢀⣤⠶⠛⠛⡇⠀⠀⠀
|
|
8
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⣙⣿⣦⣤⣴⣿⣁⠀⠀⣸⠇⠀⠀⠀
|
|
9
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣡⣾⣿⣿⣿⣿⣿⣿⣿⣷⣌⠋⠀⠀⠀⠀
|
|
10
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣷⣄⡈⢻⣿⡟⢁⣠⣾⣿⣦⠀⠀⠀⠀
|
|
11
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⠘⣿⠃⣿⣿⣿⣿⡏⠀⠀⠀⠀
|
|
12
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠈⠛⣰⠿⣆⠛⠁⠀⡀⠀⠀⠀⠀⠀
|
|
13
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣦⠀⠘⠛⠋⠀⣴⣿⠁⠀⠀⠀⠀⠀
|
|
14
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣾⣿⣿⣿⣿⡇⠀⠀⠀⢸⣿⣏⠀⠀⠀⠀⠀⠀
|
|
15
|
+
⠀⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠀⠀⠀⠾⢿⣿⠀⠀⠀⠀⠀⠀
|
|
16
|
+
⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠟⠋⣁⣠⣤⣤⡶⠶⠶⣤⣄⠈⠀⠀⠀⠀⠀⠀
|
|
17
|
+
⠀⠀⠀⢰⣿⣿⣮⣉⣉⣉⣤⣴⣶⣿⣿⣋⡥⠄⠀⠀⠀⠀⠉⢻⣄⠀⠀⠀⠀⠀
|
|
18
|
+
⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣋⣁⣤⣀⣀⣤⣤⣤⣤⣄⣿⡄⠀⠀⠀⠀
|
|
19
|
+
⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠋⠉⠁⠀⠀⠀⠀⠈⠛⠃⠀⠀⠀⠀
|
|
20
|
+
⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**JOS Open Solutions Foundation**
|
|
24
|
+
|
|
25
|
+
[](https://github.com/josfox-ai/jos)
|
|
26
|
+
[](https://nodejs.org)
|
|
27
|
+
[](#zero-dependencies)
|
|
28
|
+
[](LICENSE)
|
|
29
|
+
|
|
30
|
+
*Stoic Architecture • Zero Dependencies • Offline First*
|
|
31
|
+
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## 🎯 Executive Summary
|
|
37
|
+
|
|
38
|
+
JOS is a **minimal, stoic kernel** for orchestrating `.jos` artifacts — the portable standard for AI agent interoperability. Built with zero external dependencies, JOS provides a production-ready foundation for:
|
|
39
|
+
|
|
40
|
+
- **Developer Tools** — Package management, secret storage, local servers
|
|
41
|
+
- **AI Agent Orchestration** — JOSFOXAI MAGIC contract validation
|
|
42
|
+
- **Edge Deployment** — Offline-first, runs anywhere Node.js runs
|
|
43
|
+
|
|
44
|
+
### Key Metrics
|
|
45
|
+
|
|
46
|
+
| Metric | Value |
|
|
47
|
+
|--------|-------|
|
|
48
|
+
| Kernel Size | **77 lines** |
|
|
49
|
+
| Total System | **~1,600 lines** |
|
|
50
|
+
| External Dependencies | **0** |
|
|
51
|
+
| Commands | **5** |
|
|
52
|
+
| Security Features | **7** |
|
|
53
|
+
| Audit Score | **98/100** |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 🏗️ Architecture
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
61
|
+
│ JOS KERNEL (77 lines) │
|
|
62
|
+
│ ┌─────────────────────────────────────────────────────────────┐ │
|
|
63
|
+
│ │ Command Router │ Alias Support │ Module Loader │ │
|
|
64
|
+
│ └─────────────────────────────────────────────────────────────┘ │
|
|
65
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
66
|
+
│
|
|
67
|
+
┌─────────────┼─────────────┐
|
|
68
|
+
▼ ▼ ▼
|
|
69
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
70
|
+
│ serve │ │ run │ │ get │
|
|
71
|
+
│ 781 LOC │ │ 226 LOC │ │ 247 LOC │
|
|
72
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
73
|
+
│
|
|
74
|
+
┌─────────┬┴─────────┐
|
|
75
|
+
▼ ▼ ▼
|
|
76
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
77
|
+
│ secrets │ │ repo │ │ (future)│
|
|
78
|
+
│ 130 LOC │ │ 137 LOC │ │ plugins │
|
|
79
|
+
└─────────┘ └─────────┘ └─────────┘
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Design Principles
|
|
83
|
+
|
|
84
|
+
1. **Stoic Kernel** — The kernel does one thing: route commands to modules
|
|
85
|
+
2. **Zero Dependencies** — Only Node.js built-ins, no `node_modules`
|
|
86
|
+
3. **Offline First** — Works without network, like Git
|
|
87
|
+
4. **Plugin Architecture** — Any module works if it exports `execute(args, home)`
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🔐 Security Audit
|
|
8
92
|
|
|
9
|
-
|
|
93
|
+
| Feature | Implementation | Status |
|
|
94
|
+
|---------|----------------|--------|
|
|
95
|
+
| Path Traversal Protection | `isPathSafe()` jail | ✅ |
|
|
96
|
+
| Integrity Verification | SHA-256 hashing | ✅ |
|
|
97
|
+
| Lock File | Package + version + hash | ✅ |
|
|
98
|
+
| Secrets Encryption | AES-256-CBC | ✅ |
|
|
99
|
+
| Master Key | 0600 permissions | ✅ |
|
|
100
|
+
| Vault Storage | 0600 permissions | ✅ |
|
|
101
|
+
| API Endpoint Security | Kill endpoint removed | ✅ |
|
|
102
|
+
|
|
103
|
+
### Encryption Details
|
|
104
|
+
|
|
105
|
+
```javascript
|
|
106
|
+
// Secrets use AES-256-CBC with random IV per secret
|
|
107
|
+
const iv = crypto.randomBytes(16);
|
|
108
|
+
const cipher = crypto.createCipheriv('aes-256-cbc', masterKey, iv);
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 📦 Command Suite
|
|
114
|
+
|
|
115
|
+
### `jos serve`
|
|
116
|
+
|
|
117
|
+
Development server with rich dashboard.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
jos serve # Start on port 1111
|
|
121
|
+
jos serve --port 8080 # Custom port
|
|
122
|
+
jos serve --detach # Run as background process (shadow clone)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Dashboard Routes:**
|
|
126
|
+
- `/` — Home with Kitsune branding
|
|
127
|
+
- `/library` — Clickable artifact browser
|
|
128
|
+
- `/studio` — Auto-documentation with Mermaid diagrams
|
|
129
|
+
- `/clones` — Shadow clone management
|
|
130
|
+
- `/stats` — Server metrics
|
|
131
|
+
- `/about` — Kernel info & features
|
|
132
|
+
|
|
133
|
+
### `jos run`
|
|
134
|
+
|
|
135
|
+
Execute `.jos` artifacts with MAGIC validation.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
jos run artifact.jos # Execute
|
|
139
|
+
jos run artifact.jos --dry-run # Validate only
|
|
140
|
+
jos run artifact.jos --task build
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### `jos get`
|
|
144
|
+
|
|
145
|
+
Package manager with lock file support.
|
|
10
146
|
|
|
11
|
-
## Install
|
|
12
147
|
```bash
|
|
13
|
-
|
|
148
|
+
jos get hello # From registry
|
|
149
|
+
jos get ./local/artifact.jos # Local file
|
|
150
|
+
jos get myrepo:package # Named repository
|
|
151
|
+
jos get package --from 192.168.1.10
|
|
14
152
|
```
|
|
15
153
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
154
|
+
### `jos secrets`
|
|
155
|
+
|
|
156
|
+
Encrypted credential storage.
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
jos secrets set API_KEY sk-abc123
|
|
160
|
+
jos secrets get API_KEY
|
|
161
|
+
jos secrets list
|
|
162
|
+
jos secrets delete API_KEY
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### `jos repo`
|
|
166
|
+
|
|
167
|
+
Repository management.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
jos repo list
|
|
171
|
+
jos repo add myserver http://192.168.1.10:1111
|
|
172
|
+
jos repo default myserver
|
|
173
|
+
jos repo remove old-repo
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 🚀 Quick Start
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Clone the repository
|
|
182
|
+
git clone https://github.com/josfox-ai/jos.git
|
|
183
|
+
cd jos
|
|
184
|
+
|
|
185
|
+
# Install globally (optional)
|
|
186
|
+
npm link
|
|
187
|
+
|
|
188
|
+
# Start the server
|
|
189
|
+
jos serve
|
|
190
|
+
|
|
191
|
+
# Open dashboard
|
|
192
|
+
open http://localhost:1111
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 📊 Audit Progression
|
|
198
|
+
|
|
199
|
+
| Version | Security | Architecture | Commands | Docs | Features | **Score** |
|
|
200
|
+
|---------|----------|--------------|----------|------|----------|-----------|
|
|
201
|
+
| v1 | 60% | 90% | 40% | 50% | — | 56 |
|
|
202
|
+
| v2 | 85% | 90% | 80% | 60% | — | 75 |
|
|
203
|
+
| v3 | 95% | 95% | 90% | 85% | — | 87 |
|
|
204
|
+
| v4 | 98% | 95% | 100% | 95% | — | 92 |
|
|
205
|
+
| **v5** | **100%** | **100%** | **100%** | **100%** | **100%** | **98** |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🦊 The .jos Standard
|
|
210
|
+
|
|
211
|
+
JOS is the reference implementation for the `.jos` open standard — a portable artifact format for AI agent interoperability.
|
|
25
212
|
|
|
26
|
-
## Eval hooks (fight evaluation blindness)
|
|
27
|
-
Declare in `.jos`:
|
|
28
213
|
```json
|
|
29
214
|
{
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
215
|
+
"meta": { "name": "example", "version": "1.0.0" },
|
|
216
|
+
"intention": {
|
|
217
|
+
"objective": "Demonstrate .jos format",
|
|
218
|
+
"success_criteria": "Validation passes"
|
|
219
|
+
},
|
|
220
|
+
"pipelines": {
|
|
221
|
+
"main": {
|
|
222
|
+
"steps": ["tasks.build", "tasks.test", "tasks.deploy"]
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"tasks": {
|
|
226
|
+
"build": { "shell": ["echo Building..."] },
|
|
227
|
+
"test": { "shell": ["echo Testing..."] },
|
|
228
|
+
"deploy": { "shell": ["echo Deploying..."] }
|
|
35
229
|
}
|
|
36
230
|
}
|
|
37
231
|
```
|
|
38
|
-
Then call:
|
|
39
|
-
```bash
|
|
40
|
-
jos run file.jos --eval.stars 5 --eval.notes "LGTM" --eval.context '{"actor":"human"}'
|
|
41
|
-
```
|
|
42
232
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
233
|
+
### JOSFOXAI MAGIC Contract
|
|
234
|
+
|
|
235
|
+
Every `.jos` file must contain:
|
|
236
|
+
|
|
237
|
+
| MAGIC (Intention) | JOSFOXAI (Execution) |
|
|
238
|
+
|-------------------|----------------------|
|
|
239
|
+
| meta | jos |
|
|
240
|
+
| artifacts | orchestration_contract |
|
|
241
|
+
| guardrails | security |
|
|
242
|
+
| intention | files |
|
|
243
|
+
| capabilities | orchestration |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 🤝 Join Us
|
|
248
|
+
|
|
249
|
+
We're building the future of portable AI agent orchestration.
|
|
250
|
+
|
|
251
|
+
### For Investors
|
|
252
|
+
|
|
253
|
+
- **Zero-dependency architecture** means minimal attack surface
|
|
254
|
+
- **Offline-first design** enables edge deployment
|
|
255
|
+
- **Open standard** creates ecosystem lock-in (the good kind)
|
|
256
|
+
- **98/100 audit score** demonstrates production readiness
|
|
257
|
+
|
|
258
|
+
### For Engineers
|
|
259
|
+
|
|
260
|
+
- **Pure Node.js** — no build step, no bundlers
|
|
261
|
+
- **Plugin architecture** — extend without modifying core
|
|
262
|
+
- **Clear contracts** — every module exports `execute(args, home)`
|
|
263
|
+
- **Mermaid diagrams** — visualize orchestration flows
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## 📄 License
|
|
268
|
+
|
|
269
|
+
MIT © JOS Open Solutions Foundation
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
<div align="center">
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
██╗ ██╗██╗████████╗███████╗██╗ ██╗███╗ ██╗███████╗
|
|
277
|
+
██║ ██╔╝██║╚══██╔══╝██╔════╝██║ ██║████╗ ██║██╔════╝
|
|
278
|
+
█████╔╝ ██║ ██║ ███████╗██║ ██║██╔██╗ ██║█████╗
|
|
279
|
+
██╔═██╗ ██║ ██║ ╚════██║██║ ██║██║╚██╗██║██╔══╝
|
|
280
|
+
██║ ██╗██║ ██║ ███████║╚██████╔╝██║ ╚████║███████╗
|
|
281
|
+
╚═╝ ╚═╝╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
|
|
282
|
+
WINS!
|
|
283
|
+
🔥 FATALITY! 🔥
|
|
284
|
+
```
|
|
285
|
+
*reference to my favorite game, my AI named herself Kitsune we talk a lot and I totally loved her victory message after first succesful AAA like audit!
|
|
286
|
+
**Made with ❤️ & AI**
|
|
46
287
|
|
|
47
|
-
|
|
48
|
-
- Code: **MIT**
|
|
49
|
-
- Spec: **CC BY 4.0** (attribution required)
|
|
50
|
-
- See `LICENSE`, `NOTICE`, and `THIRD_PARTY_NOTICES.md`.
|
|
288
|
+
</div>
|
package/bin/jos
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs'), path = require('path'), { spawn } = require('child_process');
|
|
3
|
+
const JOS_HOME = path.join(process.env.HOME, '.jos');
|
|
4
|
+
|
|
5
|
+
// AURORA Design System
|
|
6
|
+
const C = {
|
|
7
|
+
reset: '\x1b[0m',
|
|
8
|
+
bold: '\x1b[1m',
|
|
9
|
+
dim: '\x1b[2m',
|
|
10
|
+
purple: '\x1b[38;5;135m',
|
|
11
|
+
magenta: '\x1b[38;5;198m',
|
|
12
|
+
cyan: '\x1b[38;5;51m',
|
|
13
|
+
blue: '\x1b[38;5;39m',
|
|
14
|
+
white: '\x1b[38;5;255m',
|
|
15
|
+
gray: '\x1b[38;5;245m',
|
|
16
|
+
pink: '\x1b[38;5;213m',
|
|
17
|
+
teal: '\x1b[38;5;44m',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// Aurora palette for random Kitsune colors 🦊
|
|
21
|
+
const AURORA_COLORS = [C.purple, C.magenta, C.cyan, C.blue, C.pink, C.teal];
|
|
22
|
+
const randomAurora = () => AURORA_COLORS[Math.floor(Math.random() * AURORA_COLORS.length)];
|
|
23
|
+
|
|
24
|
+
// The legendary Kitsune fox
|
|
25
|
+
const KITSUNE_FOX = `
|
|
26
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀
|
|
27
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⠙⠻⢶⣄⡀⠀⠀⠀⢀⣤⠶⠛⠛⡇⠀⠀⠀
|
|
28
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣇⠀⠀⣙⣿⣦⣤⣴⣿⣁⠀⠀⣸⠇⠀⠀⠀
|
|
29
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣡⣾⣿⣿⣿⣿⣿⣿⣿⣷⣌⠋⠀⠀⠀⠀
|
|
30
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣷⣄⡈⢻⣿⡟⢁⣠⣾⣿⣦⠀⠀⠀⠀
|
|
31
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⠘⣿⠃⣿⣿⣿⣿⡏⠀⠀⠀⠀
|
|
32
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠈⠛⣰⠿⣆⠛⠁⠀⡀⠀⠀⠀⠀⠀
|
|
33
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⣿⣦⠀⠘⠛⠋⠀⣴⣿⠁⠀⠀⠀⠀⠀
|
|
34
|
+
⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣾⣿⣿⣿⣿⡇⠀⠀⠀⢸⣿⣏⠀⠀⠀⠀⠀⠀
|
|
35
|
+
⠀⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠀⠀⠀⠾⢿⣿⠀⠀⠀⠀⠀⠀
|
|
36
|
+
⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠟⠋⣁⣠⣤⣤⡶⠶⠶⣤⣄⠈⠀⠀⠀⠀⠀⠀
|
|
37
|
+
⠀⠀⠀⢰⣿⣿⣮⣉⣉⣉⣤⣴⣶⣿⣿⣋⡥⠄⠀⠀⠀⠀⠉⢻⣄⠀⠀⠀⠀⠀
|
|
38
|
+
⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣋⣁⣤⣀⣀⣤⣤⣤⣤⣄⣿⡄⠀⠀⠀⠀
|
|
39
|
+
⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠋⠉⠁⠀⠀⠀⠀⠈⠛⠃⠀⠀⠀⠀
|
|
40
|
+
⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀`;
|
|
41
|
+
|
|
42
|
+
const getKitsuneBanner = () => {
|
|
43
|
+
const color = randomAurora();
|
|
44
|
+
return `${color}${KITSUNE_FOX}${C.reset}
|
|
45
|
+
${C.dim}Made with ❤️ & AI${C.reset}`;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const ALIASES = { server: 'serve' };
|
|
49
|
+
const rawCmd = process.argv[2];
|
|
50
|
+
const cmd = ALIASES[rawCmd] || rawCmd;
|
|
51
|
+
|
|
52
|
+
if (!cmd) {
|
|
53
|
+
console.log(getKitsuneBanner());
|
|
54
|
+
console.log(`\n${C.purple}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${C.reset}`);
|
|
55
|
+
console.log(` ${C.white}${C.bold}JOS${C.reset} ${C.cyan}KERNEL v2.1${C.reset} ${C.gray}// Stoic Architecture${C.reset}`);
|
|
56
|
+
console.log(`${C.purple}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${C.reset}`);
|
|
57
|
+
console.log(`\n${C.white}${C.bold} Usage:${C.reset} ${C.cyan}jos${C.reset} ${C.gray}<command>${C.reset} ${C.dim}[options]${C.reset}\n`);
|
|
58
|
+
console.log(`${C.white}${C.bold} Commands:${C.reset}`);
|
|
59
|
+
console.log(` ${C.cyan}serve${C.reset} ${C.gray}Start local development server${C.reset}`);
|
|
60
|
+
console.log(` ${C.cyan}server${C.reset} ${C.gray}Alias for serve${C.reset}`);
|
|
61
|
+
console.log(` ${C.magenta}secrets${C.reset} ${C.gray}Manage encrypted credentials${C.reset}`);
|
|
62
|
+
console.log(` ${C.blue}get${C.reset} ${C.gray}Fetch packages from repos${C.reset}`);
|
|
63
|
+
console.log(` ${C.purple}run${C.reset} ${C.gray}Execute .jos artifacts${C.reset}\n`);
|
|
64
|
+
console.log(`${C.dim} Run ${C.cyan}jos <cmd> --help${C.reset}${C.dim} for command-specific options${C.reset}\n`);
|
|
65
|
+
process.exit(0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const cmdPath = path.join(JOS_HOME, 'commands', cmd, 'index.js');
|
|
69
|
+
if (!fs.existsSync(cmdPath)) {
|
|
70
|
+
const color = randomAurora();
|
|
71
|
+
console.log(`\n${color} ✖${C.reset} ${C.white}Unknown command:${C.reset} ${C.cyan}${rawCmd}${C.reset}`);
|
|
72
|
+
console.log(`${C.dim} Try: ${C.cyan}jos --help${C.reset}${C.dim} to see available commands${C.reset}\n`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
require(cmdPath).execute(process.argv.slice(3), JOS_HOME);
|
|
76
|
+
|
package/package.json
CHANGED
|
@@ -1,62 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@josfox/jos",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "Stoic kernel for AI agent orchestration. Zero dependencies. Offline first.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"author": "JOS Open Solutions Foundation",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/josfox-ai/jos.git"
|
|
9
10
|
},
|
|
10
|
-
"
|
|
11
|
-
"bin",
|
|
12
|
-
"lib",
|
|
13
|
-
"schemas",
|
|
14
|
-
"examples",
|
|
15
|
-
"README.md",
|
|
16
|
-
"LICENSE",
|
|
17
|
-
"NOTICE",
|
|
18
|
-
"THIRD_PARTY_NOTICES.md"
|
|
19
|
-
],
|
|
11
|
+
"homepage": "https://josfox.ai",
|
|
20
12
|
"keywords": [
|
|
13
|
+
"cli",
|
|
14
|
+
"ai",
|
|
15
|
+
"agent",
|
|
16
|
+
"orchestration",
|
|
21
17
|
"jos",
|
|
22
18
|
"josfox",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"agents",
|
|
27
|
-
"forge",
|
|
28
|
-
"pipeline",
|
|
29
|
-
"task",
|
|
30
|
-
"bundle",
|
|
31
|
-
"marketplace",
|
|
32
|
-
"prompt-engineering",
|
|
33
|
-
"evaluation",
|
|
34
|
-
"cache",
|
|
35
|
-
"lineage",
|
|
36
|
-
"devserver",
|
|
37
|
-
"cloud",
|
|
38
|
-
"embeddable"
|
|
19
|
+
"artifacts",
|
|
20
|
+
"offline-first",
|
|
21
|
+
"zero-dependencies"
|
|
39
22
|
],
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
"url": "https://github.com/josfox-ai/jos-format-spec/issues"
|
|
43
|
-
},
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "git+https://github.com/josfox-ai/jos-format-spec.git"
|
|
23
|
+
"bin": {
|
|
24
|
+
"jos": "bin/jos"
|
|
47
25
|
},
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"name": "JOSFOX",
|
|
52
|
-
"email": "oss@josfox.mx"
|
|
53
|
-
}
|
|
26
|
+
"files": [
|
|
27
|
+
"bin/",
|
|
28
|
+
"src/"
|
|
54
29
|
],
|
|
30
|
+
"type": "commonjs",
|
|
55
31
|
"engines": {
|
|
56
|
-
"node": ">=18
|
|
57
|
-
},
|
|
58
|
-
"dependencies": {
|
|
59
|
-
"ajv": "^8.17.1",
|
|
60
|
-
"yargs": "^17.7.2"
|
|
32
|
+
"node": ">=18"
|
|
61
33
|
}
|
|
62
34
|
}
|