24 lines
1.2 KiB
Markdown
24 lines
1.2 KiB
Markdown
# Open-file snapshot protocol v1
|
|||
|
|
|
||
|
|
IDE companions publish one JSON file per running IDE instance in:
|
||
|
|
|
||
|
|
```text
|
||
|
|
%LOCALAPPDATA%\Prophet\dsh-plugin-coop-with-vs\v1\instances
|
||
|
|
```
|
||
|
|
|
||
|
|
The schema is [`open-files-v1.schema.json`](open-files-v1.schema.json).
|
||
|
|
|
||
|
|
## Publishing rules
|
||
|
|
|
||
|
|
- File name: `vscode-<instanceId>.json` or `visualstudio-<instanceId>.json`.
|
||
|
|
- Write a temporary file in the same directory, then atomically replace/rename it.
|
||
|
|
- Refresh `updatedAt` at least every 15 seconds, even when tabs do not change.
|
||
|
|
- Delete the instance file on clean shutdown. Consumers expire snapshots older than 60 seconds because shutdown cleanup is best effort.
|
||
|
|
- Publish only absolute paths for local, disk-backed files. Do not publish source text, credentials, virtual documents, or untitled buffers.
|
||
|
|
- Deduplicate paths case-insensitively on Windows.
|
||
|
|
- `dirty: true` means the IDE buffer may differ from the on-disk file. DSH still reads the on-disk version unless a future protocol explicitly adds buffer transfer.
|
||
|
|
|
||
|
|
## Compatibility
|
||
|
|
|
||
|
|
Consumers reject unknown versions and malformed entries without rejecting healthy snapshots from other instances. Adding fields requires a new protocol version because v1 intentionally rejects additional properties.
|