Theme
Editor tooling Preview
The Connector console has a syntax highlighting editor with a Validate button, which compiles the source and reports parse errors without running anything. That is enough for a short handler. For anything longer, write it in a real editor and paste it in.
The SyncJS extension for VS Code
Syncplify publishes a SyncJS extension on the Visual Studio Code Marketplace, under the publisher syncplify. It requires VS Code 1.99 or later.
It gives you, for files named *.syncjs:
- Completion for the SyncJS globals and their members
- Hover documentation with signatures and parameter descriptions
- Signature help while typing
- Resolution of member chains, so hovering
cli.Options.UploadPolicyshows the right type
On activation it writes type declarations into a .syncjs-types/ folder in the workspace root and points jsconfig.json at them. Add .syncjs-types/ to .gitignore; it is regenerated every time.
Choosing a product setting
The extension tailors its globals to a product, through the syncjs.product workspace setting.
There is no Connector setting yet
The extension offers server, aft, r2fs and none. r2fs is reserved and currently adds nothing. Neither of the two useful options is exactly right for the Connector:
| Setting | What you get | What is wrong with it |
|---|---|---|
none | Core SyncJS only | Accurate but incomplete. Everything it offers exists here, but it does not know Session, GetCurrentVFS, the Ctx* functions or EventHandler |
server | Core plus the Syncplify Server extensions | Complete but over generous. It knows the Ctx* functions and GetCurrentVFS, and it also offers MakeTOTP, ValidateTOTP, CtxVirtualSite, Session.GetUser and other things that do not exist here |
Pick server if you value completion on the context functions and are willing to check anything it suggests against Every global, A to Z. Pick none if you would rather have no suggestion than a wrong one.
json
// .vscode/settings.json
{
"syncjs.product": "server"
}Run SyncJS: Write Type Declaration Files to Workspace from the command palette to regenerate the declarations after upgrading the extension.
MCP servers for AI assisted authoring
The extension also contributes MCP servers that an AI coding assistant can call to look up the SyncJS API, check syntax, fetch reference documentation and run snippets in a sandbox.
| Server | Targets |
|---|---|
syncjs-server | Syncplify Server scripts |
syncjs-aft | Syncplify AFT scripts |
syncjs-core | Core SyncJS only |
An assistant using these does not know about the Connector
There is no Connector MCP server. Whichever you select, the assistant is answering from another product's API surface, and it will confidently produce code that calls Session.GetUser(), reads EventCtx().RelPath, or binds to AfterFileUpload.
Every one of those is wrong here, and one of them fails silently. Treat generated code as a draft, check it against If you know Syncplify Server, and never paste it into a fail closed before handler without testing it fail open first.
Getting a script into the Connector
Copy and paste. There is no import, no file upload and no API for pushing a script from a repository, because the Connector's console is deliberately reachable only from the machine it runs on. See Settings.
If you keep scripts in version control, which you should, the console is the deployment step: paste, Validate, save, and the next matching operation runs the new version. There is no restart.