goldsync 0.1.11

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.txt ADDED
@@ -0,0 +1,5 @@
1
+ Copyright (c) 2026 tay. All rights reserved.
2
+
3
+ Permission is granted to install and use GoldSync through its official Visual Studio Marketplace listing, npm package, or an installation package supplied by the publisher. Redistribution, modification, sublicensing, and resale are not permitted without prior written permission from the copyright holder.
4
+
5
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
package/README.md ADDED
@@ -0,0 +1,129 @@
1
+ # GoldSync
2
+
3
+ GoldSync synchronizes configured, code-free Roblox Studio hierarchies with native `.rbxm` files. Rojo continues to own scripts.
4
+
5
+ This is the standalone GoldSync source and build folder. It stays separate from game projects. Each game project contains its own `goldsync.project.json`, one Rojo session-marker mapping, and its synced RBXM files.
6
+
7
+ ## Install for Cursor or VS Code
8
+
9
+ Install the public VS Code extension:
10
+
11
+ ```powershell
12
+ code --install-extension tay.native-asset-sync
13
+ ```
14
+
15
+ Open the game repository in VS Code. GoldSync activates when the workspace root contains `goldsync.project.json` and installs its Roblox Studio plugin automatically on Windows. Reload VS Code and restart Studio once after the first installation. Studio may ask for permission to access `127.0.0.1`.
16
+
17
+ ## Install for Zed
18
+
19
+ From the game repository terminal, run:
20
+
21
+ ```powershell
22
+ npx goldsync install
23
+ ```
24
+
25
+ That command downloads GoldSync from npm, finds the repository's `goldsync.project.json`, installs the Studio plugin, registers that project, starts GoldSync immediately, and enables it at Windows login. Zed does not need a task or extension. Restart Studio once after the first installation.
26
+
27
+ For offline distribution, build the companion package from this folder:
28
+
29
+ ```powershell
30
+ npm run package:companion
31
+ ```
32
+
33
+ Send the ZIP from `dist` to the programmer and extract it anywhere. From the game repository terminal, run its installer as one command:
34
+
35
+ ```powershell
36
+ & "C:\path\to\GoldSync-Companion\install.cmd"
37
+ ```
38
+
39
+ Running the installer from another game registers that game too. Registering another clone with the same `projectId` replaces the old clone, preventing two copies of one project from claiming the same Rojo session. Cursor's extension and the companion can run together; they share one broker automatically.
40
+
41
+ For a local development build, run:
42
+
43
+ ```powershell
44
+ .\install.ps1
45
+ ```
46
+
47
+ That installs dependencies, builds the Studio plugin and VS Code extension, creates the latest VSIX under `extension`, and installs it locally.
48
+
49
+ ## Configure a game
50
+
51
+ Place `goldsync.project.json` at the game repository root:
52
+
53
+ ```json
54
+ {
55
+ "version": 1,
56
+ "name": "My Game",
57
+ "projectId": "my-game",
58
+ "roots": [
59
+ {
60
+ "id": "effects",
61
+ "studioPath": ["ReplicatedStorage", "Assets", "Effects"],
62
+ "file": "assets/ReplicatedStorage/Assets/Effects.rbxm"
63
+ },
64
+ {
65
+ "id": "main-pages",
66
+ "studioPath": ["StarterGui", "Main", "Pages"],
67
+ "directory": "assets/StarterGui/Main/Pages",
68
+ "splitDepth": 1
69
+ }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ A `file` root becomes one RBXM. A `directory` root creates separate files for descendants at `splitDepth`. Split at complete models, effects, or UI components—not individual parts or attachments. Never map the same hierarchy in Rojo, and do not include scripts inside a GoldSync root.
75
+
76
+ GoldSync reads the Rojo project name and fallback `servePort` from `default.project.json`. It automatically detects `rojo serve --port` overrides and verifies the listener's project name before connecting. That active Rojo session selects the GoldSync workspace, so Studio place IDs and names do not need configuration. Set `rojo.projectFile` only when the repository uses another project file.
77
+
78
+ Map GoldSync's generated live-session marker in the Rojo project tree:
79
+
80
+ ```json
81
+ "ServerStorage": {
82
+ "__GoldSyncSession": {
83
+ "$path": ".goldsync/rojo-session.model.json"
84
+ }
85
+ }
86
+ ```
87
+
88
+ The extension generates that ignored file from Rojo's current session ID. Only Studio windows that receive the current marker from Rojo can access the matching GoldSync workspace. A disconnected or different place is rejected.
89
+
90
+ ## Daily use
91
+
92
+ 1. Open the game repository in Cursor, VS Code, or Zed.
93
+ 2. Run `rojo serve`.
94
+ 3. Open a configured place in Roblox Studio.
95
+ 4. Confirm the GoldSync status bar and Studio widget are connected.
96
+
97
+ Studio and file edits then synchronize automatically. On the first connection, if both sides already contain data, use **Push Studio** or **Pull File** once to select the authoritative copy. Stopping Rojo pauses normal synchronization.
98
+
99
+ Deleting a synchronized root in Studio deletes its RBXM file. GoldSync refuses the deletion if that file changed since Studio last synchronized it, preserving the file for manual conflict resolution.
100
+
101
+ The broker uses `127.0.0.1:34873`. Multiple repositories and different Rojo projects may be served at once because every Studio request is bound to its project and live Rojo session. GoldSync refuses multiple simultaneous Rojo servers for the same project name.
102
+
103
+ ## Merge conflicts
104
+
105
+ Configured RBXM conflicts pause that file before either side can overwrite it. GoldSync shows a VS Code notification naming the project. **Open Conflict Viewer** temporarily connects that workspace even while Rojo is offline.
106
+
107
+ In Studio, **Open Merge Workspace** creates Base, Yours, Theirs, and editable Result trees under `ServerStorage.GoldSync Conflicts`. Use **Property Diff** when useful, edit Result, then click **Resolve Result**. Resolving writes and stages the selected RBXM file. The viewer is optional and can be disabled with `goldsync.conflictNotifications.enabled`.
108
+
109
+ ## Development
110
+
111
+ Run the automated tests from this repository:
112
+
113
+ ```powershell
114
+ npm test
115
+ ```
116
+
117
+ Package the Marketplace extension:
118
+
119
+ ```powershell
120
+ cd extension
121
+ npm install
122
+ npm run package
123
+ ```
124
+
125
+ To run the standalone diagnostic server against a game config:
126
+
127
+ ```powershell
128
+ .\start.ps1 C:\path\to\goldsync.project.json
129
+ ```