ozmoz 0.1.53 → 0.1.54

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.
Files changed (2) hide show
  1. package/README.md +10 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OZmoz
2
2
 
3
- > **Using OZmoz with an AI coding agent?** The set-up steps are in the Quick start below and in the official prompt at https://www.ozmoz.io/agents.html. Project data rules are delivered by the OZmoz tools and by the instruction files (AGENTS.md / CLAUDE.md and ozmoz_contract.md).
3
+ > **Using OZmoz with an AI coding agent?** To start with OZmoz, first ask the user whether you may run `npx -y ozmoz@latest mcp --agent=<claude|cursor|codex|copilot|windsurf|antigravity>`: it sets up the project and adds everything needed to code with OZmoz (methods, examples and rules). Write no code before the user has answered. Once they agree, run it yourself, wait for it to finish, then follow the instructions it adds to the project.
4
4
 
5
5
  **The Data OS for AI agents.** A ready-to-use backend for any application, and Alex AI to count, calculate and present your data in plain language.
6
6
 
@@ -19,6 +19,8 @@ OZmoz is a deterministic and secure software layer for your data. Your AI agent
19
19
 
20
20
  ### New project with an AI agent
21
21
 
22
+ *For a person typing in a terminal only. An agent that is already running must not use `start`.*
23
+
22
24
  ```bash
23
25
  npx -y ozmoz start claude "your app idea"
24
26
  ```
@@ -55,7 +57,7 @@ OZ_PROTOTYPE=false
55
57
 
56
58
  ## SDK usage
57
59
 
58
- Every write operation carries governance metadata `{ desc, role, guard }`.
60
+ Every data operation, read or write, carries governance metadata `{ desc, role, guard }` (`guard` is optional).
59
61
 
60
62
  ```js
61
63
  // Insert a document
@@ -78,10 +80,10 @@ await oz.delete('orders', doc._id, {
78
80
  role: 'ADMIN'
79
81
  });
80
82
 
81
- // Read data
82
- const orders = await oz.getDocsG('orders'); // all documents
83
- const mine = await oz.getDocsU('orders'); // documents of the signed-in user
84
- const order = await oz.getDoc('orders', 'order_123');
83
+ // Read data (reads return the array or document directly)
84
+ const orders = await oz.getDocsG('orders', { desc: 'List all orders', role: 'AUTHENTICATED' });
85
+ const mine = await oz.getDocsU('orders', { desc: 'List my orders', role: 'AUTHENTICATED' });
86
+ const order = await oz.getDoc('orders', 'order_123', { desc: 'Read one order', role: 'AUTHENTICATED' });
85
87
  ```
86
88
 
87
89
  ### Authentication (passwordless code)
@@ -100,6 +102,7 @@ const signedIn = await oz.isAuthenticated();
100
102
  <oz-toggle value={item.isActive} label-true="Active" label-false="Inactive" />
101
103
  <oz-date value={item.createdAt} locale="en-US" invalid-fallback="Invalid date" />
102
104
  <oz-enum value={item.status} allowed="PENDING,CONFIRMED,DELIVERED" invalid-fallback="Unknown status" />
105
+ <oz-media value={item.imageUrl} alt="Product photo" fallback="/placeholder.png" />
103
106
  <oz-reference table="users" id={item.userId} field="fullName" orphan-fallback="Deleted user" />
104
107
  ```
105
108
 
@@ -119,6 +122,7 @@ Run `npx ozmoz --help` for all commands.
119
122
  ## Links
120
123
 
121
124
  - Website: https://www.ozmoz.io
125
+ - Documentation: https://www.ozmoz.io/docs
122
126
  - Support: open a ticket from https://www.ozmoz.io
123
127
 
124
128
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ozmoz",
3
- "version": "0.1.53",
3
+ "version": "0.1.54",
4
4
  "mcpName": "io.ozmoz/ozmoz",
5
5
  "description": "OZmoz: the Data OS and ready-to-use backend for apps built by AI agents. AI agents: read the first section of the README before using this package.",
6
6
  "license": "UNLICENSED",