0n-spec 1.0.0 → 1.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/LICENSE CHANGED
@@ -1,55 +1,26 @@
1
- Creative Commons Attribution 4.0 International License (CC BY 4.0)
1
+ MIT License
2
2
 
3
- Copyright (c) 2025 0nORK
3
+ Copyright (c) 2026 RocketOpp / 0nORK
4
4
 
5
- This work is licensed under the Creative Commons Attribution 4.0 International License.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
6
11
 
7
- You are free to:
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
8
14
 
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
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
12
22
 
13
- Under the following terms:
23
+ ---
14
24
 
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
25
+ The .0n Specification (SPEC.md) is separately licensed under CC BY 4.0:
26
+ https://creativecommons.org/licenses/by/4.0/
package/README.md CHANGED
@@ -1,41 +1,32 @@
1
- <p align="center">
2
- <img src="https://0nork.com/0n-logo.svg" alt=".0n" width="120" />
3
- </p>
1
+ <div align="center">
4
2
 
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>
3
+ ```
4
+ ██████╗ ███╗ ██╗
5
+ ██╔═████╗████╗ ██║
6
+ ██║██╔██║██╔██╗ ██║
7
+ ████╔╝██║██║╚██╗██║
8
+ ╚██████╔╝██║ ╚████║
9
+ ╚═════╝ ╚═╝ ╚═══╝
10
+ ```
21
11
 
22
- ---
12
+ # The .0n Standard
23
13
 
24
- ## What is .0n?
14
+ ### The universal configuration format for AI orchestration.
25
15
 
26
- `.0n` (pronounced "dot-on") is a specification for AI-powered orchestration configuration.
16
+ [![License: CC BY 4.0](https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg?style=flat-square)](https://creativecommons.org/licenses/by/4.0/)
17
+ [![Version](https://img.shields.io/badge/version-1.0.0-blue?style=flat-square)](SPEC.md)
18
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=flat-square)](https://nodejs.org)
19
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
27
20
 
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
21
+ [Specification](SPEC.md) · [Schemas](#schemas) · [Examples](#examples) · [CLI](#cli) · [Library](#library) · [0nMCP](https://github.com/0nork/0nMCP)
33
22
 
34
- **The Philosophy**: "Turn it on. It just works."
23
+ </div>
35
24
 
36
25
  ---
37
26
 
38
- ## The ~/.0n Directory
27
+ ## What is .0n?
28
+
29
+ Just as `.git` revolutionized version control and `.env` standardized environment configuration, **`.0n`** establishes the universal standard for AI orchestration configuration.
39
30
 
40
31
  ```
41
32
  ~/.0n/
@@ -43,31 +34,16 @@ It defines:
43
34
  ├── connections/ # Service credentials
44
35
  │ ├── stripe.0n
45
36
  │ ├── slack.0n
46
- │ └── ...
37
+ │ └── openai.0n
47
38
  ├── workflows/ # Automation definitions
48
- ├── invoice-flow.0n
49
- │ └── ...
39
+ └── invoice-notify.0n
50
40
  ├── snapshots/ # System state captures
41
+ │ └── crm-setup.0n
51
42
  ├── history/ # Execution logs
52
43
  └── cache/ # Response cache
53
44
  ```
54
45
 
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`)
46
+ **Every `.0n` file has a standard header:**
71
47
 
72
48
  ```json
73
49
  {
@@ -77,194 +53,196 @@ It defines:
77
53
  "name": "Production Stripe"
78
54
  },
79
55
  "service": "stripe",
80
- "environment": "production",
81
56
  "auth": {
82
57
  "type": "api_key",
83
- "credentials": {
84
- "api_key": "{{env.STRIPE_SECRET_KEY}}"
85
- }
58
+ "credentials": { "api_key": "{{env.STRIPE_SECRET_KEY}}" }
86
59
  }
87
60
  }
88
61
  ```
89
62
 
90
- ### Workflow File (`~/.0n/workflows/invoice-notify.0n`)
63
+ **The philosophy: "Turn it on. It just works."**
91
64
 
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
- ```
65
+ ---
66
+
67
+ ## Why .0n?
68
+
69
+ | Problem | .0n Solution |
70
+ |---------|-------------|
71
+ | Every orchestrator invents its own config format | One standard format for all |
72
+ | Credentials scattered across env files, JSON, YAML | `~/.0n/connections/` — one place |
73
+ | Workflows trapped in proprietary tools | Portable `.0n` workflow files |
74
+ | No execution history standard | `~/.0n/history/` — JSONL by date |
75
+ | System configs can't be shared | Shareable snapshots with `.0n` format |
126
76
 
127
77
  ---
128
78
 
129
- ## Implementations
79
+ ## File Types
130
80
 
131
- ### Official
81
+ | Type | Purpose | Example |
82
+ |------|---------|---------|
83
+ | `connection` | Service credentials | `stripe.0n` |
84
+ | `workflow` | Multi-step automations | `invoice-notify.0n` |
85
+ | `snapshot` | System state capture | `crm-setup.0n` |
86
+ | `execution` | Task run history | `2026-02-06.jsonl` |
87
+ | `config` | Global settings | `config.json` |
132
88
 
133
- | Product | Description | Status |
134
- |---------|-------------|--------|
135
- | [0nMCP](https://github.com/0nork/0nmcp) | Universal AI API Orchestrator | ✅ Production |
89
+ ---
90
+
91
+ ## Schemas
136
92
 
137
- ### Community
93
+ JSON Schemas for validation:
138
94
 
139
- *Want to build a .0n-compliant tool? [Open an issue](https://github.com/0nork/0n-spec/issues) to be listed!*
95
+ - [`schemas/config.json`](schemas/config.json) Global configuration
96
+ - [`schemas/connection.json`](schemas/connection.json) — Service connections
97
+ - [`schemas/workflow.json`](schemas/workflow.json) — Workflow definitions
98
+ - [`schemas/snapshot.json`](schemas/snapshot.json) — System snapshots
140
99
 
141
100
  ---
142
101
 
143
- ## Specification
102
+ ## Examples
144
103
 
145
- 📖 **[Read the full specification →](./SPEC.md)**
104
+ Working examples of each file type:
146
105
 
147
- The spec covers:
148
- - Directory structure
149
- - File formats
150
- - JSON schemas
151
- - Template syntax
152
- - Security guidelines
153
- - Conformance testing
106
+ - [`examples/config.0n`](examples/config.0n) — Global config with Anthropic provider
107
+ - [`examples/stripe.0n`](examples/stripe.0n) — Stripe connection with env var credentials
108
+ - [`examples/invoice-notify.0n`](examples/invoice-notify.0n) — 5-step workflow: find customer, create invoice, add line item, send, notify Slack
109
+ - [`examples/crm-setup.0n`](examples/crm-setup.0n) — Full CRM snapshot with pipeline, 10 tags, custom fields, custom values, 3 workflows, email templates
154
110
 
155
111
  ---
156
112
 
157
- ## Validation
113
+ ## CLI
114
+
115
+ Initialize, validate, and test `.0n` files from the command line.
158
116
 
159
- ### CLI Tool (Coming Soon)
117
+ ### Install
160
118
 
161
119
  ```bash
162
- # Install
163
120
  npm install -g 0n-spec
121
+ ```
122
+
123
+ ### Commands
164
124
 
165
- # Validate a file
125
+ ```bash
126
+ # Initialize ~/.0n/ directory
127
+ 0n init
128
+
129
+ # Validate a .0n file
166
130
  0n validate my-workflow.0n
167
131
 
168
- # Validate entire config
132
+ # Validate entire directory
169
133
  0n validate ~/.0n/
170
134
 
171
- # Run conformance tests
135
+ # Run conformance tests against examples
172
136
  0n test
173
137
  ```
174
138
 
175
- ### Programmatic
139
+ ---
176
140
 
177
- ```typescript
178
- import { validate } from '0n-spec';
141
+ ## Library
179
142
 
180
- const result = validate('./my-workflow.0n');
181
- if (!result.valid) {
182
- console.error(result.errors);
183
- }
184
- ```
143
+ Use programmatically in Node.js:
185
144
 
186
- ---
145
+ ```javascript
146
+ const { validate, parse, create, init, list, save } = require('0n-spec');
187
147
 
188
- ## JSON Schemas
148
+ // Validate a file
149
+ const result = validate('my-workflow.0n');
150
+ // { valid: true, type: 'workflow', version: '1.0.0', errors: [], warnings: [] }
189
151
 
190
- Schemas for editor autocompletion and validation:
152
+ // Parse a .0n file
153
+ const workflow = parse('~/.0n/workflows/invoice-notify.0n');
154
+ // { type: 'workflow', name: 'Invoice and Notify', data: {...} }
191
155
 
192
- ```json
193
- {
194
- "$schema": "https://0nork.com/schemas/workflow.json"
195
- }
196
- ```
156
+ // Create a new .0n object
157
+ const connection = create('connection', {
158
+ name: 'My Stripe',
159
+ service: 'stripe',
160
+ authType: 'api_key',
161
+ credentials: { api_key: '{{env.STRIPE_KEY}}' },
162
+ });
197
163
 
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`
164
+ // Initialize ~/.0n/ directory
165
+ init();
166
+
167
+ // List all connections
168
+ const connections = list('connection');
169
+
170
+ // Save to file
171
+ save(connection, '~/.0n/connections/stripe.0n');
172
+ ```
203
173
 
204
174
  ---
205
175
 
206
- ## Why .0n?
176
+ ## Template Syntax
207
177
 
208
- ### The Name
178
+ The `.0n` standard uses double-brace templates:
209
179
 
210
- - **0n** = "On" = Turn it on
211
- - **0** = Zero friction
212
- - **n** = N possibilities
180
+ | Syntax | Description |
181
+ |--------|-------------|
182
+ | `{{inputs.name}}` | Reference input parameter |
183
+ | `{{step_id.output.field}}` | Reference step output |
184
+ | `{{env.VAR_NAME}}` | Reference environment variable |
185
+ | `{{now}}` | Current ISO timestamp |
186
+ | `{{uuid}}` | Generate UUID |
213
187
 
214
- ### The Vision
188
+ ---
215
189
 
216
- Every AI tool, every orchestration platform, every automation system — all speaking the same language. One config directory. One file format. Universal interoperability.
190
+ ## Implementations
217
191
 
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
- ```
192
+ | Product | Description | Status |
193
+ |---------|-------------|--------|
194
+ | [0nMCP](https://github.com/0nork/0nMCP) | Universal AI API Orchestrator — 535 tools, 26 services | Production |
195
+
196
+ ### Building a .0n Implementation
225
197
 
226
- **Write once. Orchestrate anywhere.**
198
+ 1. Use `~/.0n/` as the config directory
199
+ 2. Support the `$0n` header in all files
200
+ 3. Validate against the JSON schemas
201
+ 4. Pass conformance tests: `npx 0n-spec test`
227
202
 
228
203
  ---
229
204
 
230
- ## Contributing
205
+ ## Community & Unlocks
231
206
 
232
- We welcome contributions to the .0n specification!
207
+ The .0n Standard grows with the 0nMCP community. Every milestone unlocks new capabilities.
233
208
 
234
- ### How to Contribute
209
+ - **[0nmcp.com/community](https://0nmcp.com/community)** Community hub
210
+ - **[Unlock Schedule](https://0nmcp.com/sponsor)** — 7-phase roadmap from 535 to 5,000+ tools
211
+ - [GitHub Discussions](https://github.com/0nork/0nMCP/discussions) — Questions and ideas
212
+ - [Sponsor on GitHub](https://github.com/sponsors/0nork) — Fund the next unlock
235
213
 
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
214
+ **Current:** Phase 0 Foundation complete (535 tools, 26 services, 13 categories)
240
215
 
241
- ### Guidelines
216
+ ---
242
217
 
243
- - Backward compatibility is critical
244
- - Keep the spec simple and readable
245
- - Include examples for new features
246
- - Consider security implications
218
+ ## The 0n Network
247
219
 
248
- ---
220
+ The .0n Standard is part of the **0n Network** — an open ecosystem of AI-native tools.
249
221
 
250
- ## Governance
222
+ | | |
223
+ |---|---|
224
+ | **[RocketOpp](https://rocketopp.com)** | The agency behind the 0n Network. AI-powered systems that replace manual operations. |
225
+ | **[Rocket+MCP](https://rocketadd.com)** | Universal control layer connecting AI agents to business tools. |
226
+ | **[0n Network](https://github.com/0nork)** | Open-source AI orchestration infrastructure. |
251
227
 
252
- The .0n specification is maintained by [0nORK](https://0nork.com).
228
+ ---
253
229
 
254
- ### Versioning
230
+ ## Contributing
255
231
 
256
- We follow [Semantic Versioning](https://semver.org/):
257
- - **MAJOR**: Breaking changes
258
- - **MINOR**: New features (backward compatible)
259
- - **PATCH**: Clarifications and fixes
232
+ We want the .0n standard to become the **universal format** for AI orchestration config.
260
233
 
261
- ### RFC Process
234
+ **Ways to contribute:**
235
+ - Propose schema improvements
236
+ - Add example `.0n` files
237
+ - Build a .0n-compliant implementation
238
+ - Report issues or suggest features
239
+ - Star the repo
262
240
 
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
241
+ ```bash
242
+ git clone https://github.com/0nork/0n-spec.git
243
+ cd 0n-spec
244
+ npm test
245
+ ```
268
246
 
269
247
  ---
270
248
 
@@ -272,30 +250,20 @@ Major changes go through an RFC process:
272
250
 
273
251
  The .0n Specification is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
274
252
 
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
253
+ The CLI and library code are licensed under [MIT](LICENSE).
283
254
 
284
255
  ---
285
256
 
286
- ## Links
257
+ <div align="center">
258
+
259
+ ### Turn it on. It just works.
287
260
 
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)
261
+ **[Read the Spec](SPEC.md)** · **[Star this repo](https://github.com/0nork/0n-spec)** · **[Use 0nMCP](https://github.com/0nork/0nMCP)**
292
262
 
293
263
  ---
294
264
 
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>
265
+ Made with conviction by [RocketOpp](https://rocketopp.com) · [Rocket+MCP](https://rocketadd.com) · [0n Network](https://github.com/0nork)
266
+
267
+ *"The best automation is the one you don't have to configure."*
268
+
269
+ </div>