0n-spec 1.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/LICENSE +55 -0
- package/README.md +301 -0
- package/SPEC.md +693 -0
- package/cli.js +335 -0
- package/examples/config.0n +23 -0
- package/examples/crm-setup.0n +184 -0
- package/examples/invoice-notify.0n +108 -0
- package/examples/stripe.0n +24 -0
- package/index.js +279 -0
- package/package.json +55 -0
- package/schemas/config.json +88 -0
- package/schemas/connection.json +98 -0
- package/schemas/snapshot.json +147 -0
- package/schemas/workflow.json +157 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
Creative Commons Attribution 4.0 International License (CC BY 4.0)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 0nORK
|
|
4
|
+
|
|
5
|
+
This work is licensed under the Creative Commons Attribution 4.0 International License.
|
|
6
|
+
|
|
7
|
+
You are free to:
|
|
8
|
+
|
|
9
|
+
Share — copy and redistribute the material in any medium or format
|
|
10
|
+
Adapt — remix, transform, and build upon the material for any purpose,
|
|
11
|
+
even commercially
|
|
12
|
+
|
|
13
|
+
Under the following terms:
|
|
14
|
+
|
|
15
|
+
Attribution — You must give appropriate credit, provide a link to the
|
|
16
|
+
license, and indicate if changes were made. You may do so
|
|
17
|
+
in any reasonable manner, but not in any way that suggests
|
|
18
|
+
the licensor endorses you or your use.
|
|
19
|
+
|
|
20
|
+
No additional restrictions — You may not apply legal terms or technological
|
|
21
|
+
measures that legally restrict others from doing
|
|
22
|
+
anything the license permits.
|
|
23
|
+
|
|
24
|
+
Notices:
|
|
25
|
+
|
|
26
|
+
You do not have to comply with the license for elements of the material in
|
|
27
|
+
the public domain or where your use is permitted by an applicable exception
|
|
28
|
+
or limitation.
|
|
29
|
+
|
|
30
|
+
No warranties are given. The license may not give you all of the permissions
|
|
31
|
+
necessary for your intended use. For example, other rights such as publicity,
|
|
32
|
+
privacy, or moral rights may limit how you use the material.
|
|
33
|
+
|
|
34
|
+
───────────────────────────────────────────────────────────────────────────────
|
|
35
|
+
|
|
36
|
+
Full license text: https://creativecommons.org/licenses/by/4.0/legalcode
|
|
37
|
+
|
|
38
|
+
───────────────────────────────────────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
TRADEMARK NOTICE
|
|
41
|
+
|
|
42
|
+
"0nORK", "0nMCP", ".0n", and "The .0n Standard" are trademarks of 0nORK.
|
|
43
|
+
|
|
44
|
+
While this specification is freely usable under CC BY 4.0, the trademarks are
|
|
45
|
+
protected. This means:
|
|
46
|
+
|
|
47
|
+
✓ You CAN create implementations of the .0n standard
|
|
48
|
+
✓ You CAN describe your software as ".0n compliant" or ".0n compatible"
|
|
49
|
+
✓ You CAN reference the specification
|
|
50
|
+
|
|
51
|
+
✗ You CANNOT claim your implementation is "The .0n Standard"
|
|
52
|
+
✗ You CANNOT use "0nORK" or "0nMCP" as product names
|
|
53
|
+
✗ You CANNOT imply official endorsement without permission
|
|
54
|
+
|
|
55
|
+
For trademark licensing: legal@0nork.com
|
package/README.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://0nork.com/0n-logo.svg" alt=".0n" width="120" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">The .0n Standard</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>The universal configuration format for AI orchestration.</strong>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<em>Like <code>.git</code> for version control. Like <code>.env</code> for config.<br/>
|
|
13
|
+
<code>.0n</code> is for AI orchestration.</em>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://github.com/0nork/0n-spec/blob/main/SPEC.md"><img src="https://img.shields.io/badge/spec-v1.0.0-blue.svg?style=flat-square" alt="spec version"></a>
|
|
18
|
+
<a href="https://creativecommons.org/licenses/by/4.0/"><img src="https://img.shields.io/badge/license-CC%20BY%204.0-green.svg?style=flat-square" alt="license"></a>
|
|
19
|
+
<a href="https://discord.gg/0nmcp"><img src="https://img.shields.io/discord/0000000000?style=flat-square&logo=discord&logoColor=white&label=discord&color=5865F2" alt="discord"></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## What is .0n?
|
|
25
|
+
|
|
26
|
+
`.0n` (pronounced "dot-on") is a specification for AI-powered orchestration configuration.
|
|
27
|
+
|
|
28
|
+
It defines:
|
|
29
|
+
- **`~/.0n/`** — The universal config directory
|
|
30
|
+
- **`.0n` files** — Connection, workflow, and snapshot definitions
|
|
31
|
+
- **Templates** — Variable interpolation syntax
|
|
32
|
+
- **Schemas** — JSON schemas for validation
|
|
33
|
+
|
|
34
|
+
**The Philosophy**: "Turn it on. It just works."
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## The ~/.0n Directory
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
~/.0n/
|
|
42
|
+
├── config.json # Global settings
|
|
43
|
+
├── connections/ # Service credentials
|
|
44
|
+
│ ├── stripe.0n
|
|
45
|
+
│ ├── slack.0n
|
|
46
|
+
│ └── ...
|
|
47
|
+
├── workflows/ # Automation definitions
|
|
48
|
+
│ ├── invoice-flow.0n
|
|
49
|
+
│ └── ...
|
|
50
|
+
├── snapshots/ # System state captures
|
|
51
|
+
├── history/ # Execution logs
|
|
52
|
+
└── cache/ # Response cache
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## File Types
|
|
58
|
+
|
|
59
|
+
| Type | Purpose | Example |
|
|
60
|
+
|------|---------|---------|
|
|
61
|
+
| **Connection** | Service credentials | `stripe.0n` |
|
|
62
|
+
| **Workflow** | Multi-step automation | `invoice-notify.0n` |
|
|
63
|
+
| **Snapshot** | System state backup | `crm-setup.0n` |
|
|
64
|
+
| **Execution** | Task run history | (auto-generated) |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Quick Example
|
|
69
|
+
|
|
70
|
+
### Connection File (`~/.0n/connections/stripe.0n`)
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"$0n": {
|
|
75
|
+
"type": "connection",
|
|
76
|
+
"version": "1.0.0",
|
|
77
|
+
"name": "Production Stripe"
|
|
78
|
+
},
|
|
79
|
+
"service": "stripe",
|
|
80
|
+
"environment": "production",
|
|
81
|
+
"auth": {
|
|
82
|
+
"type": "api_key",
|
|
83
|
+
"credentials": {
|
|
84
|
+
"api_key": "{{env.STRIPE_SECRET_KEY}}"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Workflow File (`~/.0n/workflows/invoice-notify.0n`)
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"$0n": {
|
|
95
|
+
"type": "workflow",
|
|
96
|
+
"version": "1.0.0",
|
|
97
|
+
"name": "Invoice and Notify"
|
|
98
|
+
},
|
|
99
|
+
"trigger": { "type": "manual" },
|
|
100
|
+
"inputs": {
|
|
101
|
+
"email": { "type": "string", "required": true },
|
|
102
|
+
"amount": { "type": "number", "required": true }
|
|
103
|
+
},
|
|
104
|
+
"steps": [
|
|
105
|
+
{
|
|
106
|
+
"id": "create_invoice",
|
|
107
|
+
"service": "stripe",
|
|
108
|
+
"action": "invoices.create",
|
|
109
|
+
"params": {
|
|
110
|
+
"customer_email": "{{inputs.email}}",
|
|
111
|
+
"amount": "{{inputs.amount * 100}}"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "notify",
|
|
116
|
+
"service": "slack",
|
|
117
|
+
"action": "chat.postMessage",
|
|
118
|
+
"params": {
|
|
119
|
+
"channel": "#sales",
|
|
120
|
+
"text": "Invoice created for ${{inputs.amount}}"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Implementations
|
|
130
|
+
|
|
131
|
+
### Official
|
|
132
|
+
|
|
133
|
+
| Product | Description | Status |
|
|
134
|
+
|---------|-------------|--------|
|
|
135
|
+
| [0nMCP](https://github.com/0nork/0nmcp) | Universal AI API Orchestrator | ✅ Production |
|
|
136
|
+
|
|
137
|
+
### Community
|
|
138
|
+
|
|
139
|
+
*Want to build a .0n-compliant tool? [Open an issue](https://github.com/0nork/0n-spec/issues) to be listed!*
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Specification
|
|
144
|
+
|
|
145
|
+
📖 **[Read the full specification →](./SPEC.md)**
|
|
146
|
+
|
|
147
|
+
The spec covers:
|
|
148
|
+
- Directory structure
|
|
149
|
+
- File formats
|
|
150
|
+
- JSON schemas
|
|
151
|
+
- Template syntax
|
|
152
|
+
- Security guidelines
|
|
153
|
+
- Conformance testing
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Validation
|
|
158
|
+
|
|
159
|
+
### CLI Tool (Coming Soon)
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Install
|
|
163
|
+
npm install -g 0n-spec
|
|
164
|
+
|
|
165
|
+
# Validate a file
|
|
166
|
+
0n validate my-workflow.0n
|
|
167
|
+
|
|
168
|
+
# Validate entire config
|
|
169
|
+
0n validate ~/.0n/
|
|
170
|
+
|
|
171
|
+
# Run conformance tests
|
|
172
|
+
0n test
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Programmatic
|
|
176
|
+
|
|
177
|
+
```typescript
|
|
178
|
+
import { validate } from '0n-spec';
|
|
179
|
+
|
|
180
|
+
const result = validate('./my-workflow.0n');
|
|
181
|
+
if (!result.valid) {
|
|
182
|
+
console.error(result.errors);
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## JSON Schemas
|
|
189
|
+
|
|
190
|
+
Schemas for editor autocompletion and validation:
|
|
191
|
+
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"$schema": "https://0nork.com/schemas/workflow.json"
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Available schemas:
|
|
199
|
+
- `https://0nork.com/schemas/connection.json`
|
|
200
|
+
- `https://0nork.com/schemas/workflow.json`
|
|
201
|
+
- `https://0nork.com/schemas/snapshot.json`
|
|
202
|
+
- `https://0nork.com/schemas/config.json`
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Why .0n?
|
|
207
|
+
|
|
208
|
+
### The Name
|
|
209
|
+
|
|
210
|
+
- **0n** = "On" = Turn it on
|
|
211
|
+
- **0** = Zero friction
|
|
212
|
+
- **n** = N possibilities
|
|
213
|
+
|
|
214
|
+
### The Vision
|
|
215
|
+
|
|
216
|
+
Every AI tool, every orchestration platform, every automation system — all speaking the same language. One config directory. One file format. Universal interoperability.
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
~/.0n/ ← Your orchestration home
|
|
220
|
+
├── stripe.0n ← Works with 0nMCP
|
|
221
|
+
├── stripe.0n ← Works with Tool X
|
|
222
|
+
├── stripe.0n ← Works with Tool Y
|
|
223
|
+
└── stripe.0n ← Works with everything
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Write once. Orchestrate anywhere.**
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Contributing
|
|
231
|
+
|
|
232
|
+
We welcome contributions to the .0n specification!
|
|
233
|
+
|
|
234
|
+
### How to Contribute
|
|
235
|
+
|
|
236
|
+
1. **Propose changes** — Open an issue with your proposal
|
|
237
|
+
2. **Discuss** — Community feedback on the proposal
|
|
238
|
+
3. **PR** — Submit changes to SPEC.md
|
|
239
|
+
4. **Review** — Maintainer review and merge
|
|
240
|
+
|
|
241
|
+
### Guidelines
|
|
242
|
+
|
|
243
|
+
- Backward compatibility is critical
|
|
244
|
+
- Keep the spec simple and readable
|
|
245
|
+
- Include examples for new features
|
|
246
|
+
- Consider security implications
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Governance
|
|
251
|
+
|
|
252
|
+
The .0n specification is maintained by [0nORK](https://0nork.com).
|
|
253
|
+
|
|
254
|
+
### Versioning
|
|
255
|
+
|
|
256
|
+
We follow [Semantic Versioning](https://semver.org/):
|
|
257
|
+
- **MAJOR**: Breaking changes
|
|
258
|
+
- **MINOR**: New features (backward compatible)
|
|
259
|
+
- **PATCH**: Clarifications and fixes
|
|
260
|
+
|
|
261
|
+
### RFC Process
|
|
262
|
+
|
|
263
|
+
Major changes go through an RFC process:
|
|
264
|
+
1. Create RFC document
|
|
265
|
+
2. 2-week comment period
|
|
266
|
+
3. Maintainer decision
|
|
267
|
+
4. Implementation
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## License
|
|
272
|
+
|
|
273
|
+
The .0n Specification is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
|
274
|
+
|
|
275
|
+
**You are free to:**
|
|
276
|
+
- ✅ Use the spec in your products
|
|
277
|
+
- ✅ Create implementations
|
|
278
|
+
- ✅ Modify and extend (with attribution)
|
|
279
|
+
- ✅ Commercial use
|
|
280
|
+
|
|
281
|
+
**You must:**
|
|
282
|
+
- Credit 0nORK as the spec creator
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Links
|
|
287
|
+
|
|
288
|
+
- **Website**: [0nork.com](https://0nork.com)
|
|
289
|
+
- **0nMCP**: [github.com/0nork/0nmcp](https://github.com/0nork/0nmcp)
|
|
290
|
+
- **Discord**: [discord.gg/0nmcp](https://discord.gg/0nmcp)
|
|
291
|
+
- **Twitter**: [@0nmcp](https://twitter.com/0nmcp)
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
<p align="center">
|
|
296
|
+
<strong>The .0n Standard</strong>
|
|
297
|
+
<br>
|
|
298
|
+
<em>Turn it on. It just works.</em>
|
|
299
|
+
<br><br>
|
|
300
|
+
<a href="https://0nork.com">0nORK — AI Orchestration Infrastructure</a>
|
|
301
|
+
</p>
|