@volter/twin 0.1.0 → 0.1.1
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 +16 -2
- package/inject.cjs +453 -59
- package/package.json +12 -22
- package/src/actions.ts +234 -49
- package/src/blob-store.ts +136 -0
- package/src/changeset.ts +807 -0
- package/src/cli.ts +60 -10
- package/src/connector.ts +30 -7
- package/src/control-plane.ts +17 -1
- package/src/emit.ts +242 -0
- package/src/fork.ts +19 -7
- package/src/index.ts +139 -6
- package/src/lease.ts +4 -6
- package/src/lifecycle.ts +8 -0
- package/src/packRegistry.ts +248 -2
- package/src/plan.ts +131 -23
- package/src/proxy.ts +5 -2
- package/src/pushLedger.ts +116 -11
- package/src/queueLifecycle.ts +3 -4
- package/src/rateBudget.ts +1115 -0
- package/src/refs.ts +9 -10
- package/src/remote-execute.ts +16 -0
- package/src/scenario.ts +387 -0
- package/src/serve.ts +397 -15
- package/src/shadow.ts +86 -7
- package/src/storage.ts +76 -147
- package/src/sync.ts +63 -17
- package/src/twin-fetch.ts +115 -0
- package/src/validate.ts +6 -5
- package/src/world-clock.ts +33 -0
- package/src/world-store.ts +482 -0
- package/src/worldConfig.ts +4 -3
- package/dist/src/actions.d.ts +0 -138
- package/dist/src/actions.js +0 -201
- package/dist/src/args.d.ts +0 -3
- package/dist/src/args.js +0 -12
- package/dist/src/cli.d.ts +0 -2
- package/dist/src/cli.js +0 -425
- package/dist/src/connector.d.ts +0 -106
- package/dist/src/connector.js +0 -129
- package/dist/src/control-plane.d.ts +0 -21
- package/dist/src/control-plane.js +0 -40
- package/dist/src/egress.d.ts +0 -93
- package/dist/src/egress.js +0 -264
- package/dist/src/fork.d.ts +0 -126
- package/dist/src/fork.js +0 -206
- package/dist/src/index.d.ts +0 -42
- package/dist/src/index.js +0 -52
- package/dist/src/lease.d.ts +0 -50
- package/dist/src/lease.js +0 -80
- package/dist/src/packRegistry.d.ts +0 -34
- package/dist/src/packRegistry.js +0 -22
- package/dist/src/plan.d.ts +0 -97
- package/dist/src/plan.js +0 -151
- package/dist/src/proxy.d.ts +0 -25
- package/dist/src/proxy.js +0 -152
- package/dist/src/pushLedger.d.ts +0 -81
- package/dist/src/pushLedger.js +0 -130
- package/dist/src/queueLifecycle.d.ts +0 -62
- package/dist/src/queueLifecycle.js +0 -95
- package/dist/src/reconcile.d.ts +0 -58
- package/dist/src/reconcile.js +0 -137
- package/dist/src/refs.d.ts +0 -29
- package/dist/src/refs.js +0 -68
- package/dist/src/schemas.d.ts +0 -78
- package/dist/src/schemas.js +0 -50
- package/dist/src/serve.d.ts +0 -44
- package/dist/src/serve.js +0 -93
- package/dist/src/shadow.d.ts +0 -77
- package/dist/src/shadow.js +0 -138
- package/dist/src/status.d.ts +0 -31
- package/dist/src/status.js +0 -42
- package/dist/src/storage.d.ts +0 -119
- package/dist/src/storage.js +0 -535
- package/dist/src/sync.d.ts +0 -91
- package/dist/src/sync.js +0 -121
- package/dist/src/types.d.ts +0 -40
- package/dist/src/types.js +0 -1
- package/dist/src/validate.d.ts +0 -27
- package/dist/src/validate.js +0 -68
- package/dist/src/visualizer.d.ts +0 -13
- package/dist/src/visualizer.js +0 -133
- package/dist/src/worldConfig.d.ts +0 -9
- package/dist/src/worldConfig.js +0 -16
package/README.md
CHANGED
|
@@ -22,6 +22,13 @@ its own vendor's exact API on top of this. CLI: `volter-twin`.
|
|
|
22
22
|
and append only changed fields.
|
|
23
23
|
- **Connectors** (`runConnectorPoll` / `runConnectorSweep`): cursor/subject poll
|
|
24
24
|
runners owning the sync invariants.
|
|
25
|
+
- **Pull posture** (`pullPosture` / `assertContinuousPullAllowed` / `pullOnSchedule`):
|
|
26
|
+
how often a vendor's REAL API may be pulled, declared once by the pack that knows its
|
|
27
|
+
rate limits (`pullPosture: 'continuous' | 'on-demand'`, default `'on-demand'`) and
|
|
28
|
+
enforced at the cadence seams. Both poll runners require `connector.vendor` and assert
|
|
29
|
+
the posture *before* the first vendor request, so a scheduled pull of a rate-fragile —
|
|
30
|
+
or undeclared — vendor is refused having made zero calls. A one-off pull someone asked
|
|
31
|
+
for is still allowed: pass `trigger: 'explicit'`.
|
|
25
32
|
- **Control plane** (the `controlPlane` namespace): `status`, `plan`, push (+ phases),
|
|
26
33
|
`lease`, refs/checkpoints, the queue lifecycle, and fork operations
|
|
27
34
|
(rebase/merge/cherry-pick/revert/reset) — the one uniform surface for driving any
|
|
@@ -40,15 +47,22 @@ volter-twin events append <service> --file evt.json # append an observed event
|
|
|
40
47
|
volter-twin events list <service> --json
|
|
41
48
|
volter-twin state rebuild <service> # rebuild projected state from events
|
|
42
49
|
volter-twin status <service> # queued/unpushed/drift/conflicts
|
|
43
|
-
volter-twin plan <service>
|
|
50
|
+
volter-twin plan <service> --root <project> # exact pending transaction set + latest review
|
|
51
|
+
volter-twin review <service> --decision rejected --actor-id <id> --reason <text> --root <project>
|
|
52
|
+
volter-twin review <service> --decision approved --actor-id <id> --root <project>
|
|
44
53
|
volter-twin refs <service> # remote checkpoints
|
|
45
54
|
volter-twin validate [--services <a,b>] # twin integrity (egress reconciliation)
|
|
46
55
|
```
|
|
47
56
|
|
|
48
57
|
State lives under `<cwd>/.volter/world/` by default (directory name overridable via
|
|
49
|
-
`VOLTER_STATE_DIR
|
|
58
|
+
`VOLTER_STATE_DIR`; `plan` and `review` accept `--root`); per-service config in `.volter/world/config.json`.
|
|
50
59
|
**Pin a `--root` / `VOLTER_STATE_DIR` in CI** so a twin doesn't write into your repo.
|
|
51
60
|
|
|
61
|
+
Every non-empty plan requires review. Decisions are appended to `plan-reviews.jsonl` and bind to a
|
|
62
|
+
hash of the exact ordered pending-action IDs. Adding or removing an action therefore invalidates an
|
|
63
|
+
earlier approval automatically. `applyPlan` refuses to call a provider unless that exact transaction
|
|
64
|
+
set has a durable approval; rejection records intent but never pushes.
|
|
65
|
+
|
|
52
66
|
## API
|
|
53
67
|
|
|
54
68
|
`listEvents`, `appendEvent`, `createEvent`, `loadState`, `rebuildGenericState`,
|