cluaupp 1.5.0 → 1.5.2-cf
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/CHANGELOG.md +47 -0
- package/README.md +11 -6
- package/api/CHANGELOG.md +3 -0
- package/api/chat.js +74 -0
- package/api/fixtures/roblox/README.md +6 -0
- package/api/fixtures/roblox/aux/sample.d.luau +6 -0
- package/api/fixtures/roblox/mini/Mini-API-Dump.json +72 -0
- package/api/generated/bench-latest.json +39 -0
- package/api/generated/capability-profile.json +76 -0
- package/api/generated/lsp-index.json +1 -0
- package/api/generated/luau/classes.d.luau +11221 -0
- package/api/generated/luau/datatypes.d.luau +327 -0
- package/api/generated/luau/enums.d.luau +4918 -0
- package/api/generated/luau/globals.d.luau +12 -0
- package/api/manifests/roblox-target.manifest.json +22 -0
- package/api/normalized/roblox-target.profile.json +237461 -0
- package/api/overrides/classes.json +8 -0
- package/api/overrides/compatibility.json +9 -0
- package/api/overrides/datatypes.json +1579 -0
- package/api/overrides/enums.json +8 -0
- package/api/overrides/globals.json +8 -0
- package/api/overrides/type-mappings.json +9 -0
- package/api/roblox-api.lock.json +9 -0
- package/bin/cluaupp.js +36 -0
- package/data/Mini-API-Dump.json +1 -0
- package/editors/vscode/README.md +12 -10
- package/editors/vscode/extension.js +82 -0
- package/editors/vscode/icons/axiom.svg +4 -0
- package/editors/vscode/icons/bloom.svg +5 -0
- package/editors/vscode/icons/helm.svg +4 -0
- package/editors/vscode/icons/hive.svg +5 -0
- package/editors/vscode/icons/mint.svg +4 -0
- package/editors/vscode/icons/shift.svg +6 -0
- package/editors/vscode/language-configuration-schema.json +24 -0
- package/editors/vscode/package.json +172 -12
- package/editors/vscode/snippets/axiom.json +12 -0
- package/editors/vscode/snippets/bloom.json +12 -0
- package/editors/vscode/snippets/helm.json +12 -0
- package/editors/vscode/snippets/hive.json +12 -0
- package/editors/vscode/snippets/mint.json +12 -0
- package/editors/vscode/snippets/shift.json +17 -0
- package/editors/vscode/syntaxes/axiom.tmLanguage.json +5 -0
- package/editors/vscode/syntaxes/bloom.tmLanguage.json +5 -0
- package/editors/vscode/syntaxes/clpp.tmLanguage.json +90 -0
- package/editors/vscode/syntaxes/helm.tmLanguage.json +5 -0
- package/editors/vscode/syntaxes/hive.tmLanguage.json +5 -0
- package/editors/vscode/syntaxes/mint.tmLanguage.json +5 -0
- package/editors/vscode/syntaxes/schema.tmLanguage.json +89 -0
- package/editors/vscode/syntaxes/shift.tmLanguage.json +5 -0
- package/examples/game/.cluaupp/compile-cache/ReplicatedStorage__Shared__Constants__Datas__TemplateData.clh.json +1 -0
- package/examples/game/.cluaupp/compile-cache/ServerScriptService__Boot__DataBoot.server.clpp.json +1 -0
- package/examples/game/.cluaupp/compile-cache/ServerScriptService__Configuration__ServerConfig.clp.json +1 -0
- package/examples/game/.cluaupp/compile-cache/ServerScriptService__Handlers__Guard.server.clpp.json +1 -0
- package/examples/game/.cluaupp/compile-cache/ServerScriptService__Handlers__PlayerHandler.server.clpp.json +1 -0
- package/examples/game/.cluaupp/compile-cache/StarterPlayer__StarterCharacterScripts__Character__CharacterReady.client.clpp.json +1 -0
- package/examples/game/.cluaupp/compile-cache/StarterPlayer__StarterPlayerScripts__Controllers__DataController.client.clpp.json +1 -0
- package/examples/game/.cluaupp/compile-cache/index.json +12 -0
- package/examples/game/.cluaupp/datamodel-profile.json +94 -0
- package/examples/game/.vscode/settings.json +12 -1
- package/examples/game/cluaupp.config.json +1 -1
- package/examples/game/default.project.json +13 -16
- package/examples/game/include/clpp/datatypes.clh +337 -373
- package/examples/game/include/clpp/generated/datamodel.clh +25 -0
- package/examples/game/include/clpp/generated/enums.clh +1 -1
- package/examples/game/include/clpp/generated/instances.clh +41135 -41064
- package/examples/game/include/clpp/libs/axiom.clh +1 -1
- package/examples/game/include/clpp/libs/math.clh +14 -0
- package/examples/game/include/clpp/libs/spring.clh +17 -0
- package/examples/game/include/clpp/libs/ward.clh +1 -0
- package/examples/game/include/clpp/roblox.clh +3 -4
- package/examples/game/libs/ArrayIndexer/init.luau +209 -0
- package/examples/game/libs/Axiom/init.luau +608 -0
- package/examples/game/libs/Bloom/init.luau +433 -0
- package/examples/game/libs/Coil/init.luau +215 -0
- package/examples/game/libs/Crest/init.luau +426 -0
- package/examples/game/libs/Echo/init.luau +417 -0
- package/examples/game/libs/Ember/init.luau +365 -0
- package/examples/game/libs/Flare/init.luau +717 -0
- package/examples/game/libs/Gleam/init.luau +729 -0
- package/examples/game/libs/Guide/init.luau +215 -0
- package/examples/game/libs/Helm/init.luau +377 -0
- package/examples/game/libs/Hive/init.luau +241 -0
- package/examples/game/libs/Keep/Client.luau +114 -0
- package/examples/game/libs/Keep/Data.luau +883 -0
- package/examples/game/libs/Keep/Engine.luau +211 -0
- package/examples/game/libs/Keep/Enum.luau +6 -0
- package/examples/game/libs/Keep/Enums.luau +10 -0
- package/examples/game/libs/Keep/Path.luau +236 -0
- package/examples/game/libs/Keep/Replicator.luau +298 -0
- package/examples/game/libs/Keep/Server.luau +251 -0
- package/examples/game/libs/Keep/Store.luau +652 -0
- package/examples/game/libs/Keep/Trade.luau +455 -0
- package/examples/game/libs/Keep/init.luau +205 -0
- package/examples/game/libs/Lens/init.luau +609 -0
- package/examples/game/libs/Mint/init.luau +279 -0
- package/examples/game/libs/Net/init.luau +156 -0
- package/examples/game/libs/Net/src/codec.luau +224 -0
- package/examples/game/libs/Occlude/init.luau +117 -0
- package/examples/game/libs/Pin/init.luau +309 -0
- package/examples/game/libs/Promise/LICENSE +21 -0
- package/examples/game/libs/Promise/_impl/LICENSE +21 -0
- package/examples/game/libs/Promise/_impl/init.lua +1991 -0
- package/examples/game/libs/Promise/init.lua +1990 -0
- package/examples/game/libs/Promise/init.luau +13 -0
- package/examples/game/libs/Promise/types.luau +46 -0
- package/examples/game/libs/Roster/init.luau +686 -0
- package/examples/game/libs/SOURCES.md +31 -0
- package/examples/game/libs/Shift/init.luau +238 -0
- package/examples/game/libs/Spark/init.luau +487 -0
- package/examples/game/libs/Stage/init.luau +178 -0
- package/examples/game/libs/Sweep/init.luau +259 -0
- package/examples/game/libs/Trace/init.luau +213 -0
- package/examples/game/libs/Ward/init.luau +211 -0
- package/examples/game/out/ReplicatedStorage/Shared/Constants/Datas/TemplateData.luau +29 -0
- package/examples/game/out/ReplicatedStorage/Shared/Constants/Datas/TemplateData.luau.map.json +13 -0
- package/examples/game/out/ReplicatedStorage/Shared/Net/Net.luau +83 -0
- package/examples/game/out/ReplicatedStorage/Shared/Net/Net.luau.map.json +13 -0
- package/examples/game/out/ServerScriptService/Boot/DataBoot.server.luau +18 -0
- package/examples/game/out/ServerScriptService/Boot/DataBoot.server.luau.map.json +13 -0
- package/examples/game/out/ServerScriptService/Configuration/ServerConfig.luau +14 -0
- package/examples/game/out/ServerScriptService/Configuration/ServerConfig.luau.map.json +13 -0
- package/examples/game/out/ServerScriptService/Handlers/Guard.server.luau +15 -0
- package/examples/game/out/ServerScriptService/Handlers/Guard.server.luau.map.json +13 -0
- package/examples/game/out/ServerScriptService/Handlers/PlayerHandler.server.luau +50 -0
- package/examples/game/out/ServerScriptService/Handlers/PlayerHandler.server.luau.map.json +13 -0
- package/examples/game/out/StarterPlayer/StarterCharacterScripts/Character/CharacterReady.client.luau +12 -0
- package/examples/game/out/StarterPlayer/StarterCharacterScripts/Character/CharacterReady.client.luau.map.json +13 -0
- package/examples/game/out/StarterPlayer/StarterPlayerScripts/Controllers/DataController.client.luau +16 -0
- package/examples/game/out/StarterPlayer/StarterPlayerScripts/Controllers/DataController.client.luau.map.json +13 -0
- package/examples/game/src/Client/Controllers/DataController.client.clpp +7 -0
- package/examples/game/src/Client/Main.client.clpp +4 -0
- package/examples/game/src/Modules/Core/Guard.server.clpp +7 -0
- package/examples/game/src/{ServerScriptService/Handlers → Modules/Core}/PlayerHandler.server.clpp +3 -3
- package/examples/game/src/{ServerScriptService → Server}/Boot/DataBoot.server.clpp +3 -3
- package/examples/game/src/Server/Main.server.clpp +4 -0
- package/examples/game/stylua.toml +9 -0
- package/generated/api/build-profile.js +115 -0
- package/generated/api/cache.js +44 -0
- package/generated/api/coverage.js +32 -0
- package/generated/api/diff.js +125 -0
- package/generated/api/generators/clpp-headers.js +353 -0
- package/generated/api/generators/docs-reference.js +7 -0
- package/generated/api/generators/lsp-index.js +81 -0
- package/generated/api/generators/luau-defs.js +94 -0
- package/generated/api/ide.js +76 -0
- package/generated/api/identifier.js +47 -0
- package/generated/api/index.js +324 -0
- package/generated/api/loader.js +57 -0
- package/generated/api/merge.js +88 -0
- package/generated/api/model.js +5 -0
- package/generated/api/normalize.js +231 -0
- package/generated/api/overrides-validate.js +58 -0
- package/generated/api/perf.js +12 -0
- package/generated/api/registry.js +136 -0
- package/generated/api/release.js +44 -0
- package/generated/api/resolver.js +250 -0
- package/generated/api/sources/aux-types-diff.js +75 -0
- package/generated/api/sources/client-tracker.js +11 -0
- package/generated/api/sources/creator-docs.js +42 -0
- package/generated/api/sources/luau-types.js +34 -0
- package/generated/api/sources/mini-dump.js +17 -0
- package/generated/api/sources/studio-api.js +8 -0
- package/generated/api/sources/studio-apiv2.js +11 -0
- package/generated/api/sources/studio-full-api.js +8 -0
- package/generated/api/studio-smoke.js +80 -0
- package/generated/api/type-parse.js +49 -0
- package/generated/api/understander.js +51 -0
- package/generated/api/validate.js +135 -0
- package/generated/api-cli.js +421 -0
- package/generated/cli.js +16 -5
- package/generated/clpp/contract.js +3 -3
- package/generated/clpp/format-luau.js +236 -0
- package/generated/clpp/index.js +13 -1
- package/generated/clpp/modules.js +232 -0
- package/generated/clpp/postprocess.js +86 -5
- package/generated/clpp/rewrite-janitor.js +145 -0
- package/generated/clpp/runner.js +14 -2
- package/generated/compile.js +82 -0
- package/generated/flare/parse.js +12 -1
- package/generated/intellisense.js +57 -1
- package/generated/native/index.js +217 -16
- package/generated/target/authority-check.js +136 -0
- package/generated/target/authority-graph.js +74 -0
- package/generated/target/build-cache.js +112 -0
- package/generated/target/capabilities.js +89 -0
- package/generated/target/capability-profile.js +30 -0
- package/generated/target/component-contracts.js +60 -0
- package/generated/target/context-check.js +160 -0
- package/generated/target/datamodel-check.js +170 -0
- package/generated/target/datamodel-generate.js +74 -0
- package/generated/target/datamodel.js +233 -0
- package/generated/target/diagnostics.js +63 -0
- package/generated/target/doctor.js +152 -0
- package/generated/target/flare-version.js +58 -0
- package/generated/target/gen-rojo-tree.js +118 -0
- package/generated/target/get-service.js +69 -0
- package/generated/target/lifetime-check.js +47 -0
- package/generated/target/luau-stamp.js +39 -0
- package/generated/target/optimizer-advise.js +88 -0
- package/generated/target/optimizer-apply.js +44 -0
- package/generated/target/optimizer-soa.js +254 -0
- package/generated/target/parallel-check.js +136 -0
- package/generated/target/pgo.js +148 -0
- package/generated/target/project-docs.js +69 -0
- package/generated/target/project-graph.js +71 -0
- package/generated/target/roblox.js +63 -0
- package/generated/target/security-check.js +41 -0
- package/generated/target/source-map.js +25 -0
- package/generated/target/studio-bridge.js +112 -0
- package/generated/utils/project.js +186 -8
- package/generated/utils/rojo-mapper.js +11 -3
- package/include/clpp/datatypes.clh +337 -373
- package/include/clpp/generated/enums.clh +1 -1
- package/include/clpp/generated/instances.clh +41135 -41064
- package/include/clpp/libs/axiom.clh +1 -1
- package/include/clpp/libs/hive.clh +1 -0
- package/include/clpp/libs/keep.clh +2 -0
- package/include/clpp/libs/math.clh +14 -0
- package/include/clpp/libs/spring.clh +17 -0
- package/include/clpp/libs/ward.clh +1 -0
- package/include/clpp/roblox.clh +3 -4
- package/{examples/game/src/ReplicatedFirst/Loading → native/bin}/.gitkeep +1 -1
- package/package.json +14 -3
- package/plugins/CluauppNav/Plugin.luau +207 -0
- package/plugins/CluauppNav/ProfileLogger.luau +27 -0
- package/plugins/CluauppNav/README.md +24 -0
- package/runtime/Axiom/init.luau +10 -7
- package/runtime/Coil/init.luau +8 -2
- package/runtime/Crest/init.luau +1 -0
- package/runtime/Flare/init.luau +2 -1
- package/runtime/Gleam/init.luau +15 -4
- package/runtime/Hive/init.luau +36 -14
- package/runtime/Pin/init.luau +5 -2
- package/runtime/Roster/init.luau +2 -0
- package/runtime/Spark/init.luau +3 -0
- package/runtime/Sweep/init.luau +2 -0
- package/runtime/Trace/init.luau +3 -0
- package/runtime/Ward/init.luau +38 -5
- package/rust/cluaupp/Cargo.lock +795 -0
- package/rust/cluaupp/Cargo.toml +17 -0
- package/rust/cluaupp/src/main.rs +717 -0
- package/scripts/postinstall-editor.js +17 -0
- package/scripts/postinstall-native.js +52 -0
- package/skills/README.md +13 -0
- package/skills/clpp-hive-flare/SKILL.md +79 -0
- package/skills/clpp-language/SKILL.md +123 -0
- package/skills/clpp-language/compiler.md +89 -0
- package/skills/clpp-style/SKILL.md +95 -0
- package/src/api/build-profile.ts +138 -0
- package/src/api/cache.ts +45 -0
- package/src/api/coverage.ts +46 -0
- package/src/api/diff.ts +143 -0
- package/src/api/generators/clpp-headers.ts +377 -0
- package/src/api/generators/docs-reference.ts +11 -0
- package/src/api/generators/lsp-index.ts +106 -0
- package/src/api/generators/luau-defs.ts +98 -0
- package/src/api/ide.ts +87 -0
- package/src/api/identifier.ts +47 -0
- package/src/api/index.ts +269 -0
- package/src/api/loader.ts +60 -0
- package/src/api/merge.ts +126 -0
- package/src/api/model.ts +283 -0
- package/src/api/normalize.ts +257 -0
- package/src/api/overrides-validate.ts +58 -0
- package/src/api/perf.ts +15 -0
- package/src/api/registry.ts +162 -0
- package/src/api/release.ts +47 -0
- package/src/api/resolver.ts +255 -0
- package/src/api/sources/aux-types-diff.ts +81 -0
- package/src/api/sources/client-tracker.ts +10 -0
- package/src/api/sources/creator-docs.ts +37 -0
- package/src/api/sources/luau-types.ts +30 -0
- package/src/api/sources/mini-dump.ts +50 -0
- package/src/api/sources/studio-api.ts +7 -0
- package/src/api/sources/studio-apiv2.ts +10 -0
- package/src/api/sources/studio-full-api.ts +7 -0
- package/src/api/studio-smoke.ts +82 -0
- package/src/api/type-parse.ts +48 -0
- package/src/api/understander.ts +72 -0
- package/src/api/validate.ts +160 -0
- package/src/api-cli.ts +493 -0
- package/src/api.generated.js +37 -22
- package/src/cli.ts +21 -6
- package/src/clpp/contract.ts +34 -3
- package/src/clpp/format-luau.ts +262 -0
- package/src/clpp/index.ts +13 -2
- package/src/clpp/modules.ts +257 -0
- package/src/clpp/postprocess.ts +100 -5
- package/src/clpp/rewrite-janitor.ts +156 -0
- package/src/clpp/runner.ts +14 -2
- package/src/compile.ts +87 -0
- package/src/flare/parse.ts +14 -1
- package/src/flare/types.ts +2 -0
- package/src/intellisense.ts +58 -1
- package/src/native/index.ts +225 -16
- package/src/target/authority-check.ts +162 -0
- package/src/target/authority-graph.ts +80 -0
- package/src/target/build-cache.ts +129 -0
- package/src/target/capabilities.ts +115 -0
- package/src/target/capability-profile.ts +25 -0
- package/src/target/component-contracts.ts +64 -0
- package/src/target/context-check.ts +177 -0
- package/src/target/datamodel-check.ts +188 -0
- package/src/target/datamodel-generate.ts +78 -0
- package/src/target/datamodel.ts +261 -0
- package/src/target/diagnostics.ts +67 -0
- package/src/target/doctor.ts +171 -0
- package/src/target/flare-version.ts +61 -0
- package/src/target/gen-rojo-tree.ts +123 -0
- package/src/target/get-service.ts +85 -0
- package/src/target/lifetime-check.ts +45 -0
- package/src/target/luau-stamp.ts +33 -0
- package/src/target/optimizer-advise.ts +93 -0
- package/src/target/optimizer-apply.ts +63 -0
- package/src/target/optimizer-soa.ts +270 -0
- package/src/target/parallel-check.ts +135 -0
- package/src/target/pgo.ts +157 -0
- package/src/target/project-docs.ts +68 -0
- package/src/target/project-graph.ts +75 -0
- package/src/target/roblox.ts +78 -0
- package/src/target/security-check.ts +40 -0
- package/src/target/source-map.ts +36 -0
- package/src/target/studio-bridge.ts +140 -0
- package/src/types.ts +14 -0
- package/src/utils/project.ts +192 -9
- package/src/utils/rojo-mapper.ts +12 -3
- package/stylua.toml +9 -0
- package/templates/game/.vscode/settings.json +7 -1
- package/templates/game/cluaupp.config.json +1 -1
- package/templates/game/default.project.json +13 -16
- package/templates/game/include/clpp/datatypes.clh +337 -373
- package/templates/game/include/clpp/generated/enums.clh +1 -1
- package/templates/game/include/clpp/generated/instances.clh +41135 -41064
- package/templates/game/include/clpp/libs/axiom.clh +1 -1
- package/templates/game/include/clpp/libs/ward.clh +1 -0
- package/templates/game/include/clpp/roblox.clh +3 -4
- package/templates/game/src/Client/Controllers/DataController.client.clpp +7 -0
- package/templates/game/src/Client/Main.client.clpp +4 -0
- package/templates/game/src/Modules/Core/Guard.server.clpp +7 -0
- package/templates/game/src/{ServerScriptService/Handlers → Modules/Core}/PlayerHandler.server.clpp +3 -3
- package/templates/game/src/{ServerScriptService → Server}/Boot/DataBoot.server.clpp +3 -3
- package/templates/game/src/Server/Main.server.clpp +4 -0
- package/templates/game/stylua.toml +9 -0
- package/examples/game/src/ReplicatedStorage/Shared/Constants/Classes/.gitkeep +0 -1
- package/examples/game/src/ReplicatedStorage/Shared/Constants/Primitives/.gitkeep +0 -1
- package/examples/game/src/ReplicatedStorage/Shared/Modules/.gitkeep +0 -1
- package/examples/game/src/ReplicatedStorage/Shared/Net/.gitkeep +0 -1
- package/examples/game/src/ReplicatedStorage/Shared/Services/.gitkeep +0 -1
- package/examples/game/src/ReplicatedStorage/Shared/Types/.gitkeep +0 -1
- package/examples/game/src/ReplicatedStorage/Shared/Utils/.gitkeep +0 -1
- package/examples/game/src/ServerScriptService/Components/.gitkeep +0 -1
- package/examples/game/src/ServerScriptService/Configuration/ServerConfig.clp +0 -4
- package/examples/game/src/ServerScriptService/Handlers/Guard.server.clpp +0 -7
- package/examples/game/src/ServerScriptService/Services/.gitkeep +0 -1
- package/examples/game/src/ServerStorage/Configuration/.gitkeep +0 -1
- package/examples/game/src/ServerStorage/Modules/.gitkeep +0 -1
- package/examples/game/src/StarterPlayer/StarterCharacterScripts/Character/CharacterReady.client.clpp +0 -6
- package/examples/game/src/StarterPlayer/StarterCharacterScripts/Combat/.gitkeep +0 -1
- package/examples/game/src/StarterPlayer/StarterCharacterScripts/Movement/.gitkeep +0 -1
- package/examples/game/src/StarterPlayer/StarterPlayerScripts/Controllers/DataController.client.clpp +0 -7
- package/examples/game/src/StarterPlayer/StarterPlayerScripts/Input/.gitkeep +0 -1
- package/examples/game/src/StarterPlayer/StarterPlayerScripts/UI/.gitkeep +0 -1
- package/templates/game/src/ReplicatedFirst/Loading/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Constants/Classes/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Constants/Primitives/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Modules/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Net/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Services/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Types/.gitkeep +0 -1
- package/templates/game/src/ReplicatedStorage/Shared/Utils/.gitkeep +0 -1
- package/templates/game/src/ServerScriptService/Components/.gitkeep +0 -1
- package/templates/game/src/ServerScriptService/Configuration/ServerConfig.clp +0 -4
- package/templates/game/src/ServerScriptService/Handlers/Guard.server.clpp +0 -7
- package/templates/game/src/ServerScriptService/Services/.gitkeep +0 -1
- package/templates/game/src/ServerStorage/Configuration/.gitkeep +0 -1
- package/templates/game/src/ServerStorage/Modules/.gitkeep +0 -1
- package/templates/game/src/StarterPlayer/StarterCharacterScripts/Character/CharacterReady.client.clpp +0 -6
- package/templates/game/src/StarterPlayer/StarterCharacterScripts/Combat/.gitkeep +0 -1
- package/templates/game/src/StarterPlayer/StarterCharacterScripts/Movement/.gitkeep +0 -1
- package/templates/game/src/StarterPlayer/StarterPlayerScripts/Controllers/DataController.client.clpp +0 -7
- package/templates/game/src/StarterPlayer/StarterPlayerScripts/Input/.gitkeep +0 -1
- package/templates/game/src/StarterPlayer/StarterPlayerScripts/UI/.gitkeep +0 -1
- /package/examples/game/src/{ReplicatedStorage/Shared/Net → Declarations}/Net.flare +0 -0
- /package/examples/game/src/{ReplicatedStorage/Shared/Constants/Datas/TemplateData.clh → Include/GameTypes.clh} +0 -0
- /package/templates/game/src/{ReplicatedStorage/Shared/Net → Declarations}/Net.flare +0 -0
- /package/templates/game/src/{ReplicatedStorage/Shared/Constants/Datas/TemplateData.clh → Include/GameTypes.clh} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,53 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- **GetService ownership** — `GetService<T>()` is Cluaupp Roblox Target (registry + `CLUAU_SVC001` + Context Safety + header stubs + postprocess normalize). CL++ only forwards a generic call. New `src/target/get-service.ts`; wired into compile + doctor.
|
|
6
|
+
- **Named `import` host support** — Parse/resolve `import { } from` alongside `#include`; Rojo mapper strips `.clh`/`.clpp`; authority + project graph; game-rooted require rewrite for all services; incremental cache fingerprints imported deps; CompileArtifact `nativeHints`/`layoutHints`/`requires`/`optimize` wired through `clpp api compile`.
|
|
7
|
+
- **CL++ 0.8 floor** — `MIN_CLPP_VERSION` raised to **0.8.0** (refuse older `clpp`). Templates/examples use `import { PlayerTemplate } from` for app modules; angle `#include <clpp/…>` stays for prelude. Named `import` host support, `nativeHints`/`layoutHints`/`requires`, docs pages Option/Result + Cluaupp host.
|
|
8
|
+
- **Docs site sync** — Home / Why / Comparison / Benchmarks / Parallel / Typed DataModel / Product pillars / Getting started aligned to shipped platform. New [Studio tools](docs) page. Real measured benches via `scripts/bench-site.cjs` (registry ~700 ms cold; `examples/game` warm cache ~1.5 s vs cold ~3.7 s) with Mermaid charts. Docs chat prompt updated.
|
|
9
|
+
- **SoA / buffer codegen (opt-in)** — `cluaupp optimize --apply --layout` writes `#pragma layout soa` and emits `.cluaupp/generated/soa/*Soa.luau` (`--buffer` packs f32/i32 columns). Build also regenerates SoA for existing pragmas.
|
|
10
|
+
- **Studio debug panel** — CluauppNav dock: selection CL++ path, ScriptContext.Error → CL++ remap, Open IDE.
|
|
11
|
+
- **Studio↔IDE bridge** — `cluaupp bridge` (:3847); VS Code/Cursor polls and opens CL++ files on Studio events.
|
|
12
|
+
- **Authority call-graph** — `CLUAU_AUTH004` transitive Client/Shared → ServerScriptService/ServerStorage via include graph; `cluaupp check-authority`; wired into doctor.
|
|
13
|
+
- **PGO Studio ingest** — `cluaupp profile --ingest <jsonl>` merges playtest hits; `plugins/CluauppNav/ProfileLogger.luau` stub.
|
|
14
|
+
- **Luau stamps** — `-- cluaupp-source:` + `#pragma native` → `--!native` on emit; source maps no longer pruned.
|
|
15
|
+
- **Build** — `cluaupp build` uses async path so `-j/--jobs` applies; `--frozen` honored on async.
|
|
16
|
+
- **Incremental + parallel compile** — `.cluaupp/compile-cache` fingerprints sources; `build --no-incremental`, `-j/--jobs` (async path). Default incremental on.
|
|
17
|
+
- **Optimizer apply + PGO** — `cluaupp optimize --apply` inserts `#pragma native` on numeric-hot fns; `cluaupp profile` + `optimize --profile` ranks advice via `cluaupp.profile.json`.
|
|
18
|
+
- **Project docs** — `cluaupp docs` writes `.cluaupp/PROJECT.md` (DataModel, graph, Flare, advice).
|
|
19
|
+
- **Typed DataModel** — variable-root `WaitForChild` chains (`auto assets = …; assets.WaitForChild(...)`).
|
|
20
|
+
- **Flare** — parse `version N;` / `opt version = N` into schema; conflicts still via doctor/`--frozen`.
|
|
21
|
+
- **Platform analyzers (code)** — Parallel `CLUAU-PAR*`, Authority `CLUAU-AUTH*` + `cluaupp.config.json` rules, component contracts, Optimizer advisor (`cluaupp optimize`), security scan, lifetime heuristics, project graph, Flare version conflicts, file-level source maps on build, `build --frozen`, expanded `target doctor` / `analyze`. Wally thin `cluaupp add`.
|
|
22
|
+
- **Typed DataModel v1 (code)** — Parse Rojo `default.project.json` (+ `$path` filesystem scan) into an instance graph. Compile-time `WaitForChild`/`FindFirstChild` chain validation (`CLUAU_DM_MISSING_CHILD`). CLI: `cluaupp target datamodel`, `target check-datamodel`. Emits `.cluaupp/datamodel-profile.json` + `include/clpp/generated/datamodel.clh`. Wired into `cluaupp build` / compile payload (`datamodelProfilePath`).
|
|
23
|
+
- **Docs — Cluaupp Optimizer** — Philosophy locked: idiomatic CL++; compiler chooses table/SoA/buffer/native/parallel. Buffer ≠ programming model (wire Flare codecs stay separate). Page `architecture/optimizer`, roadmap + product-pillars + libraries index clarified. Modules demos: named `import { … } from`, Wallet/PlayerData, shared `const`.
|
|
24
|
+
- **Docs site** — Splash + Why / Benchmarks / Comparison / **Roadmap** (shipped vs next vs later). Absolute `/…` links rewritten relative for `base: /Cluaupp/`. CL++ version callouts updated to **0.7.0+**. Docs chat system prompt (`api/chat.js`) aligned to 0.7 + Context Safety / registry.
|
|
25
|
+
- **Product architecture (deep)** — Five true differentiators: Semantic / Authority / **Parallel** / DataModel / Performance compilers. Identity set: Typed DataModel + Thread Safety + Remote Contracts + Authority. Do not reinvent LSP/Rojo/debugger.
|
|
26
|
+
- **ThreadSafety in registry** — Normalize dump `ThreadSafety` onto properties/methods/events/callbacks; surface in `lsp-index.json`. Foundation for Parallel Compiler (`CLUAU-PAR*`).
|
|
27
|
+
- **Product architecture** — Canonical doc: Cluaupp = Roblox project host (five pillars, hard CL++/Cluaupp/ecosystem split, killer combo order). Context Safety v1 shipped; next = Typed DataModel.
|
|
28
|
+
- **Context Safety (v1)** — Compile-time capability rules from RunContext (`.server`/`.client`/`.plugin`): forbid `LocalPlayer` on server, `DataStoreService`/`ServerStorage`/`MessagingService` on client, wrong-direction `FireServer`/`FireClient`. Profile at `api/generated/capability-profile.json`; passed to `clpp` as `runContext` + `capabilityProfilePath`. CLI: `target capabilities`, `target check-context`.
|
|
29
|
+
- **Reuse-first Roblox backend** — Cluaupp integrates CL++ with the Roblox ecosystem (consume dump/docs → registry → bindings); does not reinvent LSP/IDE/sourcemap/docs. Exports `api/generated/lsp-index.json` for the CL++ Language Server. `api aux-diff` for optional `@rbxts/types` / LuauTypes coverage. Docs/CONTRIBUTING matrix CONSUME/GENERATE/IMPLEMENT/DO NOT BUILD.
|
|
30
|
+
- **Roblox Target Registry** — `src/api/` pipeline (loaders → normalize → validate → registry → generators), `RobloxTargetProfile` `schemaVersion` 2, `api/overrides/` (datatype migration from `DATATYPE_SPEC`), CLI `api` / `target`, lock + manifest, Luau `.d.luau` projection, Studio smoke harness, fixtures, coverage/diff.
|
|
31
|
+
- **CL++ contract** — `MIN_CLPP_VERSION` raised to **0.7.0**; compile payload may pass `targetProfilePath` / `targetCacheDir`.
|
|
32
|
+
- `npm run generate-api` delegates to `cluaupp api generate`.
|
|
33
|
+
|
|
34
|
+
## 1.5.1
|
|
35
|
+
|
|
36
|
+
- DataBoot `PlayerTemplate()` is rewritten to `TemplateData()` when that module is required (the constructor is the require bind).
|
|
37
|
+
- Cluaupp always reindents emitted Luau with the Roblox tab style (`stylua.toml`: tabs, width 4, double quotes). Nested `Connect` / Sweep `Add` lambdas no longer dump `end` at column 0. Blank lines separate `if` / `for` / `while` scopes at the same indent. Consecutive `Table.Field =` inits (struct tables) are compacted. `--format` still runs StyLua when it is on PATH.
|
|
38
|
+
- Method `~>` Connect hoists Sweep to `self.janitor` (one per controller). Instance binds (`Touched`, etc.) keep a local Sweep and `LinkToInstance` so they die with that instance.
|
|
39
|
+
- Ward rate-limit (`Allow`) drops extra packets instead of striking every deny. A strike happens only after `FloodAt` (80) consecutive denials. Clicker spam is not a kick. Studio still does not Kick unless `KickInStudio`.
|
|
40
|
+
- Ward no longer kicks Studio playtests by default (`KickInStudio = false`). Spawn/respawn get 3s grace, `lastPos` resets when the character is missing, Heartbeat uses a 1/30 dt floor, and mostly-vertical falls are not speed strikes. Placeholder spawn/fall no longer stacks to “Movement or traffic rejected”.
|
|
41
|
+
- Gleam stores per-instance Sweep in a weak table. Assigning `_gleamSweep` on a `ScreenGui` errors (`not a valid member`).
|
|
42
|
+
- Postprocess qualifies bare `HiveWorld` as `Hive.HiveWorld` (or `any` if Hive is not required) and reapplies Roster / ReplicatedStorage rewrites when writing `out/`.
|
|
43
|
+
- Postprocess rewrites `Instance.new("Roster")` to `Roster.new()`, and replaces `script.Parent…ReplicatedStorage` walks with `ReplicatedStorage`. `Roster.New` is an alias of `Roster.new`.
|
|
44
|
+
- Postprocess also rewrites `Sweep.New` / `Spark.New` / `Coil.New` → `.new`, and `Pin.new_` / `Crest.new_` / `Stage.new_` → `.new`. Runtime aliases: `Sweep.New`, `Coil.New`, `Pin.new_`, `Crest.new_`.
|
|
45
|
+
- **Editor** — `npm install` / `cluaupp init` / `cluaupp intellisense` install the Cursor/VS Code extension for `.flare` `.hive` `.mint` `.bloom` `.helm` `.shift` `.axiom` (postinstall + init).
|
|
46
|
+
- **Hive** `Set` / `Get` / `Remove` / `Has` / `Query` / `Snapshot` accept either a numeric component id or a generated schema row `{ Id = n, Fields = … }` (`.hive` Luau emit). Snapshot no longer crashes with `writeu8` on a table.
|
|
47
|
+
- **Pin** no longer assigns `BillboardGui.MinDistance` (not a Roblox property). `PinOptions.MinDistance` stays in the API as reserved/ignored.
|
|
48
|
+
- **Schema highlighting** — `.hive` `.mint` `.bloom` `.helm` `.shift` `.axiom` (plus existing `.flare`) in the Cluaupp editor extension. `cluaupp intellisense` / `cluaupp init` associate the extensions.
|
|
49
|
+
- **CL++ skills book** — `skills/clpp-language`, `clpp-style`, `clpp-hive-flare`. `cluaupp init` copies them to `.cursor/skills/`.
|
|
50
|
+
- **Flare** packs `...` instances **before** the query `pcall`. Nested `function()` cannot see `...` (`Cannot use '...' outside of a vararg function`).
|
|
51
|
+
|
|
5
52
|
## 1.5.0
|
|
6
53
|
|
|
7
54
|
- **Flare IntelliSense** — VS Code / Cursor extension for `.flare` (highlighting, completions, hover, diagnostics, outline, snippets). `cluaupp intellisense` installs it; `cluaupp lsp` serves the same engine.
|
package/README.md
CHANGED
|
@@ -6,18 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
**CL++ games on Roblox.** You write [CL++](https://kartzrbx.github.io/CLPP/). Cluaupp runs `clpp`, wires Rojo, and copies CluauppLibs.
|
|
8
8
|
|
|
9
|
-
[CL++ language](https://kartzrbx.github.io/CLPP/) · [Docs](https://kartzrbx.github.io/Cluaupp/)
|
|
9
|
+
[CL++ language](https://kartzrbx.github.io/CLPP/) · [Docs](https://kartzrbx.github.io/Cluaupp/) · [Why Cluaupp](https://kartzrbx.github.io/Cluaupp/why-cluaupp/) · [Benchmarks](https://kartzrbx.github.io/Cluaupp/benchmarks/) · [Roadmap](https://kartzrbx.github.io/Cluaupp/roadmap/)
|
|
10
10
|
|
|
11
11
|
[](https://www.npmjs.com/package/cluaupp)
|
|
12
12
|
[](https://nodejs.org)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
|
|
15
|
-
Cluaupp is the **
|
|
15
|
+
Cluaupp is the **Roblox project host** for [CL++](https://kartzrbx.github.io/CLPP/) — not the language compiler and not “roblox-ts with different syntax.” It turns **CL++ + project semantics** into a **validated Roblox project**, then emits Luau. [KartzRbx/CLPP](https://github.com/KartzRbx/CLPP) owns language, checker, Language Server (`clpp setup`), and codegen. Cluaupp owns Rojo/DataModel wiring, Context Safety, Flare remotes, API Registry (`cluaupp api generate`), and CluauppLibs. Optional Luau IntelliSense: **luau-lsp** + Rojo. Never `CL++ → roblox-ts → Luau`. Architecture: [`docs/.../product-pillars.md`](docs/src/content/docs/architecture/product-pillars.md).
|
|
16
16
|
|
|
17
17
|
Native PascalCase CluauppLibs: **Flare** net, **Sweep** zelador, **Spark** signal, **Keep** data, **Mint** numbers, **Axiom** math, **Roster** tables, **Gleam** UI, **Bloom** effects, **Lens** debug UI, **Crest** topbar, **Pin** billboard, **Stage** viewport 3D, **Coil** spring, **Helm** commands, **Shift** states, **Hive** ECS, **Ward** anti-cheat, **Ember** VFX, **Echo** replication, **Guide** tutorials, **Trace** pretty-print. Schemas pack u8 ids / ColorSequence / tables — never JSON on the hot path. Name map: [`runtime/SOURCES.md`](runtime/SOURCES.md).
|
|
18
18
|
|
|
19
19
|
```clpp
|
|
20
|
-
|
|
20
|
+
link @clpp.roblox;
|
|
21
21
|
|
|
22
22
|
struct HelloServer {
|
|
23
23
|
void Greet(Player player);
|
|
@@ -45,7 +45,7 @@ void init() {
|
|
|
45
45
|
|
|
46
46
|
1. [Node.js](https://nodejs.org/) 18+
|
|
47
47
|
2. [Rojo](https://rojo.space/) **7.7.0**
|
|
48
|
-
3. **`clpp` 0.
|
|
48
|
+
3. **`clpp` 0.8.0+** on PATH from [CL++](https://github.com/KartzRbx/CLPP/releases) (`clpp-setup.exe` or `clpp setup`; host **refuses** older compilers). Do not leave a cargo `clpp 0.1.0` first on PATH.
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
npm install -g cluaupp@latest
|
|
@@ -71,10 +71,15 @@ cluaupp init [folder]
|
|
|
71
71
|
cluaupp build [folder]
|
|
72
72
|
cluaupp watch [folder]
|
|
73
73
|
cluaupp language # clpp api manifest
|
|
74
|
-
cluaupp intellisense #
|
|
74
|
+
cluaupp intellisense # schema highlighting (.flare .hive …) + clpp setup (CL++ LSP)
|
|
75
|
+
cluaupp api generate # Registry → headers + lsp-index.json + lock
|
|
76
|
+
cluaupp target info # schemaVersion, class/enum counts
|
|
77
|
+
cluaupp api aux-diff <p> # optional coverage vs @rbxts/types / LuauTypes
|
|
75
78
|
```
|
|
76
79
|
|
|
77
|
-
`clpp`
|
|
80
|
+
**IntelliSense:** CL++ → `clpp` Language Server + Cluaupp `lsp-index.json`. Schemas (`.flare`/…) → Cluaupp editor extension. Emitted Luau → luau-lsp (optional). Cluaupp does not ship a Roblox class IntelliSense engine.
|
|
81
|
+
|
|
82
|
+
`clpp` missing? Set `CLPP` / `CLPP_PATH` or install [CL++ 0.8.0+](https://github.com/KartzRbx/CLPP/releases).
|
|
78
83
|
|
|
79
84
|
## Language
|
|
80
85
|
|
package/api/CHANGELOG.md
ADDED
package/api/chat.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const SYSTEM = "You are the Cluaupp docs assistant. Cluaupp is the Roblox project host for CL++ 0.8+ (KartzRbx/CLPP). Shipped platform: Context Safety, Typed DataModel (variable-root WaitForChild), API Registry with ThreadSafety + CLUAU-PAR*, Authority + call-graph AUTH004, Flare remotes + versions, Optimizer (optimize --apply / --layout SoA), PGO profile ingest, source maps + cluaupp-source stamps, CluauppNav Studio plugin, cluaupp bridge IDE sync, incremental compile cache, build --frozen, doctor/analyze. It does not reimplement the CL++ parser.\nYou write CL++ for .clpp/.clp/.clh and show Luau only when explaining emit.\n\nCluaupp facts:\n- Tags: *.server.clpp Script, *.client.clpp LocalScript, *.plugin.clpp plugin Script, *.clp / untagged .clpp ModuleScript, *.clh headers.\n- void init() is the Script/LocalScript entry. There is no int main().\n- #include <clpp/...> is IntelliSense (and library require for libs). Quoted includes become game-rooted requires.\n- Libraries live in ReplicatedStorage.CluauppLibs after cluaupp build.\n- Native PascalCase libraries: Flare (net), Sweep (zelador), Spark (signal), Keep (data), Mint (numbers), Axiom (math), Roster (tables), Gleam (UI), Bloom (effects), Lens (debug UI), Crest (topbar), Pin (billboard), Stage (viewport 3D), Coil (spring), Helm (commands), Shift (states), Hive (ECS), Ember (VFX), Echo (replication), Guide (tutorials), Trace (pretty-print). Old Wally includes (janitor, fusion, iris, cmdr, formatnumber, …) are aliases. Buffer law: .flare/.mint/.bloom/.helm/.shift/.hive/.axiom pack u8 ids, ColorSequence, or tables — never JSON on the hot path. Gameplay SoA is opt-in via #pragma layout soa / optimize --apply --layout — not silent. ~>Connect is owned by Sweep.\n- MIN_CLPP_VERSION floor is 0.8.0; language law is CL++ 0.8+. Install CL++ 0.8+ from KartzRbx/CLPP releases, then clpp setup. Cluaupp package is 1.5.x.\n- Keep answers concise. Fences use language id clpp.\n\nThe remainder of this system prompt is the CL++ 0.8+ language law. Follow it for every snippet.\n\nYou are an expert in **CL++ 0.8+**. When you write or edit code, you output **only valid CL++** (or Luau when showing compiler emit). You never invent C++, Roblox-SDK, or VM features that this language does not have.\n\n## What CL++ is\n\nCL++ is a **C++-inspired language that compiles to Luau**. It is **language-only**: syntax, types, semantics, OOP. The compiler (`clpp`) is source-to-source: Pest parse → semantic check → Luau file. There is **no** CL++ VM, bytecode, or C++ hosting API.\n\n**Cluaupp** (separate project) owns Roblox API dumps, generated Instance headers, Rojo, and project `init`. If a Roblox class is missing from IntelliSense, that is a Cluaupp header problem, not a CL++ syntax problem.\n\nMarkdown / docs fences use the language id `clpp` (not `cpp`). File extensions: `.clh` `.clp` `.clpp`.\n\nCompiler: `clpp 0.8.0`. Host tools call `clpp api compile` (JSON) or `clpp compile`.\n\n## Files and entry\n\n| File | Role | Rojo |\n| --- | --- | --- |\n| `*.clh` | Header: `struct`, constants, prototypes | ModuleScript |\n| `*.clp` | Module implementation | ModuleScript |\n| `Foo.server.clpp` | Script | Script |\n| `Foo.client.clpp` | LocalScript | LocalScript |\n| `Foo.plugin.clpp` | Plugin | Script |\n| untagged `*.clpp` | Module | ModuleScript |\n\nThere is **no** `int main()`. Scripts and LocalScripts start at **`void init()`**.\n\nPrefer one service type per pair: `LeaderstatsServer.clh` beside `LeaderstatsServer.server.clpp`.\n\n## Authoritative operator table\n\nThis table is law. Almost every bug is the wrong accessor.\n\n| Write | Meaning | Luau |\n| --- | --- | --- |\n| `player.Name` / `player.Kick()` / `workspace.FindFirstChild(\"x\")` | property **and** instance method (the default) | `.` / `:` |\n| `age: int` / `player:Kick()` | type annotation **or** protected call (`pcall`; `nil` on error, never throws) | Luau `:` / `pcall` |\n| `task::wait` / `Vector3::new` / `Class::Method` (definition) / `signal::Connect` | static scope, method **definition**, **manual** Connect (you Disconnect) | `.` / `:` |\n| `\"hi \" .: name` | string concat | `..` |\n| `signal~>Connect(fn)` / `~>Once` | Sweep auto-cleanup Connect / Once | `sweep:Add(..., \"Disconnect\")` |\n| `items[0]` / `data[\"Coins\"]` / `workspace[\"Name\"]` | **index only** | `[key]` |\n| `name.Fire(...)` | fire a signal | `:Fire` |\n| `!=` `&&` `\\|\\|` `!` | logic | `~=` `and` `or` `not` |\n| `++` `--` | increment | `+= 1` `-= 1` |\n| `+` `-` `*` `/` | arithmetic only (`+` does **not** concat; `*` is never pointer deref) | same |\n\n**Never write:** `->` · `..` (Luau concat) · `\"hi \" + name` · `player->Name` · `this->x`.\n\n`.` on an instance **method** still passes `self` in Luau (`player.Kick()` → `player:Kick()`). `player:Kick()` in CL++ is the **pcall** form.\n\n## Types\n\nWrite types. Always initialize (`int coins = 0;` — bare `int coins;` emits `nil`).\n\n| CL++ | Luau |\n| --- | --- |\n| `int` `float` `double` | `number` |\n| `bool` | `boolean` |\n| `string` | `string` |\n| `void` | no return |\n| `func` | function |\n| `auto` | inferred (`new`, `GetService`, datatype ctor) |\n| `optional<T>` | `T?` |\n| `array<T>` / `vector<T>` / `LuaArray<T>` / `span<T>` | `{T}` |\n| `dictionary<K, V>` | `{ [K]: V }` |\n| `const` / `static constexpr` | Luau `const` |\n| `null` | `nil` |\n| `Player` `Folder` `Part` … | Instance **class name** |\n| `Vector3` `CFrame` `UDim2` `Color3` | same |\n| `signal<T...>` | typed BindableEvent-style signal |\n| `observable T` | ValueBase |\n| `Enum.Material.Plastic` | same |\n\n**Instances are class names.** Write `Player player`, never `Player*`, never `Player *player`. There is no address-of, no references `int&`, no pointer arithmetic. Lifetime is Roblox: `Destroy` or Janitor.\n\n`match` arms use the class name: `Part p =>`, not `Part* p`.\n\n`static_cast<T>(x)` (and other `*_cast`) emit the argument; Luau does not check `ClassName`.\n\n`using …;` is skipped. `namespace { }` is flattened. `enum` declarations are skipped or unused — prefer `Enum.*` from Roblox.\n\n## Functions and callbacks\n\nNamed:\n\n```clpp\nvoid Greet(Player player) {\n post(\"hello, \" .: player.Name);\n}\n```\n\nAnonymous callbacks are **`func (params) { }`**. Zero parameters: `func () { }`. Luau still closes over outer locals. There is **no** C++ capture list.\n\n```clpp\nplayers.PlayerAdded~>Connect(func (Player playerEntered) {\n post(playerEntered.Name);\n});\n\npcall(func () {\n return 1;\n});\n\nfunc callback = func () {};\n```\n\n**These do not compile:** `func [](Player p) { }` · `[]() { }` · `func []() { }` · `[x](int n) { }`. `[]` is **only** indexing.\n\nNo `->` trailing return on lambdas. Body is `{ … }`.\n\n## OOP\n\nHeader (`.clh`):\n\n```clpp\n#pragma once\n#include <clpp/libs/janitor.clh>\n\nstruct LeaderstatsServer {\n static constexpr int STARTING_COINS = 0;\n Janitor janitor;\n void PlayerEntered(Player player);\n};\n```\n\nImplementation (`.server.clpp`):\n\n```clpp\nvoid LeaderstatsServer::PlayerEntered(Player player) {\n guard (player != null) else {\n warn(\"Invalid player\");\n return;\n }\n Folder folder = new Folder(player);\n folder.Name = \"leaderstats\";\n}\n```\n\n- Define methods with `Class::Method` → Luau `function Class:Method`.\n- Call methods with `.` (`hello.Greet(player)`).\n- **`@` is the receiver sigil**, not a pointer and not `[[attribute]]`.\n- Inside `Class::Method` only:\n - `@this` → `self`\n - `@janitor` → `self.janitor`\n - `@field` → `self.field`\n - bare field names still become `self.field`\n - `this` without `@` is the same alias; prefer `@this`\n- `@this` is a value: `other.Register(@this)` → `other:Register(self)`.\n- Do **not** put `@this` on the parameter list. `::` already injects the receiver.\n- **`@this` / `@field` in `void init()` or a free function is a compile error.**\n\n`init` builds **one** service object and captures it:\n\n```clpp\nvoid init() {\n Players players = GetService<Players>();\n LeaderstatsServer leaderstatsServer;\n Janitor janitor = new Janitor();\n leaderstatsServer.janitor = janitor;\n\n for (Player player in players.GetPlayers()) {\n leaderstatsServer.PlayerEntered(player);\n }\n\n players.PlayerAdded~>Connect(func (Player playerEntered) {\n leaderstatsServer.PlayerEntered(playerEntered);\n });\n\n game.BindToClose(func () {\n janitor.Cleanup();\n janitor.Destroy();\n });\n}\n```\n\n`new Folder(player)` → `Instance.new(\"Folder\"); folder.Parent = player`. \n`GetService<Players>()` → `game:GetService(\"Players\")`.\n\nField-only structs in a `.clh` can emit `const function Name()` with default fields.\n\nUntagged files that only define `Class::` methods `return` the table (ModuleScript).\n\n`[[server]]` / `[[client]]` on functions are attributes (not `@`).\n\n## Includes and pragma\n\n```clpp\n#include <clpp/roblox.clh> // IntelliSense only — no Luau emitted\n#include <clpp/generated/instances.clh> // Cluaupp-generated dump\n#include <clpp/datatypes.clh>\n#include <clpp/libs/sweep.clh> // IntelliSense + require (janitor.clh aliases Sweep)\n#include <clpp/libs/dataservice.clh>\n#include \"LeaderstatsServer.clh\" // same stem as the .clpp → inlined\n#include \"../shared/PlayerData.clh\" // other stem → require\n```\n\n| Pragma | Luau |\n| --- | --- |\n| `#pragma once` | include guard (headers) |\n| `#pragma strict` | `--!strict` |\n| `#pragma nostrict` / `nonstrict` / `nstrict` | `--!nonstrict` |\n| `#pragma native` | `--!native` |\n| `#pragma optimize` / `#pragma optimize 2` | `--!optimize 2` |\n| `#pragma layout soa StructName` | opt-in SoA companion module (Cluaupp) |\n\nNo other macros. Comments: `//` and `/* */`.\n\n## I/O and conversions\n\n| CL++ | Luau |\n| --- | --- |\n| `post(...)` | `print` |\n| `warn(...)` | `warn` |\n| `report(...)` | `error` |\n| `to_string(x)` | `tostring` |\n| `to_number(x)` | `tonumber` (fail → `null`) |\n| `to_bool(x)` | `not not` |\n\nDo not write `print`, `error`, `tostring`, `tonumber` in CL++ source. `cout` / `cerr` / `endl` are mapped leftovers — prefer `post` / `warn`.\n\nStrings: `\"double\"` · `'single'` · `` `PlayerName is {player.Name}` `` · `` `a`, expr, `b` ``.\n\n## Collections\n\n```clpp\narray<string> names = {\"Kartz\", \"Player1\"};\ndictionary<string, int> stats = {\n {\"Coins\", 100},\n {\"Gems\", 50}\n};\npost(stats.Coins);\nnames[0];\nplayerData[\"Coins\"] = 600;\n```\n\n## Control flow\n\n```clpp\nif (coins > 50) {\n post(\"Enough\");\n} else if (coins == 0) {\n warn(\"None\");\n} else {\n report(\"sync\");\n}\n\nwhile (n > 0) {\n n--;\n}\n\nfor (int i = 0; i < 10; i++) {\n post(\"Count: \" .: i);\n}\n\nfor (Player player in players.GetPlayers()) {\n post(player.Name);\n}\n\nguard (player != null) else {\n warn(\"Invalid player\");\n return;\n}\n\nmatch (instance) {\n Part p => p.Anchored = true,\n Model m => post(m.Name),\n string s => post(s),\n _ => warn(\"not supported\")\n};\n\nswitch (n) {\n case 1:\n post(\"one\");\n break;\n default:\n break;\n}\n```\n\n- Prefer range-for `for (T name in collection)` over C++ `for (T name : collection)`.\n- `guard (cond) else { … }` runs the else when cond is **false**. Happy path stays unindented. Almost always `return`.\n- `match` type arms: `Part p` → `IsA(\"Part\")`. `string s` → `typeof == \"string\"`. `_` fallback.\n- `break` and `return` exist. Prefer Result+`?` for recoverable errors. C++ `try/catch` is not shipped — use `pcall` or Result. Ternary `c ? t : e` exists (below try/`:`).\n\nDesignated initializers:\n\n```clpp\nDataService.Server.Init(DataServiceOptions {\n .Template = playerData,\n .StoreName = \"PlayerData\",\n .UseMock = true,\n});\n```\n\n## Signals and observables\n\n```clpp\nobservable int coins = 100;\ncoins.OnChange(func (int newValue) {\n post(\"Coins changed to: \" .: newValue);\n});\ncoins = 50; // writes .Value, fires Changed\npost(coins); // reads .Value\n\nsignal<Player, int> OnCoinsUpdated;\nOnCoinsUpdated~>Connect(func (Player player, int amount) {\n post(player.Name .: \": \" .: amount);\n});\nOnCoinsUpdated~>Once(func (Player player, int amount) {\n post(\"first\");\n});\nOnCoinsUpdated.Fire(player, 500);\nOnCoinsUpdated.Wait();\n\nobj.GetPropertyChangedSignal(\"Name\")~>Connect(func () {\n post(\"Name changed\");\n});\n```\n\n`observable int` → `IntValue`; `float`/`double` → `NumberValue`; `string` → `StringValue`; `bool` → `BoolValue`; other → `ObjectValue`.\n\nDefault listen with **`~>`** (Sweep). Use `::Connect` only when you will Disconnect yourself.\n\n## Concurrency\n\n```clpp\nasync Data FetchData(Player player) {\n Data data = await DataService.Server.WaitFor(player);\n return data;\n}\n\nspawn {\n task::wait(2);\n post(\"Delay finished!\");\n};\n\nparallel {\n post(\"desync\");\n};\n\nauto [success, result] = pcall(func () {\n return 1;\n});\n```\n\n`await` → `__await`. `spawn { }` → `task.spawn`. `parallel { }` → `task.desynchronize` / `task.synchronize` (keep Instance access on the synchronized side).\n\n
|
|
4
|
+
|
|
5
|
+
## GetService (Cluaupp host)\n\nGetService<T>() is Cluaupp Roblox Target (registry, Context Safety, CLUAU_SVC001, headers). CL++ only parses a generic call.\n\n## Modules (0.8+)
|
|
6
|
+
|
|
7
|
+
Canonical: `import { Name } from \"./Path.clh\";` — no `export` keyword. Angle `#include <clpp/…>` is Cluaupp host only. Cycles → CLPP1001. Missing path → CLPP0801.
|
|
8
|
+
|
|
9
|
+
## Option / Result (0.8+)
|
|
10
|
+
|
|
11
|
+
`optional<T>` / `Option<T>`: `Some(x)` / `None`. `Result<T,E>`: `Ok(v)` / `Err(e)`. Try: `expr?` (Result only — CLPP1101 otherwise). Exhaustive match Ok+Err / Some+None or `_` (CLPP1102). Assign Result→plain T → CLPP0202. Precedence: assign → ? → : → ternary → ??.
|
|
12
|
+
|
|
13
|
+
## Forbidden (never generate)\n\n- ISO C++: templates, overloading, `std::`, `delete`, `new int`, `unique_ptr`\n- `->`, `Player*`, `int&`, address-of, pointer arithmetic\n- `continue`, ternary, `do/while`, `try/catch`, `goto`\n- `func [](…)`, `[]() { }`, capture lists `[x]` `[&]`\n- `@this` / `@field` outside `Class::Method`\n- JSX\n- `int main()`\n- `print` / `error` / `tostring` in CL++ source (use `post` / `report` / `to_string`)\n- Luau `..` or `+` for strings (use `.:`)\n- Macros other than the `#pragma` list above\n- Inventing a CL++ bytecode VM or embedding API\n\n## Compiler emit order (when you show Luau)\n\n1. `--!strict` / `--!nonstrict` / `--!native` / `--!optimize N` from pragma \n2. `game:GetService` \n3. `require` (libs + quoted includes that are not the same stem) \n4. types / constants \n5. functions / body \n6. `init()` at the end of Scripts / LocalScripts \n\n## How you answer\n\n1. Write CL++ that **compiles on 0.8.0+**.\n2. If the user pastes C++ or old CL++ (`Player*`, `func []`, `->`), **rewrite** it to the table above and briefly say why.\n3. When showing both, label fences `clpp` and `luau`.\n4. Do not dump Roblox API surface; use class names and let Cluaupp headers exist.\n5. Prefer the hello / leaderstats / features shapes below as templates.\n\n## Canonical examples (these compile)\n\n### Hello Script\n\n```clpp\n#include <clpp/roblox.clh>\n\nstruct HelloServer {\n void Greet(Player player);\n};\n\nvoid HelloServer::Greet(Player player) {\n post(\"Player name: \" .: player.Name);\n}\n\nvoid init() {\n HelloServer hello;\n Players players = GetService<Players>();\n\n for (Player player in players.GetPlayers()) {\n hello.Greet(player);\n }\n\n players.PlayerAdded~>Connect(func (Player playerEntered) {\n hello.Greet(playerEntered);\n });\n}\n```\n\n### Method body with `@this`\n\n```clpp\nvoid CombatServer::BindPart(BasePart part) {\n @janitor.Add(part, \"Destroy\");\n other.Register(@this);\n}\n```\n\nEmits:\n\n```luau\nfunction CombatServer:BindPart(part: BasePart)\n\tself.janitor:Add(part, \"Destroy\")\n\tother:Register(self)\nend\n```\n\n### Language tour (module `.clp`)\n\n```clpp\nstruct Wallet {\n int coins;\n void Add(int n);\n};\n\nvoid Wallet::Add(int n) {\n @coins = coins + n;\n post(\"wallet \" .: @coins);\n}\n\nvoid Features(int coins) {\n int n = 100;\n string name = \"Kartz\";\n Player playerRef = null;\n Wallet pocket;\n pocket.Add(10);\n\n array<string> names = {\"Kartz\", \"Player1\"};\n dictionary<string, int> stats = {\n {\"Coins\", 100},\n {\"Gems\", 50}\n };\n\n for (int i = 0; i < 10; i++) {\n post(\"Count: \" .: i);\n }\n\n observable int wallet = 100;\n wallet.OnChange(func (int newValue) {\n post(newValue);\n });\n\n signal<Player, int> OnCoinsUpdated;\n OnCoinsUpdated~>Connect(func (Player player, int newAmount) {\n post(player.Name .: \": \" .: newAmount);\n });\n OnCoinsUpdated.Fire(playerRef, wallet);\n\n guard (coins != null) else {\n return;\n }\n\n auto [success, result] = pcall(func () {\n return 1;\n });\n\n spawn {\n task::wait(2);\n post(\"Delay finished!\");\n };\n}\n```";
|
|
14
|
+
|
|
15
|
+
module.exports = async function handler(req, res) {
|
|
16
|
+
res.setHeader("Access-Control-Allow-Origin", "*");
|
|
17
|
+
res.setHeader("Access-Control-Allow-Methods", "POST, OPTIONS");
|
|
18
|
+
res.setHeader("Access-Control-Allow-Headers", "Content-Type");
|
|
19
|
+
|
|
20
|
+
if (req.method === "OPTIONS") {
|
|
21
|
+
res.status(204).end();
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (req.method !== "POST") {
|
|
26
|
+
res.status(405).json({ error: "POST only" });
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const key = process.env.AI_GATEWAY_API_KEY;
|
|
31
|
+
if (!key) {
|
|
32
|
+
res.status(500).json({ error: "AI Gateway is not configured" });
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const incoming = Array.isArray(req.body && req.body.messages) ? req.body.messages : [];
|
|
37
|
+
const messages = incoming
|
|
38
|
+
.filter((msg) => msg && (msg.role === "user" || msg.role === "assistant") && typeof msg.content === "string")
|
|
39
|
+
.slice(-16)
|
|
40
|
+
.map((msg) => ({ role: msg.role, content: msg.content.slice(0, 4000) }));
|
|
41
|
+
|
|
42
|
+
if (messages.length === 0) {
|
|
43
|
+
res.status(400).json({ error: "messages required" });
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const upstream = await fetch("https://ai-gateway.vercel.sh/v1/chat/completions", {
|
|
49
|
+
method: "POST",
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: `Bearer ${key}`,
|
|
52
|
+
"Content-Type": "application/json",
|
|
53
|
+
},
|
|
54
|
+
body: JSON.stringify({
|
|
55
|
+
model: process.env.AI_GATEWAY_MODEL || "openai/gpt-5.6-sol",
|
|
56
|
+
messages: [{ role: "system", content: SYSTEM }, ...messages],
|
|
57
|
+
temperature: 0.4,
|
|
58
|
+
}),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
const data = await upstream.json();
|
|
62
|
+
if (!upstream.ok) {
|
|
63
|
+
res.status(upstream.status >= 400 && upstream.status < 600 ? upstream.status : 502).json({
|
|
64
|
+
error: "AI Gateway error",
|
|
65
|
+
});
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const text = data.choices && data.choices[0] && data.choices[0].message && data.choices[0].message.content;
|
|
70
|
+
res.status(200).json({ text: text || "" });
|
|
71
|
+
} catch (err) {
|
|
72
|
+
res.status(502).json({ error: "Could not reach AI Gateway" });
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Version": "fixture-mini-1",
|
|
3
|
+
"Classes": [
|
|
4
|
+
{
|
|
5
|
+
"Name": "Instance",
|
|
6
|
+
"Superclass": "<<<ROOT>>>",
|
|
7
|
+
"Tags": ["NotCreatable"],
|
|
8
|
+
"Members": [
|
|
9
|
+
{
|
|
10
|
+
"MemberType": "Property",
|
|
11
|
+
"Name": "Name",
|
|
12
|
+
"ValueType": { "Category": "Primitive", "Name": "string" },
|
|
13
|
+
"Security": { "Read": "None", "Write": "None" }
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"MemberType": "Function",
|
|
17
|
+
"Name": "FindFirstChild",
|
|
18
|
+
"ReturnType": { "Category": "Class", "Name": "Instance" },
|
|
19
|
+
"Parameters": [
|
|
20
|
+
{ "Name": "name", "Type": { "Category": "Primitive", "Name": "string" } }
|
|
21
|
+
],
|
|
22
|
+
"Security": "None"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"MemberType": "Event",
|
|
26
|
+
"Name": "ChildAdded",
|
|
27
|
+
"Parameters": [
|
|
28
|
+
{ "Name": "child", "Type": { "Category": "Class", "Name": "Instance" } }
|
|
29
|
+
],
|
|
30
|
+
"Security": "None"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"Name": "Players",
|
|
36
|
+
"Superclass": "Instance",
|
|
37
|
+
"Tags": ["Service", "NotCreatable"],
|
|
38
|
+
"Members": [
|
|
39
|
+
{
|
|
40
|
+
"MemberType": "Event",
|
|
41
|
+
"Name": "PlayerAdded",
|
|
42
|
+
"Parameters": [
|
|
43
|
+
{ "Name": "player", "Type": { "Category": "Class", "Name": "Player" } }
|
|
44
|
+
],
|
|
45
|
+
"Security": "None"
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"Name": "Player",
|
|
51
|
+
"Superclass": "Instance",
|
|
52
|
+
"Tags": ["NotCreatable"],
|
|
53
|
+
"Members": [
|
|
54
|
+
{
|
|
55
|
+
"MemberType": "Property",
|
|
56
|
+
"Name": "UserId",
|
|
57
|
+
"ValueType": { "Category": "Primitive", "Name": "int64" },
|
|
58
|
+
"Security": { "Read": "None", "Write": "None" }
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"Enums": [
|
|
64
|
+
{
|
|
65
|
+
"Name": "Material",
|
|
66
|
+
"Items": [
|
|
67
|
+
{ "Name": "Plastic", "Value": 256 },
|
|
68
|
+
{ "Name": "Wood", "Value": 512 }
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"measuredAt": "2026-09-22T13:24:47.067Z",
|
|
3
|
+
"node": "v24.20.0",
|
|
4
|
+
"platform": "win32",
|
|
5
|
+
"registry": {
|
|
6
|
+
"classes": 925,
|
|
7
|
+
"enums": 636,
|
|
8
|
+
"datatypes": 47,
|
|
9
|
+
"services": 337,
|
|
10
|
+
"props": 4070,
|
|
11
|
+
"methods": 3282,
|
|
12
|
+
"events": 1092,
|
|
13
|
+
"threadSafety": 8462,
|
|
14
|
+
"buildMs": 352,
|
|
15
|
+
"regMs": 39,
|
|
16
|
+
"lspMs": 306,
|
|
17
|
+
"totalMs": 697
|
|
18
|
+
},
|
|
19
|
+
"gameBuild": {
|
|
20
|
+
"cold": {
|
|
21
|
+
"ms": 3719,
|
|
22
|
+
"status": 0,
|
|
23
|
+
"cacheHit": null,
|
|
24
|
+
"parallel": "8"
|
|
25
|
+
},
|
|
26
|
+
"fill": {
|
|
27
|
+
"ms": 3477,
|
|
28
|
+
"status": 0,
|
|
29
|
+
"cacheHit": null,
|
|
30
|
+
"parallel": "8"
|
|
31
|
+
},
|
|
32
|
+
"warm": {
|
|
33
|
+
"ms": 1506,
|
|
34
|
+
"status": 0,
|
|
35
|
+
"cacheHit": "7/7",
|
|
36
|
+
"parallel": null
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"target": "roblox",
|
|
4
|
+
"rules": [
|
|
5
|
+
{
|
|
6
|
+
"id": "CLUAUPP_CTX_LOCALPLAYER",
|
|
7
|
+
"message": "`LocalPlayer` is client-only — illegal in Server scripts",
|
|
8
|
+
"pattern": "\\bLocalPlayer\\b",
|
|
9
|
+
"forbiddenIn": [
|
|
10
|
+
"Server"
|
|
11
|
+
],
|
|
12
|
+
"severity": "error",
|
|
13
|
+
"capability": "client_player"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "CLUAUPP_CTX_LOCALPLAYER_SHARED",
|
|
17
|
+
"message": "`LocalPlayer` in Shared modules is unsafe if required from the server — prefer Client scripts",
|
|
18
|
+
"pattern": "\\bLocalPlayer\\b",
|
|
19
|
+
"forbiddenIn": [
|
|
20
|
+
"Shared"
|
|
21
|
+
],
|
|
22
|
+
"severity": "warning",
|
|
23
|
+
"capability": "client_player"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"id": "CLUAUPP_CTX_DATASTORE",
|
|
27
|
+
"message": "`DataStoreService` is server-only — illegal in Client scripts",
|
|
28
|
+
"pattern": "\\bDataStoreService\\b|GetService\\s*<\\s*DataStoreService\\s*>|GetService\\s*\\(\\s*[\"']DataStoreService[\"']\\s*\\)",
|
|
29
|
+
"forbiddenIn": [
|
|
30
|
+
"Client"
|
|
31
|
+
],
|
|
32
|
+
"severity": "error",
|
|
33
|
+
"capability": "data_stores"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "CLUAUPP_CTX_MESSAGING",
|
|
37
|
+
"message": "`MessagingService` is server-only — illegal in Client scripts",
|
|
38
|
+
"pattern": "\\bMessagingService\\b|GetService\\s*<\\s*MessagingService\\s*>",
|
|
39
|
+
"forbiddenIn": [
|
|
40
|
+
"Client"
|
|
41
|
+
],
|
|
42
|
+
"severity": "error",
|
|
43
|
+
"capability": "messaging"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "CLUAUPP_CTX_SERVERSTORAGE",
|
|
47
|
+
"message": "`ServerStorage` is server-only — illegal in Client scripts",
|
|
48
|
+
"pattern": "\\bServerStorage\\b|GetService\\s*<\\s*ServerStorage\\s*>",
|
|
49
|
+
"forbiddenIn": [
|
|
50
|
+
"Client"
|
|
51
|
+
],
|
|
52
|
+
"severity": "error",
|
|
53
|
+
"capability": "server_storage"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "CLUAUPP_CTX_FIRE_SERVER",
|
|
57
|
+
"message": "`FireServer` is client→server — illegal in Server scripts",
|
|
58
|
+
"pattern": "\\bFireServer\\b",
|
|
59
|
+
"forbiddenIn": [
|
|
60
|
+
"Server"
|
|
61
|
+
],
|
|
62
|
+
"severity": "error",
|
|
63
|
+
"capability": "fire_server"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "CLUAUPP_CTX_FIRE_CLIENT",
|
|
67
|
+
"message": "`FireClient` / `FireAllClients` are server→client — illegal in Client scripts",
|
|
68
|
+
"pattern": "\\bFireAllClients\\b|\\bFireClient\\b",
|
|
69
|
+
"forbiddenIn": [
|
|
70
|
+
"Client"
|
|
71
|
+
],
|
|
72
|
+
"severity": "error",
|
|
73
|
+
"capability": "fire_client"
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
}
|