Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
4ede56d
docs: update CHANGELOG.md
Artifizer Sep 13, 2026
a16d22b
feat: implement GTS top menu item to browse GTS files and oversee pro…
Artifizer Sep 13, 2026
4ad6cc6
feat(vscode): add GTS sidebar file explorer and YAML annotation support
Artifizer Sep 13, 2026
6253842
feat(gts): revalidate dependent entities on file change across all apps
Artifizer Sep 13, 2026
9ef50a7
fix(vscode): stop file-tree flicker and dedupe symlinked scans
Artifizer Sep 13, 2026
0125310
feat(shared): register inline GTS entity definitions in YAML config f…
Artifizer Sep 13, 2026
b60a4ef
feat(vscode): support dragging discovered GTS files
Artifizer Sep 13, 2026
7f689cb
chore: update gts-spec and TypeScript configs
Artifizer Sep 13, 2026
4c3c787
chore: rename gts.* VS Code commands to gts-kit.*
Artifizer Sep 13, 2026
31c5d22
chore: enable Node typings for VS Code extension
Artifizer Sep 13, 2026
dfe030e
fix(vscode): start GTS scanner on extension startup
Artifizer Sep 13, 2026
c914a29
feat: VS Code plugin - GTS menu panel - added refresh file explorer b…
Artifizer Sep 13, 2026
1db83a1
fix(vscode): cascade invalid GTS chain segments
Artifizer Sep 13, 2026
db4aa08
fix(vscode): resolve GTS reference errors to their own array item
Artifizer Sep 15, 2026
2d5564b
fix(validation): enforce strict RFC 3339 for date/time formats
Artifizer Sep 15, 2026
0c67ce0
fix(styling): classify GTS ID segments structurally via core gts-ts
Artifizer Sep 15, 2026
e81ba8c
chore: update .gts-spec to v0.13.4
Artifizer Sep 15, 2026
75fba9e
fix(vscode): enable multi-file chat drag
Artifizer Sep 15, 2026
6260cce
fix(vscode): keep invalid files marked red after preview tab closes
Artifizer Sep 15, 2026
65b8174
chore: update VS Code plugin category and tags
Artifizer Sep 15, 2026
89f73c8
chore: rebase gts-kit on gts-ts v0.5.0 to support additional validations
Artifizer Sep 15, 2026
7cf9e4e
fix(validation): surface GTS validation errors across VS Code viewer
Artifizer Sep 16, 2026
f1fcaf4
fix(styling): avoid duplicate entity suggestions
Artifizer Sep 16, 2026
012c0bb
feat: apps/vscore-extension - watch file changes in symlinked directo…
Artifizer Sep 16, 2026
ce1cb5c
fix(vscode): keep discovered GTS files synchronized
Artifizer Sep 16, 2026
b265cf0
fix(vscode): surface inherited schema validation failures
Artifizer Sep 16, 2026
dd873ff
fix(validation): reject schema-less dollar-id instances
Artifizer Sep 16, 2026
b45edad
fix(types): include Node globals in shared package
Artifizer Sep 16, 2026
4a7fe45
docs: update VS Code default message used while GTS file scanner is r…
Artifizer Sep 17, 2026
032f096
perf(vscode): avoid synchronous explorer file scans
Artifizer Sep 17, 2026
a4cb244
fix(web): invalidate stale files after parse errors
Artifizer Sep 17, 2026
ca64f6b
fix(validation): prune annotation-only GTS ref branches
Artifizer Sep 17, 2026
72846f2
fix(registry): skip ID-less YAML containers
Artifizer Sep 17, 2026
e1f750b
fix(web): remove deprecated TypeScript base URL
Artifizer Sep 17, 2026
d6d0def
fix(web): correct TypeScript ESLint preset
Artifizer Sep 17, 2026
3cec75d
chore: rebase gts-kit on gts-ts v0.7.0 and document 0.3.0 release
Artifizer Sep 27, 2026
4ecb823
fix(vscode): report invalid GTS entities accurately in hovers/diagnos…
Artifizer Sep 28, 2026
383a987
fix(shared): anchor trait-completeness diagnostics to x-gts-traits-sc…
Artifizer Sep 28, 2026
73ff466
fix(shared): stop flagging scalar GTS-id-shaped values as missing ref…
Artifizer Sep 28, 2026
abd4a6f
fix(vscode): make re-scan fully rebuild the GTS store and harden vali…
Artifizer Sep 28, 2026
1877fac
fix(vscode): accurate file statuses, folder-level sync and safe hovers
Artifizer Sep 28, 2026
05cba15
fix(vscode): report duplicate and malformed GTS ids everywhere; unify…
Artifizer Sep 28, 2026
ca9655b
perf(vscode): lazy activation, cached validation, cheaper editor and …
Artifizer Sep 28, 2026
0e478a9
fix(shared): resolve gts:// $refs during x-gts-ref instance validation
Artifizer Sep 28, 2026
e9688c3
feat(vscode): add viewer tree context menu
Artifizer Sep 28, 2026
1ef0482
fix(vscode): use standard problem decorations
Artifizer Sep 28, 2026
e46e6b0
fix(vscode): ship re2.wasm next to the bundled extension
Artifizer Sep 28, 2026
85c1615
fix(shared): report instances of an invalid type as invalid
Artifizer Sep 28, 2026
cd92f58
fix(shared): stop flagging gts:// outside JSON Schema URL fields
Artifizer Sep 28, 2026
fa84377
fix(vscode): one problem severity; place list-file errors on the righ…
Artifizer Sep 28, 2026
1f88cad
fix(vscode): underline regex compile errors on the regex, not $id
Artifizer Sep 28, 2026
96890bc
build(shared): rebase gts-ts onto published npm 0.8.1
Artifizer Sep 30, 2026
ab61d79
feat(shared): enforce x-gts-ref any-valid transitive validation
Artifizer Sep 30, 2026
3509537
fix(examples): use absolute x-gts-type ref for topic id
Artifizer Sep 30, 2026
2987934
docs: remove docs/LLM_RULES.md
Artifizer Sep 30, 2026
725dc2b
fix(vscode): drop deleted files from discovery
Artifizer Sep 30, 2026
3cc2d43
feat(vscode): add Explorer actions to GTS file tree
Artifizer Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gts-spec
Submodule .gts-spec updated 57 files
+3 −3 .github/workflows/release-tests-image.yml
+21 −6 README.md
+72 −0 adr/0005-json-schema-format-assertions.md
+43 −0 examples/advanced-json-schema/README.md
+10 −0 examples/advanced-json-schema/draft-2020-12/gts.x.advanced.schema.profile.v1~.example.json
+63 −0 examples/advanced-json-schema/draft-2020-12/gts.x.advanced.schema.profile.v1~.schema.json
+50 −0 ...ed-json-schema/instances/gts.x.advanced.schema.login_event.v1~x.demo.security.login_event.v1~.examples.json
+116 −0 examples/advanced-json-schema/types/gts.x.advanced.schema.login_event.v1~.schema.json
+104 −0 ...advanced-json-schema/types/gts.x.advanced.schema.login_event.v1~x.demo.security.login_event.v1~.schema.json
+17 −0 examples/events/README.md
+1 −1 examples/events/instances/gts.x.core.events.topic.v1~x.commerce.orders.orders.v1.0.json
+10 −0 examples/events/instances/gts.x.core.events.topic.v1~x.core._.default.v1.json
+19 −0 examples/events/instances/gts.x.core.events.topic.v1~x.core.audit.events.v1.json
+46 −0 ...ents/instances/gts.x.core.events.type.v1~x.core.audit.type.v1~x.core.iam.settings_changed.v1~.examples.json
+16 −0 .../instances/gts.x.core.iam.settings.v1~x.core.iam.security_policy.v1~x.core.iam.mfa_policy.v1~.examples.json
+18 −0 ...ances/gts.x.core.iam.settings.v1~x.core.iam.security_policy.v1~x.core.iam.password_policy.v1~.examples.json
+5 −0 examples/events/instances/gts.x.core.iam.settings_category.v1~x.core.iam.lockout.v1.json
+5 −0 examples/events/instances/gts.x.core.iam.settings_category.v1~x.core.iam.mfa.v1.json
+5 −0 examples/events/instances/gts.x.core.iam.settings_category.v1~x.core.iam.password_policy.v1.json
+5 −0 examples/events/instances/gts.x.core.iam.settings_category.v1~x.core.iam.session.v1.json
+1 −1 examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.0~.schema.json
+1 −1 examples/events/types/gts.x.core.events.type.v1~x.commerce.orders.order_placed.v1.1~.schema.json
+47 −0 examples/events/types/gts.x.core.events.type.v1~x.core.audit.type.v1~.schema.json
+47 −0 ...les/events/types/gts.x.core.events.type.v1~x.core.audit.type.v1~x.core.iam.settings_changed.v1~.schema.json
+42 −0 examples/events/types/gts.x.core.iam.settings.v1~.schema.json
+27 −0 examples/events/types/gts.x.core.iam.settings.v1~x.core.iam.security_policy.v1~.schema.json
+34 −0 ...events/types/gts.x.core.iam.settings.v1~x.core.iam.security_policy.v1~x.core.iam.mfa_policy.v1~.schema.json
+41 −0 ...s/types/gts.x.core.iam.settings.v1~x.core.iam.security_policy.v1~x.core.iam.password_policy.v1~.schema.json
+23 −0 examples/events/types/gts.x.core.iam.settings_category.v1~.schema.json
+1 −2 examples/mcp/types/gts.x.ai.mcp.tool.v1~x.ai.mcp.http_outbound.v1~.schema.jsonc
+33 −0 examples/settings/instances/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.examples.jsonc
+19 −0 examples/settings/instances/gts.x.core.settings.type.v1~x.platform._.maintenance_mode.v1~.examples.jsonc
+78 −0 examples/settings/types/gts.x.core.settings.type.v1~.schema.json
+43 −0 examples/settings/types/gts.x.core.settings.type.v1~x.platform._.feature_new_dashboard.v1~.schema.json
+39 −0 examples/settings/types/gts.x.core.settings.type.v1~x.platform._.maintenance_mode.v1~.schema.json
+3 −3 examples/typespec/vms/types/states/gts.x.infra.compute.vm_state.v1~.schema.json
+30 −0 examples/users/instances/gts.x.core.idp.user.v1~x.core.idp.platform_admin.v1~.examples.jsonc
+57 −0 examples/users/types/gts.x.core.idp.user.v1~.schema.json
+35 −0 examples/users/types/gts.x.core.idp.user.v1~x.core.idp.platform_admin.v1~.schema.json
+57 −0 examples/users/types/gts.x.core.idp.user.v2~.schema.json
+2 −2 examples/yaml/ui/types/gts.x.ui.core.item.v1~.schema.yaml
+1 −1 examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.grid.v1~.schema.yaml
+1 −1 examples/yaml/ui/types/gts.x.ui.core.item.v1~x.ui.components.menu_item.v1~.schema.yaml
+41 −0 tests/README.md
+231 −0 tests/generate_examples.py
+186 −2 tests/openapi.json
+1 −0 tests/requirements.txt
+40 −0 tests/test_op10_query_execution.py
+7 −7 tests/test_op11_attribute_access.py
+1 −1 tests/test_op12_type_derivation_validation.py
+572 −8 tests/test_op13_schema_traits_validation.py
+1,770 −18 tests/test_op6_schema_validation.py
+382 −0 tests/test_op8_compatibility_checking.py
+233 −0 tests/test_op9_version_casting.py
+46 −0 tests/test_refimpl_x_gts_final_abstract.py
+164 −11 tests/test_refimpl_x_gts_ref.py
+128 −0 tests/test_xgts_keyword_placement.py
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ A three-headed application for validating and viewing the [GTS](https://github.c

This project is aimed at exploring and using GTS schemas and instances across platforms.

The repository is conformant with gts-spec v0.13.4.

![GTS Viewer](./docs/gts-viewer.png)

## Quick Start
Expand Down
47 changes: 47 additions & 0 deletions apps/electron/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Changelog

All notable changes to the GTS Electron app will be documented in this file.

## [Unreleased]

## [0.3.0] - 2026-09-18

### Changed
- Rebased validation on `gts-ts` v0.7.0 for additional checks

### Fixed
- Reject schema-less `$id` instances
- Prune annotation-only GTS reference branches and skip ID-less YAML containers
- Enforce strict RFC 3339 for date/time formats

## [0.2.6] - 2026-09-07

_Released alongside the rest of the suite._

## [0.2.5] - 2026-09-06

_Released alongside the rest of the suite._

## [0.2.4] - 2026-09-06

### Added
- YAML file format support

### Changed
- Rebased schema validation on `gts-ts`
- Aligned schema handling with GTS spec v0.7

## [0.2.1] - 2025-10-22

_Released alongside the rest of the suite._

## [0.2.0] - 2025-10-19

### Fixed
- Fixed errors on Electron start
- Moved the primary web server port to 7805 and the DB server to 7806 for npm/docker

## [0.1.0] - 2025-10-16

### Added
- Initial release of the GTS Electron viewer
2 changes: 1 addition & 1 deletion apps/electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gts-viewer/electron",
"version": "0.2.6",
"version": "0.3.0",
"description": "GTS Viewer Electron Application",
"main": "dist/main/main.js",
"scripts": {
Expand Down
48 changes: 48 additions & 0 deletions apps/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Changelog

All notable changes to the GTS server will be documented in this file.

## [Unreleased]

## [0.3.0] - 2026-09-18

### Changed
- Rebased validation on `gts-ts` v0.7.0 for additional checks

### Fixed
- Reject schema-less `$id` instances
- Prune annotation-only GTS reference branches and skip ID-less YAML containers
- Enforce strict RFC 3339 for date/time formats

## [0.2.6] - 2026-09-07

_Released alongside the rest of the suite._

## [0.2.5] - 2026-09-06

_Released alongside the rest of the suite._

## [0.2.4] - 2026-09-06

### Added
- YAML file format support

### Changed
- Rebased schema validation on `gts-ts`

## [0.2.1] - 2025-10-22

_Released alongside the rest of the suite._

## [0.2.0] - 2025-10-19

### Changed
- Switched from `better-sqlite3` to `sql.js` (no native compilation required)

### Fixed
- Moved the primary web server port to 7805 and the DB server to 7806 for npm/docker

## [0.1.0] - 2025-10-16

### Added
- Initial release of the GTS server
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gts/server",
"version": "0.2.6",
"version": "0.3.0",
"private": true,
"type": "module",
"main": "./dist/index.js",
Expand Down
139 changes: 113 additions & 26 deletions apps/vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,123 @@

All notable changes to the GTS Viewer extension will be documented in this file.

## [1.0.0] - 2025-10-08
## [Unreleased]

## [0.3.0] - 2026-09-18

### Added
- **Context Menu Integration**: Right-click `.json` and `.gts` files to preview layouts
- **Visual Layout Viewer**: Interactive diagram showing JSON schemas and instances
- **Layout Persistence**: Save and load custom layouts from workspace `.gts-viewer/` folder
- **Dual Panel View**: File opens in editor (left) with preview panel (right)
- **Welcome Message**: First-time user guidance
- **Auto-detection**: Automatic file validation for supported formats
- GTS activity-bar panel with a file explorer to browse discovered GTS files and see an at-a-glance problem count
- Refresh button in the GTS panel to rescan the workspace file explorer
- YAML annotation support, including inline GTS entity definitions declared in YAML config files
- Drag-and-drop of discovered GTS files, including multi-file drag into chat
- Automatic revalidation of dependent entities when a file changes, across all apps
- File watching inside symlinked directories

### Features
- Support for `.json` and `.gts` file types
- RepoLayoutStorage integration for team-shared layouts
- Version control friendly layout storage
- Error handling with user-friendly messages
- Webview-based rendering for rich visual experience
### Changed
- Rebased validation on `gts-ts` v0.7.0 for additional checks, and updated to gts-spec v0.13.4
- Renamed all `gts.*` commands to `gts-kit.*`
- Updated the Marketplace category and tags
- Enabled Node typings for the extension
- Improved the default message shown while the GTS file scanner is running

### Commands
- `GTS: Preview Layout` - Open selected file in visual viewer
- `GTS: Open Viewer` - Show usage instructions
### Fixed
- GTS scanner now starts on extension startup
- Discovered GTS files stay synchronized, with reduced file-tree flicker and deduplicated symlinked scans
- Explorer file scans are no longer synchronous, avoiding UI stalls on large repos
- Invalid files stay marked red after a preview tab closes
- Inherited schema validation failures are now surfaced
- Invalid GTS chain segments cascade correctly, and reference errors resolve to their own array item
- GTS ID segments are classified structurally via core gts-ts
- Strict RFC 3339 enforcement for date/time formats
- Schema-less `$id` instances are rejected; annotation-only GTS reference branches and ID-less YAML containers are skipped
- Duplicate entity suggestions removed
- Stale files invalidated after parse errors

### Context Menu Locations
- Explorer context menu (right-click files)
- Editor title context menu
## [0.2.6] - 2026-09-07

## [Unreleased]
### Fixed
- Malformed `gts://` schema IDs now surface correctly everywhere instead of failing silently
- Gray chip shown for unresolved GTS IDs in schema examples
- Compact web UI layout for the VS Code webview; validation errors now wrap properly
- `GTS: Open Viewer` now opens the currently selected file

### Added
- Diagnostics shown when the web server isn't running
- A progress bar for large repo scans

## [0.2.5] - 2026-09-06

### Changed
- Renamed extension identifier to `gts-kit` (the `gts` name was already taken on the VS Code Marketplace)
- Reduced packaged extension size

## [0.2.4] - 2026-09-06

### Fixed
- Rebased schema validation on `gts-ts`
- Invalid JSON is now rejected during editor validation
- Removed duplicated validation errors in the GTS viewer
- Consistent YAML parsing across shared registry and editor validation

### Added
- All/errors/valid entities selector in the GTS viewer

## [0.2.3] - 2026-08-31

### Added
- Scoped background validation for unopened GTS files
- GTS brand logo as extension and activity bar icon
- Enforced `gts://` URI prefix rules for JSON Schema fields

### Fixed
- Two-phase prioritized file scan with `.gitignore` exclusion for better performance
- Persisted GTS registry to reduce editor open latency
- Removed redundant margins around GTS string annotations in the editor
- Consistent segment gap width across GTS segment styles

## [0.2.2] - 2026-08-31

### Planned
- Multi-file comparison view
- Layout templates
- Export to image/SVG
- Search and filter capabilities
- Enhanced keyboard shortcuts
### Added
- YAML file format support
- Schema examples preview feature
- NOTICE file with copyright and license information

### Changed
- Aligned schema handling with GTS spec v0.7
- Prioritize the GTS ID (`id`, `gtsId`, etc.) over the `type` field for schema resolution
- Disabled GTS reference validation for `/examples` in schemas

### Fixed
- Slow GTS color annotations on file open
- Popup GTS error display position
- Restored VS Code editor inline validation
- Removed redundant file link in the web viewer

## [0.2.1] - 2025-10-22

### Added
- Open the file containing a GTS node directly from the VS Code editor

### Changed
- Cumulative visual style polish for the web view and VS Code
- Neutral file link color (blue was reserved for "schema" elsewhere)

### Fixed
- Color annotations for broken GTS IDs
- GTS replacement when clicking an auto-suggestion popup
- Rescan JSON files on edits even when the web viewer isn't active

## [0.2.0] - 2025-10-19

### Added
- Inline JSON/JSONC/GTS file validation inside the VS Code editor
- Colored GTS ID validation and suggestions in the editor
- Support for `.jsonc` and `.gts` file extensions

### Changed
- Switched from `better-sqlite3` to `sql.js` (no native compilation required)

## [0.1.0] - 2025-10-16

### Added
- Initial release of the GTS Viewer VS Code extension
7 changes: 6 additions & 1 deletion apps/vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,14 @@ See the full [GTS Specification](https://github.com/globaltypesystem/gts-spec) f

- **`.json`** — Standard JSON (schemas and instances)
- **`.jsonc`** — JSON with Comments (single-line, multi-line, trailing commas)
- **`.yaml` / `.yml`** — YAML files parsed and treated identically to JSON
- **`.yaml` / `.yml`** — YAML files parsed and treated like JSON, **plus** inline GTS definitions (see below)
- **`.gts`** — GTS-specific files

#### Supported GTS Entity Definitions

- **JSON / JSONC / `.gts`** — a document must be either a **single entity** or a **top-level array of entities**. GTS IDs anywhere else are treated as *references*.
- **YAML** — everything above, **plus** inline definitions: a config file may *define* GTS types/instances under any nested `entities:` array (e.g. a service's `types-registry.config.entities` seed block), even deep inside otherwise-non-GTS config. Each element is registered by its `$id` as a real definition, so it is not flagged as an unresolved reference.

### Validation

The extension validates GTS files automatically as you open, edit, and save them.
Expand Down
24 changes: 24 additions & 0 deletions apps/vscode-extension/build.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
import * as esbuild from 'esbuild'
import { promises as fs } from 'fs'
import path from 'path'
import { createRequire } from 'module'

const require = createRequire(import.meta.url)

/**
* gts-ts compiles schema patterns with re2-wasm, which loads its `re2.wasm`
* binary from the directory of the running script. Bundled, that is `dist/`,
* so the binary must sit next to `dist/extension.js` or the extension throws
* on load. Resolved through gts-ts so it's the exact copy gts-ts depends on.
*
* @type {esbuild.Plugin}
*/
const copyRe2WasmPlugin = {
name: 'copy-re2-wasm',
setup(build) {
build.onEnd(async result => {
if (result.errors.length > 0) return
const gtsTsDir = path.dirname(require.resolve('@globaltypesystem/gts-ts/package.json', { paths: ['../../packages/shared'] }))
const re2Dir = path.dirname(require.resolve('re2-wasm/package.json', { paths: [gtsTsDir] }))
await fs.copyFile(path.join(re2Dir, 'build', 'wasm', 're2.wasm'), path.join('dist', 're2.wasm'))
})
},
}

const production = process.argv.includes('--production')
const watch = process.argv.includes('--watch')
Expand Down Expand Up @@ -41,6 +64,7 @@ async function main() {
mainFields: ['module', 'main'],
plugins: [
esbuildProblemMatcherPlugin,
copyRe2WasmPlugin,
],
})

Expand Down
Loading