@voltro/plugin-saves 0.0.0-stage → 0.88.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 ADDED
@@ -0,0 +1,61 @@
1
+ Voltro — Proprietary Software License
2
+
3
+ Copyright (c) 2026 Voltro UG. All rights reserved.
4
+
5
+ This software and all associated source code, documentation, and other
6
+ materials (the "Software") are the proprietary property of Voltro UG
7
+ ("Voltro"). This is NOT open-source software.
8
+
9
+ Your access to and use of the Software is governed exclusively by the Voltro
10
+ Terms of Service at:
11
+
12
+ https://voltro.cloud/legal/terms
13
+
14
+ By downloading, installing, or using the Software you agree to those Terms.
15
+ Subject to and conditioned on your continued compliance with them, Voltro
16
+ grants you a limited, non-exclusive, non-transferable, non-sublicensable,
17
+ revocable license to use the Software. The license covers use by your
18
+ authorised named users only, up to the number of seats (or other billing metric)
19
+ your plan or order covers; each named user must be an identified individual
20
+ using their own personal account, and accounts, access credentials and seats
21
+ must not be shared. All rights not expressly granted in the
22
+ Terms are reserved by Voltro. If you do not agree to the Terms, you have no
23
+ license and may not use the Software.
24
+
25
+ The Terms of Service — including the scope of permitted use, plan
26
+ entitlements, fees, and pricing — may change from time to time. The version in
27
+ force is the one published at the URL above. Commercial terms and pricing are
28
+ NOT part of this notice and are not fixed by, or granted in perpetuity by, the
29
+ version of the Software in which this file appears.
30
+
31
+ Permitted use — your own software. Voltro is a development framework. You may
32
+ use the Software to build, run, and commercially distribute your own
33
+ applications and services, and to charge your own customers for them, without
34
+ owing Voltro any share of that revenue or any further permission beyond the
35
+ Terms. Applications you build with the Software are yours.
36
+
37
+ Prohibited use — reselling Voltro. You may NOT redistribute, resell,
38
+ sublicense, publish, or otherwise provide the Software itself — in whole or in
39
+ part, in source or compiled form — to third parties as a library, framework,
40
+ SDK, template, starter, or development tool for them to build upon, whether
41
+ standalone or repackaged. Shipping the Software as a non-separable, bundled
42
+ dependency inside an application you deliver (for example, compiled into your
43
+ deployed app) is permitted; extracting or re-exposing it as a reusable
44
+ component for others is not.
45
+
46
+ Except as expressly permitted above or by the Terms, you may not copy, modify,
47
+ merge, publish, sublicense, sell, distribute, or create derivative works of the
48
+ Software, in whole or in part.
49
+
50
+ Third-party open-source components distributed alongside the Software are the
51
+ property of their respective owners and are licensed under their own terms; see
52
+ THIRD-PARTY-NOTICES.md where provided. Nothing in this notice limits your
53
+ rights, or extends Voltro's, in those components.
54
+
55
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
56
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
57
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL
58
+ VOLTRO BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM,
59
+ OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR ITS USE.
60
+
61
+ For licensing inquiries, contact Voltro UG.
package/README.md CHANGED
@@ -1,3 +1,91 @@
1
- # Temporary Holding Version
1
+ # @voltro/plugin-saves
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Use with matching unreleased source. No capacity or support claim follows.
4
+
5
+ Owner-scoped opaque progress in one borrowed SQL store: monotonic slot versions,
6
+ bounded history, basis conflicts, exact original-request replay and guest/user
7
+ erase/export. The configured game and authenticated tenant/owner scope every
8
+ operation; player input contains no owner selector or server value grant.
9
+
10
+ ```ts
11
+ import { savesPlugin } from '@voltro/plugin-saves'
12
+ import { memory } from '@voltro/kv/connection'
13
+
14
+ export default {
15
+ name: 'save-api', type: 'api', store: 'sqlite',
16
+ connections: { redis: { local: memory() }, defaults: { redis: 'local' } },
17
+ plugins: [savesPlugin({ gameId: 'example.game', slots: ['main', 'profile-2'] })],
18
+ }
19
+ ```
20
+
21
+ The example's memory connection is single-node. Multi-node needs an actual
22
+ cross-node Redis HotStore through the app ConnectionRegistry; memory refuses
23
+ activation. SQL remains truth; quota state is never saved progress. Default
24
+ write admission is ten requests per minute, with an inline byte budget of
25
+ 1 MiB, five retained versions and a seven-day deletion grace. These are
26
+ configured budgets, not measured capacity or deployment recommendations.
27
+
28
+ `./rpc` exposes paired `saves.get`, `saves.list`, `saves.history`, `saves.put`,
29
+ `saves.rollback` and `saves.remove` descriptors. Reads list metadata without
30
+ loading private blobs; get returns bytes through the existing Base64 wire
31
+ schema. Put takes slot/requestId/baseVersion/schemaVersion/bytes/deviceId/
32
+ clientVersion/summary. Rollback and remove take the original request/basis.
33
+ Keep an uncertain intent and its original request ID; retry that same intent.
34
+ Changing its content gives request_conflict. SaveConflict contains the current
35
+ serverVersion plus server/client summaries; it never accepts client state as
36
+ Wallet/Inventory/ranked authority. New acceptance always advances the version.
37
+
38
+ `./web` exports useSave, useSaveSlots, useSaveHistory, usePutSave,
39
+ useRollbackSave and useRemoveSave over the ordinary registered RPC group.
40
+ No offline journal, conflict dialog or useSaveSync is installed yet.
41
+
42
+ Take the default service through `SavesPort`; configure slots/body/history/
43
+ request/grace budgets and an optional Effect JSON schema plus schemaVersion.
44
+ Hook committed SQL changes with the actual borrowed store's onChange. Override
45
+ the exported defaultSaveValidator using a named version and a pure validator;
46
+ return exactly true to admit. It receives copied previous/proposed/decoded
47
+ progress. Rollback obeys the current schema, body budget and validator.
48
+
49
+ Replace the complete eight-method service with `service`, a non-default
50
+ version and actual querySources. The replacement owns its store, work limits,
51
+ privacy and policy; default SQL/HotStore/schema options are refused. Methods
52
+ are captured once with their actual receiver; accessors are refused. The plugin
53
+ still guards active lifetime, authenticated ownership and declared slots.
54
+
55
+ `./testing` exports savesFixture, savesPortFixture, scoped savesFakeLayer,
56
+ savesPortSystemFixture and saveValidatorSystemFixture. These use actual
57
+ InMemoryDataStore/HotStore adapters and revoke escaped service access on close.
58
+ The real systemContractConformance registration and six native-dialect suites
59
+ pass in the current complete package suite on all six SQL dialects. These local
60
+ checks do not establish production deployment or independent engine acceptance.
61
+
62
+ The four SQL tables own heads/history/original receipts/permanent subject
63
+ fences. onExport emits owner bytes as Base64 within explicit row/body limits.
64
+ onErase removes private rows even if bytes are corrupt and retains an erased
65
+ subject fence with ownerId null. Peers and foreign tenants stay independent.
66
+ Soft deletion hides the head immediately and permits owner rollback only
67
+ inside the grace. Expired private bytes are not purged automatically yet.
68
+
69
+ The read-only status endpoint has all four dashboard layers and a single
70
+ browser-safe canonical schema. It displays configured bounds and this process's
71
+ activation only. Offline sync, signatures, external storage, expiry purging and
72
+ GM rollback remain open. Docs: `/docs/plugins/saves`; thin `api-saves` template
73
+ has passing rendered example tests, complete types and a production build.
74
+
75
+ Production activation now source-checks the actual deployment-wide plugin grant.
76
+ Declare actual Licensing first; development/test remains free. See the bilingual
77
+ Licensing contract and manual update migration.
78
+
79
+ ## Activation and binding
80
+
81
+ Both ordinary host orders are supported: activation before DataStore binding, or
82
+ binding before activation. Ports and inspect bound readiness require both. A
83
+ complete replacement cannot borrow early availability. Shutdown revokes the
84
+ binding generation; reactivation requires explicit rebind to the same app store.
85
+ SQL stores and registry connections remain borrowed. Production licensing still
86
+ runs before authorized activation.
87
+
88
+ Saves captures a call's generation at intention creation. Old effects cannot use a
89
+ new binding after shutdown. Pending activation/owned cleanup fences new binding;
90
+ failed drainage retains ownership and stays fenced. App-supplied HotStores are
91
+ borrowed; only this instance's managed runtime is disposed.
package/SECURITY.md ADDED
@@ -0,0 +1,56 @@
1
+ # Security Policy
2
+
3
+ We take the security of Voltro and the applications built on it seriously. This
4
+ document explains how to report a vulnerability and what to expect in return.
5
+
6
+ ## Reporting a vulnerability
7
+
8
+ **Please do not open public issues or discuss suspected vulnerabilities in
9
+ public channels.** Report them privately by email:
10
+
11
+ **security contact: [support@voltro.dev](mailto:support@voltro.dev)**
12
+ (subject line: `SECURITY`).
13
+
14
+ Include, where you can:
15
+
16
+ - the affected package(s) and version(s) (e.g. `@voltro/runtime@x.y.z`);
17
+ - a description of the issue and its impact;
18
+ - a minimal reproduction or proof of concept;
19
+ - any suggested remediation.
20
+
21
+ If you'd like to encrypt your report, ask in a first plain email and we'll
22
+ arrange a key.
23
+
24
+ ## What to expect
25
+
26
+ - **Acknowledgement** of your report within **3 business days**.
27
+ - An initial assessment (severity, affected surface) and a remediation plan as
28
+ soon as we've reproduced the issue.
29
+ - **Coordinated disclosure:** we'll agree a disclosure timeline with you and
30
+ credit you in the release notes if you wish. Please give us reasonable time to
31
+ ship a fix before any public disclosure.
32
+
33
+ We do not currently run a paid bug-bounty program, but we genuinely appreciate
34
+ responsible disclosure and will credit reporters.
35
+
36
+ ## Software Bill of Materials (SBOM)
37
+
38
+ A CycloneDX SBOM of the third-party runtime dependency graph is generated for the
39
+ published packages (`pnpm gen:sbom` → `sbom.cdx.json`). If your procurement or
40
+ security team needs it, request it at
41
+ [support@voltro.dev](mailto:support@voltro.dev).
42
+
43
+ ## Supported versions
44
+
45
+ Voltro is pre-1.0 and ships in lockstep: **only the latest published minor of
46
+ each `@voltro/*` package receives security fixes.** Please upgrade to the latest
47
+ release before reporting, and pin exact versions in production.
48
+
49
+ ## Scope
50
+
51
+ In scope: the published `@voltro/*` packages and the framework's own code.
52
+
53
+ Out of scope: vulnerabilities in third-party dependencies that are already
54
+ tracked upstream (we monitor these via a production-dependency audit gate in
55
+ CI), and issues that require a non-default, explicitly-unsafe configuration. If
56
+ you're unsure, report it anyway — we'd rather hear about it.