@syncmatters/script-api 1.0.11 → 1.0.12

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.
@@ -24,9 +24,9 @@ AGENTS.md # CLI-generated agent guide (managed block + your notes belo
24
24
  | `groups/**/group.config.json` | **No** | **No** |
25
25
  | `types/**`, `.sm/`, `package.json`, `jsconfig.json` | **No** | **No** |
26
26
 
27
- Sync and sync-group **configuration** (mappings, schedules, which module is attached) is changed
28
- in the **web UI** today. The CLI exports snapshots for **read-only context** so agents know what
29
- is deployed; a future `sm sync …` push workflow is not available yet.
27
+ Sync and sync-group **configuration** is authored in `changes/*.sync-changes.json` and published
28
+ with `sm sync push` after a human reviews `sm sync draft`. Snapshots under `syncs/` and `groups/`
29
+ are **read-only context** — never hand-edit or `sm push` them. Schedules still start in the web UI.
30
30
 
31
31
  Generated sync/group files include a marker:
32
32
 
@@ -31,8 +31,8 @@ Each file starts with:
31
31
  - Do **not** hand-edit snapshots to change mappings, schedules, or wiring.
32
32
  - Do **not** `sm push` snapshot paths — there is no push route for them today.
33
33
  - Do **not** treat snapshots as the source of truth for writes. Author mapping changes in
34
- `changes/*.sync-changes.json`, preview with `sm sync draft <file>`, then stop — there is no
35
- `sm sync push` yet. The web UI still owns applying configuration.
34
+ `changes/*.sync-changes.json`, preview with `sm sync draft <file>`, then `sm sync push <file>`
35
+ only when the human has instructed it. Snapshots stay generated.
36
36
 
37
37
  ## Preview drafts (`sm sync draft`)
38
38
 
@@ -13,7 +13,8 @@ sm pull sync # optional: refresh sync/group snapshots only
13
13
 
14
14
  - **Scripts only:** `sm push` uploads changed files under `files/` (and meta sidecars). It does
15
15
  **not** upload `syncs/` or `groups/`.
16
- - **Sync config changes:** web UI (future CLI sync push out of scope).
16
+ - **Sync config changes:** `changes/*.sync-changes.json` → `sm sync draft` → human review →
17
+ `sm sync push` (needs `syncs:write`). Agents push only on human instruction.
17
18
  - **Reading snapshots:** use `syncs/` and `groups/` for context before editing the wired module
18
19
  in `files/`.
19
20
 
@@ -31,6 +32,7 @@ Prefer tokens **without execute scopes** for day-to-day edit/push work:
31
32
  | `scripts:read` | pull, diff incoming |
32
33
  | `scripts:write` | push script files |
33
34
  | `syncs:read` | `sm pull sync`, sync snapshots, `sm sync draft` |
35
+ | `syncs:write` | `sm sync push` / `applysyncops` (human-approved publish) |
34
36
  | `connections:read` | `sm types`, connection resolution |
35
37
  | `scripts:execute` | **Only when running** `sm test` / connector features |
36
38
  | `syncs:execute` | Reserved; not needed for authoring |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/script-api",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "TypeScript type definitions for the SyncMatters script API (types only - scripts execute on the SyncMatters platform)",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "author": "SyncMatters",
30
30
  "homepage": "https://syncmatters.com",
31
- "typesContentHash": "6074e4b68cb636902e4d5a8962e71228571bd13fe17b0d186f35714addbd126e",
31
+ "typesContentHash": "87bf322ba471ad760d94c31884ed28859fb460b28f3558f876ee88423eda1c92",
32
32
  "dependencies": {
33
33
  "@types/node": "*"
34
34
  }