@greenpandastudios/aug-cli 0.19.0
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 +21 -0
- package/README.md +13 -0
- package/THIRD_PARTY_NOTICES.md +18 -0
- package/bin/aug.mjs +3 -0
- package/docs/api/crypto.md +351 -0
- package/docs/api/io.md +207 -0
- package/docs/api/json.md +21 -0
- package/docs/api/memory.md +109 -0
- package/docs/api/time.md +54 -0
- package/docs/api/web.md +184 -0
- package/docs/assets/benchmarks/execution.svg +2978 -0
- package/docs/assets/benchmarks/http.svg +1674 -0
- package/docs/assets/benchmarks/improvements.svg +2315 -0
- package/docs/assets/benchmarks/memory.svg +1891 -0
- package/docs/benchmark-baseline.json +1087 -0
- package/docs/benchmark-results.json +91123 -0
- package/docs/benchmarks.json +38 -0
- package/docs/compatibility.md +42 -0
- package/docs/concurrency-implementation.md +18 -0
- package/docs/diagnostics.md +97 -0
- package/docs/docker.md +35 -0
- package/docs/example-projects.json +26 -0
- package/docs/examples/approved-design/counters.md +253 -0
- package/docs/examples/approved-design/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/approved-design/domain/app.md +165 -0
- package/docs/examples/approved-design/domain/export.md +83 -0
- package/docs/examples/approved-design/domain/models.md +80 -0
- package/docs/examples/approved-design/domain/numbers.md +248 -0
- package/docs/examples/approved-design/index.md +39 -0
- package/docs/examples/approved-design/main-yaml.md +24 -0
- package/docs/examples/approved-design/main.md +215 -0
- package/docs/examples/benchmark/index.md +33 -0
- package/docs/examples/benchmark/main-yaml.md +17 -0
- package/docs/examples/benchmark/main.md +117 -0
- package/docs/examples/cli-args/index.md +32 -0
- package/docs/examples/cli-args/main.md +107 -0
- package/docs/examples/collections/index.md +32 -0
- package/docs/examples/collections/main.md +118 -0
- package/docs/examples/collections-benchmark/index.md +34 -0
- package/docs/examples/collections-benchmark/main.md +115 -0
- package/docs/examples/cpu-benchmark/index.md +34 -0
- package/docs/examples/cpu-benchmark/main.md +90 -0
- package/docs/examples/developer-workflow/calculator.md +357 -0
- package/docs/examples/developer-workflow/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/developer-workflow/index.md +37 -0
- package/docs/examples/developer-workflow/logging/console.md +124 -0
- package/docs/examples/developer-workflow/logging/export.md +70 -0
- package/docs/examples/developer-workflow/logging/logger.md +111 -0
- package/docs/examples/developer-workflow/main.md +172 -0
- package/docs/examples/drop/index.md +33 -0
- package/docs/examples/drop/main.md +85 -0
- package/docs/examples/drop/resource.md +95 -0
- package/docs/examples/errors/errors.md +85 -0
- package/docs/examples/errors/index.md +33 -0
- package/docs/examples/errors/main.md +92 -0
- package/docs/examples/ffi/index.md +33 -0
- package/docs/examples/ffi/main.md +75 -0
- package/docs/examples/ffi/native.md +93 -0
- package/docs/examples/generic-di/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/generic-di/index.md +33 -0
- package/docs/examples/generic-di/main.md +111 -0
- package/docs/examples/generic-di/types.md +180 -0
- package/docs/examples/generics/index.md +33 -0
- package/docs/examples/generics/main.md +120 -0
- package/docs/examples/generics/types.md +189 -0
- package/docs/examples/hello/app/export.md +67 -0
- package/docs/examples/hello/app/greeter.md +190 -0
- package/docs/examples/hello/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/hello/index.md +37 -0
- package/docs/examples/hello/logging/console.md +121 -0
- package/docs/examples/hello/logging/export.md +71 -0
- package/docs/examples/hello/logging/logger.md +120 -0
- package/docs/examples/hello/main.md +115 -0
- package/docs/examples/http-benchmark/index.md +35 -0
- package/docs/examples/http-benchmark/main.md +79 -0
- package/docs/examples/http-benchmark/routes.md +88 -0
- package/docs/examples/index.md +60 -0
- package/docs/examples/interceptors/app.md +250 -0
- package/docs/examples/interceptors/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/interceptors/index.md +35 -0
- package/docs/examples/interceptors/interceptors.md +284 -0
- package/docs/examples/interceptors/logging.md +155 -0
- package/docs/examples/interceptors/main.md +162 -0
- package/docs/examples/json-benchmark/data.md +71 -0
- package/docs/examples/json-benchmark/dependencies/august/0.19.0/json/contracts.md +103 -0
- package/docs/examples/json-benchmark/index.md +35 -0
- package/docs/examples/json-benchmark/main.md +131 -0
- package/docs/examples/new-syntax/console.md +118 -0
- package/docs/examples/new-syntax/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/new-syntax/greeter.md +145 -0
- package/docs/examples/new-syntax/index.md +36 -0
- package/docs/examples/new-syntax/logger.md +111 -0
- package/docs/examples/new-syntax/main.md +135 -0
- package/docs/examples/new-syntax/math.md +79 -0
- package/docs/examples/oidc-login/client/contracts.md +151 -0
- package/docs/examples/oidc-login/client/endpoints.md +263 -0
- package/docs/examples/oidc-login/client/export.md +107 -0
- package/docs/examples/oidc-login/client/login.md +515 -0
- package/docs/examples/oidc-login/client/logout.md +249 -0
- package/docs/examples/oidc-login/client/protocol.md +595 -0
- package/docs/examples/oidc-login/client/session.md +297 -0
- package/docs/examples/oidc-login/client/views.md +144 -0
- package/docs/examples/oidc-login/common/export.md +115 -0
- package/docs/examples/oidc-login/common/headers.md +162 -0
- package/docs/examples/oidc-login/common/keys.md +336 -0
- package/docs/examples/oidc-login/common/settings.md +116 -0
- package/docs/examples/oidc-login/common/views.md +103 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/contracts.md +925 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/jose.md +434 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/json/contracts.md +103 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/memory/store.md +374 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/time/contracts.md +150 -0
- package/docs/examples/oidc-login/dependencies/august/0.19.0/web/contracts.md +532 -0
- package/docs/examples/oidc-login/index.md +57 -0
- package/docs/examples/oidc-login/main-yaml.md +28 -0
- package/docs/examples/oidc-login/main.md +283 -0
- package/docs/examples/oidc-login/provider/authorization.md +457 -0
- package/docs/examples/oidc-login/provider/contracts.md +267 -0
- package/docs/examples/oidc-login/provider/credentials.md +148 -0
- package/docs/examples/oidc-login/provider/discovery.md +215 -0
- package/docs/examples/oidc-login/provider/export.md +131 -0
- package/docs/examples/oidc-login/provider/token.md +364 -0
- package/docs/examples/oidc-login/provider/userinfo.md +228 -0
- package/docs/examples/oidc-login/provider/views.md +137 -0
- package/docs/examples/ownership/counter.md +140 -0
- package/docs/examples/ownership/index.md +33 -0
- package/docs/examples/ownership/main.md +90 -0
- package/docs/examples/ownership-transfer/dependencies/august/0.19.0/io/contracts.md +395 -0
- package/docs/examples/ownership-transfer/index.md +33 -0
- package/docs/examples/ownership-transfer/main.md +125 -0
- package/docs/examples/ownership-transfer/resource.md +150 -0
- package/docs/examples/packages-app/dependencies/packages/@example/aug-math/0.1.0/arithmetic.md +117 -0
- package/docs/examples/packages-app/index.md +34 -0
- package/docs/examples/packages-app/main-yaml.md +18 -0
- package/docs/examples/packages-app/main.md +80 -0
- package/docs/examples/packages-math/aug-package-json.md +24 -0
- package/docs/examples/packages-math/index.md +36 -0
- package/docs/examples/packages-math/package-json.md +25 -0
- package/docs/examples/packages-math/src/arithmetic.md +121 -0
- package/docs/examples/packages-math/src/export.md +63 -0
- package/docs/examples/startup-benchmark/index.md +34 -0
- package/docs/examples/startup-benchmark/main.md +68 -0
- package/docs/examples/visibility/counter.md +142 -0
- package/docs/examples/visibility/index.md +33 -0
- package/docs/examples/visibility/main.md +96 -0
- package/docs/examples.json +47 -0
- package/docs/getting-started.md +5 -0
- package/docs/grammar.md +136 -0
- package/docs/implementation-map.md +106 -0
- package/docs/index.md +46 -0
- package/docs/language-conformance.md +30 -0
- package/docs/language-constructs.md +1461 -0
- package/docs/language-design-audit.md +147 -0
- package/docs/maintaining-docs.md +43 -0
- package/docs/packages.md +184 -0
- package/docs/performance.md +535 -0
- package/docs/production-readiness.md +39 -0
- package/docs/reference.md +361 -0
- package/docs/release-review.md +23 -0
- package/docs/releasing.md +79 -0
- package/docs/roadmap.md +13 -0
- package/docs/specifications.md +86 -0
- package/docs/testing.md +120 -0
- package/docs/tooling.md +197 -0
- package/docs/web-implementation-plan.md +39 -0
- package/docs/web-library-gaps.md +27 -0
- package/docs/web.md +197 -0
- package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/approved-design/.aug-spec/manifest.json +14 -0
- package/examples/approved-design/counters.aug +22 -0
- package/examples/approved-design/counters.aug.md +177 -0
- package/examples/approved-design/domain/app.aug +12 -0
- package/examples/approved-design/domain/app.aug.md +97 -0
- package/examples/approved-design/domain/export.aug +5 -0
- package/examples/approved-design/domain/export.aug.md +25 -0
- package/examples/approved-design/domain/models.aug +2 -0
- package/examples/approved-design/domain/models.aug.md +30 -0
- package/examples/approved-design/domain/numbers.aug +29 -0
- package/examples/approved-design/domain/numbers.aug.md +141 -0
- package/examples/approved-design/main.aug +26 -0
- package/examples/approved-design/main.aug.md +108 -0
- package/examples/approved-design/main.yaml +8 -0
- package/examples/benchmark/.aug-spec/manifest.json +7 -0
- package/examples/benchmark/main.aug +17 -0
- package/examples/benchmark/main.aug.md +43 -0
- package/examples/benchmark/main.yaml +1 -0
- package/examples/cli-args/.aug-spec/manifest.json +7 -0
- package/examples/cli-args/main.aug +15 -0
- package/examples/cli-args/main.aug.md +38 -0
- package/examples/collections/.aug-spec/manifest.json +7 -0
- package/examples/collections/main.aug +18 -0
- package/examples/collections/main.aug.md +43 -0
- package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/developer-workflow/.aug-spec/manifest.json +13 -0
- package/examples/developer-workflow/calculator.aug +55 -0
- package/examples/developer-workflow/calculator.aug.md +228 -0
- package/examples/developer-workflow/logging/console.aug +8 -0
- package/examples/developer-workflow/logging/console.aug.md +67 -0
- package/examples/developer-workflow/logging/export.aug +2 -0
- package/examples/developer-workflow/logging/export.aug.md +19 -0
- package/examples/developer-workflow/logging/logger.aug +6 -0
- package/examples/developer-workflow/logging/logger.aug.md +57 -0
- package/examples/developer-workflow/main.aug +25 -0
- package/examples/developer-workflow/main.aug.md +79 -0
- package/examples/drop/.aug-spec/manifest.json +8 -0
- package/examples/drop/main.aug +3 -0
- package/examples/drop/main.aug.md +35 -0
- package/examples/drop/resource.aug +8 -0
- package/examples/drop/resource.aug.md +44 -0
- package/examples/errors/.aug-spec/manifest.json +8 -0
- package/examples/errors/errors.aug +6 -0
- package/examples/errors/errors.aug.md +33 -0
- package/examples/errors/main.aug +7 -0
- package/examples/errors/main.aug.md +36 -0
- package/examples/ffi/.aug-spec/manifest.json +8 -0
- package/examples/ffi/main.aug +2 -0
- package/examples/ffi/main.aug.md +27 -0
- package/examples/ffi/native.aug +6 -0
- package/examples/ffi/native.aug.md +43 -0
- package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/generic-di/.aug-spec/manifest.json +10 -0
- package/examples/generic-di/main.aug +9 -0
- package/examples/generic-di/main.aug.md +49 -0
- package/examples/generic-di/types.aug +17 -0
- package/examples/generic-di/types.aug.md +124 -0
- package/examples/generics/.aug-spec/manifest.json +8 -0
- package/examples/generics/main.aug +9 -0
- package/examples/generics/main.aug.md +58 -0
- package/examples/generics/types.aug +19 -0
- package/examples/generics/types.aug.md +132 -0
- package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/hello/.aug-spec/manifest.json +14 -0
- package/examples/hello/app/export.aug +1 -0
- package/examples/hello/app/export.aug.md +17 -0
- package/examples/hello/app/greeter.aug +22 -0
- package/examples/hello/app/greeter.aug.md +109 -0
- package/examples/hello/logging/console.aug +7 -0
- package/examples/hello/logging/console.aug.md +65 -0
- package/examples/hello/logging/export.aug +2 -0
- package/examples/hello/logging/export.aug.md +19 -0
- package/examples/hello/logging/logger.aug +9 -0
- package/examples/hello/logging/logger.aug.md +59 -0
- package/examples/hello/main.aug +9 -0
- package/examples/hello/main.aug.md +49 -0
- package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/interceptors/.aug-spec/manifest.json +12 -0
- package/examples/interceptors/app.aug +28 -0
- package/examples/interceptors/app.aug.md +162 -0
- package/examples/interceptors/interceptors.aug +40 -0
- package/examples/interceptors/interceptors.aug.md +180 -0
- package/examples/interceptors/logging.aug +12 -0
- package/examples/interceptors/logging.aug.md +96 -0
- package/examples/interceptors/main.aug +22 -0
- package/examples/interceptors/main.aug.md +76 -0
- package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/new-syntax/.aug-spec/manifest.json +13 -0
- package/examples/new-syntax/console.aug +7 -0
- package/examples/new-syntax/console.aug.md +63 -0
- package/examples/new-syntax/greeter.aug +10 -0
- package/examples/new-syntax/greeter.aug.md +89 -0
- package/examples/new-syntax/logger.aug +6 -0
- package/examples/new-syntax/logger.aug.md +57 -0
- package/examples/new-syntax/main.aug +12 -0
- package/examples/new-syntax/main.aug.md +64 -0
- package/examples/new-syntax/math.aug +3 -0
- package/examples/new-syntax/math.aug.md +29 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug +73 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug.md +791 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug +68 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug.md +266 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug +6 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug.md +55 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug +45 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug.md +250 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug +11 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug.md +96 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug +58 -0
- package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug.md +420 -0
- package/examples/oidc-login/.aug-spec/manifest.json +40 -0
- package/examples/oidc-login/README.md +29 -0
- package/examples/oidc-login/client/contracts.aug +7 -0
- package/examples/oidc-login/client/contracts.aug.md +80 -0
- package/examples/oidc-login/client/endpoints.aug +21 -0
- package/examples/oidc-login/client/endpoints.aug.md +161 -0
- package/examples/oidc-login/client/export.aug +7 -0
- package/examples/oidc-login/client/export.aug.md +29 -0
- package/examples/oidc-login/client/login.aug +58 -0
- package/examples/oidc-login/client/login.aug.md +331 -0
- package/examples/oidc-login/client/logout.aug +18 -0
- package/examples/oidc-login/client/logout.aug.md +150 -0
- package/examples/oidc-login/client/protocol.aug +106 -0
- package/examples/oidc-login/client/protocol.aug.md +326 -0
- package/examples/oidc-login/client/session.aug +34 -0
- package/examples/oidc-login/client/session.aug.md +155 -0
- package/examples/oidc-login/client/views.aug +21 -0
- package/examples/oidc-login/client/views.aug.md +68 -0
- package/examples/oidc-login/common/export.aug +9 -0
- package/examples/oidc-login/common/export.aug.md +33 -0
- package/examples/oidc-login/common/headers.aug +11 -0
- package/examples/oidc-login/common/headers.aug.md +79 -0
- package/examples/oidc-login/common/keys.aug +37 -0
- package/examples/oidc-login/common/keys.aug.md +207 -0
- package/examples/oidc-login/common/settings.aug +4 -0
- package/examples/oidc-login/common/settings.aug.md +47 -0
- package/examples/oidc-login/common/views.aug +16 -0
- package/examples/oidc-login/common/views.aug.md +34 -0
- package/examples/oidc-login/main.aug +39 -0
- package/examples/oidc-login/main.aug.md +166 -0
- package/examples/oidc-login/main.yaml +12 -0
- package/examples/oidc-login/provider/authorization.aug +59 -0
- package/examples/oidc-login/provider/authorization.aug.md +264 -0
- package/examples/oidc-login/provider/contracts.aug +15 -0
- package/examples/oidc-login/provider/contracts.aug.md +193 -0
- package/examples/oidc-login/provider/credentials.aug +10 -0
- package/examples/oidc-login/provider/credentials.aug.md +64 -0
- package/examples/oidc-login/provider/discovery.aug +13 -0
- package/examples/oidc-login/provider/discovery.aug.md +133 -0
- package/examples/oidc-login/provider/export.aug +13 -0
- package/examples/oidc-login/provider/export.aug.md +41 -0
- package/examples/oidc-login/provider/token.aug +37 -0
- package/examples/oidc-login/provider/token.aug.md +223 -0
- package/examples/oidc-login/provider/userinfo.aug +26 -0
- package/examples/oidc-login/provider/userinfo.aug.md +104 -0
- package/examples/oidc-login/provider/views.aug +18 -0
- package/examples/oidc-login/provider/views.aug.md +63 -0
- package/examples/ownership/.aug-spec/manifest.json +8 -0
- package/examples/ownership/counter.aug +14 -0
- package/examples/ownership/counter.aug.md +85 -0
- package/examples/ownership/main.aug +4 -0
- package/examples/ownership/main.aug.md +38 -0
- package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
- package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
- package/examples/ownership-transfer/.aug-spec/manifest.json +10 -0
- package/examples/ownership-transfer/main.aug +9 -0
- package/examples/ownership-transfer/main.aug.md +63 -0
- package/examples/ownership-transfer/resource.aug +16 -0
- package/examples/ownership-transfer/resource.aug.md +89 -0
- package/examples/packages/README.md +15 -0
- package/examples/packages/app/.aug-spec/manifest.json +9 -0
- package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug +9 -0
- package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug.md +63 -0
- package/examples/packages/app/main.aug +2 -0
- package/examples/packages/app/main.aug.md +33 -0
- package/examples/packages/app/main.yaml +2 -0
- package/examples/packages/math/.aug-spec/manifest.json +8 -0
- package/examples/packages/math/README.md +3 -0
- package/examples/packages/math/aug-package.json +8 -0
- package/examples/packages/math/package.json +9 -0
- package/examples/packages/math/src/arithmetic.aug +8 -0
- package/examples/packages/math/src/arithmetic.aug.md +63 -0
- package/examples/packages/math/src/export.aug +1 -0
- package/examples/packages/math/src/export.aug.md +17 -0
- package/examples/visibility/.aug-spec/manifest.json +8 -0
- package/examples/visibility/counter.aug +14 -0
- package/examples/visibility/counter.aug.md +87 -0
- package/examples/visibility/main.aug +7 -0
- package/examples/visibility/main.aug.md +39 -0
- package/package.json +50 -0
- package/runtime/aug_crypto.c +121 -0
- package/runtime/aug_html.c +93 -0
- package/runtime/aug_http.c +829 -0
- package/runtime/aug_json.c +165 -0
- package/runtime/aug_runtime.c +792 -0
- package/runtime/aug_runtime.h +245 -0
- package/runtime/aug_tasks.c +172 -0
- package/runtime/aug_time.c +5 -0
- package/runtime/aug_values.c +80 -0
- package/scripts/bootstrap-native.mjs +121 -0
- package/scripts/native-dependencies.lock.json +65 -0
- package/scripts/native-home.mjs +11 -0
- package/src/actions.js +109 -0
- package/src/ast.js +19 -0
- package/src/builtins.js +93 -0
- package/src/checker.js +2896 -0
- package/src/cli.js +344 -0
- package/src/codegen.js +1159 -0
- package/src/config.js +149 -0
- package/src/continuation.js +110 -0
- package/src/di.js +24 -0
- package/src/documentation.js +27 -0
- package/src/editor.js +782 -0
- package/src/effects.js +29 -0
- package/src/fixes.js +222 -0
- package/src/formatter.js +296 -0
- package/src/freshness.js +154 -0
- package/src/help.js +212 -0
- package/src/html.js +27 -0
- package/src/http-policies.js +90 -0
- package/src/inference.js +16 -0
- package/src/interceptors.js +70 -0
- package/src/javadoc.js +67 -0
- package/src/lexer.js +199 -0
- package/src/libraries.js +31 -0
- package/src/lsp.js +180 -0
- package/src/native.js +144 -0
- package/src/navigation.js +162 -0
- package/src/openapi.js +220 -0
- package/src/ownership.js +232 -0
- package/src/package-manager.js +299 -0
- package/src/parser.js +1155 -0
- package/src/policies.js +130 -0
- package/src/project-init.js +19 -0
- package/src/project.js +292 -0
- package/src/schemas.js +62 -0
- package/src/semantic.js +255 -0
- package/src/spec.js +738 -0
- package/src/testing.js +186 -0
- package/src/types.js +10 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "counter.aug · Private state and helpers"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/visibility/counter.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `counter.aug`
|
|
13
|
+
|
|
14
|
+
[Private state and helpers](index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](main.md)
|
|
19
|
+
- [`counter.aug`](counter.md)
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
::::: example-compare
|
|
24
|
+
|
|
25
|
+
:::: example-code
|
|
26
|
+
|
|
27
|
+
## Code {#code}
|
|
28
|
+
|
|
29
|
+
::: code-group
|
|
30
|
+
|
|
31
|
+
```aug [Indentation]
|
|
32
|
+
interface ICounter:
|
|
33
|
+
label() returns string
|
|
34
|
+
Counter(mutable int value) implements ICounter:
|
|
35
|
+
_label() returns string:
|
|
36
|
+
return _prefix()
|
|
37
|
+
label() returns string:
|
|
38
|
+
return self._label()
|
|
39
|
+
_prefix() returns string:
|
|
40
|
+
return "count"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```aug [Braces]
|
|
44
|
+
interface ICounter {
|
|
45
|
+
label() returns string
|
|
46
|
+
}
|
|
47
|
+
Counter(mutable int value) implements ICounter {
|
|
48
|
+
_label() returns string {
|
|
49
|
+
return _prefix()
|
|
50
|
+
}
|
|
51
|
+
label() returns string {
|
|
52
|
+
return self._label()
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
_prefix() returns string {
|
|
56
|
+
return "count"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
:::
|
|
61
|
+
|
|
62
|
+
::::
|
|
63
|
+
|
|
64
|
+
:::: example-spec
|
|
65
|
+
|
|
66
|
+
## Compiled specification {#specification}
|
|
67
|
+
|
|
68
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
69
|
+
|
|
70
|
+
### In this file
|
|
71
|
+
|
|
72
|
+
- [`ICounter`](counter.md#symbol-ICounter) is an interface.
|
|
73
|
+
- [`Counter`](counter.md#symbol-Counter) is a class implementing `ICounter`.
|
|
74
|
+
- [`_prefix`](counter.md#symbol-_prefix) is a function returning `string`.
|
|
75
|
+
|
|
76
|
+
### `ICounter` {#symbol-ICounter}
|
|
77
|
+
|
|
78
|
+
[source](counter.md#code)
|
|
79
|
+
|
|
80
|
+
Interface.
|
|
81
|
+
|
|
82
|
+
#### `ICounter.label` {#symbol-ICounter.label}
|
|
83
|
+
|
|
84
|
+
[source](counter.md#code)
|
|
85
|
+
|
|
86
|
+
Returns: `string`.
|
|
87
|
+
|
|
88
|
+
Interface contract. A selected implementation supplies the behavior.
|
|
89
|
+
|
|
90
|
+
### `Counter` {#symbol-Counter}
|
|
91
|
+
|
|
92
|
+
[source](counter.md#code)
|
|
93
|
+
|
|
94
|
+
Behavioral class.
|
|
95
|
+
|
|
96
|
+
Satisfies [`ICounter`](counter.md#symbol-ICounter).
|
|
97
|
+
|
|
98
|
+
**Inputs**
|
|
99
|
+
|
|
100
|
+
- `value` (`int`) — required labeled input — stored as `value` and mutable.
|
|
101
|
+
|
|
102
|
+
#### `Counter._label` {#symbol-Counter._label}
|
|
103
|
+
|
|
104
|
+
[source](counter.md#code)
|
|
105
|
+
|
|
106
|
+
Private to its defining scope.
|
|
107
|
+
|
|
108
|
+
Returns: `string`.
|
|
109
|
+
|
|
110
|
+
**What it does**
|
|
111
|
+
|
|
112
|
+
- Return call [`_prefix`](counter.md#symbol-_prefix).
|
|
113
|
+
|
|
114
|
+
#### `Counter.label` {#symbol-Counter.label}
|
|
115
|
+
|
|
116
|
+
[source](counter.md#code)
|
|
117
|
+
|
|
118
|
+
Returns: `string`.
|
|
119
|
+
|
|
120
|
+
**What it does**
|
|
121
|
+
|
|
122
|
+
- Return call [`Counter._label`](counter.md#symbol-Counter._label) on `self`.
|
|
123
|
+
|
|
124
|
+
### `_prefix` {#symbol-_prefix}
|
|
125
|
+
|
|
126
|
+
[source](counter.md#code)
|
|
127
|
+
|
|
128
|
+
Private to its defining scope.
|
|
129
|
+
|
|
130
|
+
Returns: `string`.
|
|
131
|
+
|
|
132
|
+
**What it does**
|
|
133
|
+
|
|
134
|
+
- Return `"count"`.
|
|
135
|
+
|
|
136
|
+
### Shared language rules
|
|
137
|
+
|
|
138
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
139
|
+
|
|
140
|
+
::::
|
|
141
|
+
|
|
142
|
+
:::::
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Private state and helpers"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/visibility"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Private state and helpers
|
|
12
|
+
|
|
13
|
+
Keep underscore-prefixed implementation details inside their scope.
|
|
14
|
+
|
|
15
|
+
Read a file below to see its highlighted source and the Markdown produced by `aug spec`. Choose **Indentation** or **Braces** above the code. Both views describe the same checked program; your choice is kept when you open another file.
|
|
16
|
+
|
|
17
|
+
## Project files
|
|
18
|
+
|
|
19
|
+
- [`main.aug`](main.md)
|
|
20
|
+
- [`counter.aug`](counter.md)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## Try this project
|
|
24
|
+
|
|
25
|
+
From a repository checkout with August installed:
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
aug check examples/visibility
|
|
29
|
+
aug spec examples/visibility
|
|
30
|
+
aug run examples/visibility
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[Browse all examples](../index.md)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "main.aug · Private state and helpers"
|
|
3
|
+
generated: true
|
|
4
|
+
source: "examples/visibility/main.aug"
|
|
5
|
+
editLink: false
|
|
6
|
+
prev: false
|
|
7
|
+
next: false
|
|
8
|
+
outline: [2, 3]
|
|
9
|
+
pageClass: aug-example-page
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# `main.aug`
|
|
13
|
+
|
|
14
|
+
[Private state and helpers](index.md) · Source and specification
|
|
15
|
+
|
|
16
|
+
::: details Files in this project
|
|
17
|
+
|
|
18
|
+
- [`main.aug`](main.md)
|
|
19
|
+
- [`counter.aug`](counter.md)
|
|
20
|
+
|
|
21
|
+
:::
|
|
22
|
+
|
|
23
|
+
::::: example-compare
|
|
24
|
+
|
|
25
|
+
:::: example-code
|
|
26
|
+
|
|
27
|
+
## Code {#code}
|
|
28
|
+
|
|
29
|
+
::: code-group
|
|
30
|
+
|
|
31
|
+
```aug [Indentation]
|
|
32
|
+
import Counter from counter
|
|
33
|
+
counter = Counter(value=1)
|
|
34
|
+
print(value=counter.label())
|
|
35
|
+
borrow counter:
|
|
36
|
+
counter.value = 2
|
|
37
|
+
print(value=counter.value)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```aug [Braces]
|
|
41
|
+
import Counter from counter
|
|
42
|
+
counter = Counter(value=1)
|
|
43
|
+
print(value=counter.label())
|
|
44
|
+
borrow counter {
|
|
45
|
+
counter.value = 2
|
|
46
|
+
}
|
|
47
|
+
print(value=counter.value)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
:::
|
|
51
|
+
|
|
52
|
+
::::
|
|
53
|
+
|
|
54
|
+
:::: example-spec
|
|
55
|
+
|
|
56
|
+
## Compiled specification {#specification}
|
|
57
|
+
|
|
58
|
+
August 0.19.0. This document is compiled from checked code with deterministic wording guided by Simplified Technical English.
|
|
59
|
+
|
|
60
|
+
### In this file
|
|
61
|
+
|
|
62
|
+
- Run 4 other startup steps in source order.
|
|
63
|
+
|
|
64
|
+
### Startup, in source order
|
|
65
|
+
|
|
66
|
+
- Set `counter` to call [`Counter`](counter.md#symbol-Counter) with `value` = `1`.
|
|
67
|
+
- Call `print` with `value` = call [`Counter.label`](counter.md#symbol-Counter.label) on `counter`.
|
|
68
|
+
- Grant exclusive mutable access to `counter` for this block, then end the borrow:
|
|
69
|
+
- Set `value` of `counter` to `2`.
|
|
70
|
+
- Call `print` with `value` = `value` of `counter`.
|
|
71
|
+
|
|
72
|
+
### Dependencies used by this file
|
|
73
|
+
|
|
74
|
+
Only referenced types and operations appear here. Each name links to its complete specification.
|
|
75
|
+
|
|
76
|
+
#### [`Counter`](counter.md#symbol-Counter)
|
|
77
|
+
|
|
78
|
+
Class from `counter`.
|
|
79
|
+
|
|
80
|
+
- Construct with `value`: `int` → [`Counter`](counter.md#symbol-Counter).
|
|
81
|
+
- Read `value` (`int`); its owner can change it.
|
|
82
|
+
- [`Counter.label`](counter.md#symbol-Counter.label) (no caller inputs) → `string`.
|
|
83
|
+
|
|
84
|
+
### Built-in operations used by this file
|
|
85
|
+
|
|
86
|
+
- `print` (`value`: `any`) → `void`: Composition and test output. Other callables receive Console and declare uses console.write.
|
|
87
|
+
|
|
88
|
+
[Full built-in reference](https://greenpandastudios.github.io/augscript/language-constructs).
|
|
89
|
+
|
|
90
|
+
### Shared language rules
|
|
91
|
+
|
|
92
|
+
See the [language reference](https://greenpandastudios.github.io/augscript/reference) for numeric, equality, ownership, and task rules.
|
|
93
|
+
|
|
94
|
+
::::
|
|
95
|
+
|
|
96
|
+
:::::
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"readme": {
|
|
3
|
+
"stdout": "4\n"
|
|
4
|
+
},
|
|
5
|
+
"quickstart": {
|
|
6
|
+
"stdout": "Hello, AugScript!\n"
|
|
7
|
+
},
|
|
8
|
+
"generics-guide": {
|
|
9
|
+
"stdout": "item\nitem\n"
|
|
10
|
+
},
|
|
11
|
+
"state-guide": {
|
|
12
|
+
"stdout": "6\n"
|
|
13
|
+
},
|
|
14
|
+
"data-guide": {
|
|
15
|
+
"stdout": "true\n1\npear\napple\npear\nmissing\n"
|
|
16
|
+
},
|
|
17
|
+
"capabilities-guide": {
|
|
18
|
+
"stdout": "Dependencies are visible\n"
|
|
19
|
+
},
|
|
20
|
+
"errors-guide": {
|
|
21
|
+
"stdout": "No configuration available\n"
|
|
22
|
+
},
|
|
23
|
+
"interceptors-guide": {
|
|
24
|
+
"stdout": "answer\n"
|
|
25
|
+
},
|
|
26
|
+
"testing-guide": {
|
|
27
|
+
"stdout": "3\n",
|
|
28
|
+
"tests": 4
|
|
29
|
+
},
|
|
30
|
+
"class-testing-guide": {
|
|
31
|
+
"stdout": "1\n",
|
|
32
|
+
"tests": 2
|
|
33
|
+
},
|
|
34
|
+
"ffi-guide": {
|
|
35
|
+
"stdout": "Hello from C\n"
|
|
36
|
+
},
|
|
37
|
+
"spec-guide": {"stdout":"21\n"},
|
|
38
|
+
"benchmark-startup": {"stdout":"7\n"},
|
|
39
|
+
"benchmark-cpu": {"stdout":"819677333\n"},
|
|
40
|
+
"benchmark-collections": {"stdout":"599970000\ntrue\n"},
|
|
41
|
+
"benchmark-json": {"stdout":"250000\n"},
|
|
42
|
+
"benchmark-http": {"buildOnly":true},
|
|
43
|
+
"web-guide": {
|
|
44
|
+
"buildOnly": true,
|
|
45
|
+
"tests": 3
|
|
46
|
+
}
|
|
47
|
+
}
|
package/docs/grammar.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Grammar and line boundaries
|
|
2
|
+
|
|
3
|
+
This is the compact accepted grammar for 0.19. `Name` is an identifier, and bracketed grammar groups below are optional. These text blocks describe syntax rather than executable snippets.
|
|
4
|
+
|
|
5
|
+
## Blocks and declarations
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Block := "{" Statements "}"
|
|
9
|
+
| ":" NEWLINE INDENT Statements DEDENT
|
|
10
|
+
|
|
11
|
+
Function := [Tags] ["fixture"] Name [Generics] "(" Parameters ")"
|
|
12
|
+
["returns" ["own"] Type] ["changes" Paths]
|
|
13
|
+
["uses" Paths] ["unless" Types] (Block | End)
|
|
14
|
+
|
|
15
|
+
Class := [Tags] Name [Generics] ["(" Fields ")"]
|
|
16
|
+
"implements" Type {"," Type} ClassBlock
|
|
17
|
+
ClassBlock := BlockOfFieldsAndMethodsWithOptionalInitialize
|
|
18
|
+
Initialize := "initialize" Block
|
|
19
|
+
|
|
20
|
+
Record := "record" Name [Generics] "(" Fields ")"
|
|
21
|
+
["unless" Types] [BlockOfInitialize]
|
|
22
|
+
|
|
23
|
+
Interface := ("interface" | "capability") Name [Generics]
|
|
24
|
+
["extends" Type {"," Type}] Block
|
|
25
|
+
|
|
26
|
+
Interceptor := "interceptor" Name [Generics] ["(" ResolveFields ")"] Block
|
|
27
|
+
Composition := "composition" Name BlockOfBindings
|
|
28
|
+
Endpoint := [Tags] "endpoint" HttpMethod String "as" Name "(" Parameters ")"
|
|
29
|
+
("returns" Type | "streams" Type) ["uses" Paths]
|
|
30
|
+
["unless" Type ["with status" Integer] {"and" Type ["with status" Integer]}]
|
|
31
|
+
["with status" Integer] Block
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
An interface/class/interceptor block contains method declarations. A record ends after its header or validation block and has no behavior body. A function's absent returns clause means void. Its body is required for calls, except extern C. There is no class or function prefix.
|
|
35
|
+
|
|
36
|
+
The implements clause identifies a class. Its initialize block appears inside the class before methods, and runs after field initialization. Records can contain one initialize block for validation. Nested function declarations are not supported. A root `counter()` statement is a call, not a declaration.
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
Generics := "<" Generic {"," Generic} ">"
|
|
40
|
+
Generic := ["in" | "out"] Name ["implements" Type {"and" Type}]
|
|
41
|
+
Type := ["optional"] Name ["<" Types ">"]
|
|
42
|
+
Parameter := ["resolve"] ["mutable"] ["own" | "borrow"] Type Label ["to" Storage]
|
|
43
|
+
["from" WireSource [String]]
|
|
44
|
+
Types := Type {("and" | ",") Type}
|
|
45
|
+
Paths := Path {("and" | ",") Path}
|
|
46
|
+
Tags := {"[" Name ["<" Types ">"] ["(" Mappings ")"] "]"}
|
|
47
|
+
Mapping := AroundLabel ("=" | "to") TargetLabel
|
|
48
|
+
PolicyOption := Name ("=" | "to") (TargetLabel | Literal | ListOfStringLiterals)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Variance is accepted only on interfaces; mutable storage applies to class headers. Resolve cannot be combined with own/borrow. General parameters still use Type name order. Public labels and private storage are explicit in headers.
|
|
52
|
+
|
|
53
|
+
## Imports, bindings, and calls
|
|
54
|
+
|
|
55
|
+
```text
|
|
56
|
+
Import := "import" (Name {"and" Name} | "everything") "from" DottedPath End
|
|
57
|
+
Export := "export" Name "from" SiblingName End
|
|
58
|
+
| "export" "folder" ChildName End
|
|
59
|
+
Binding := "implement" Key ["<" Types ">"] "with" Type
|
|
60
|
+
["shared" | "fresh" | "scoped"] ["mutable"] End
|
|
61
|
+
Include := "include" Name End
|
|
62
|
+
CallInput := Label ("=" | "to") Expression | Name
|
|
63
|
+
Assignment := [["own" | "borrow"] Type] Target ("=" | "to") Expression End
|
|
64
|
+
Resolve := "resolve" Key ["<" Types ">"] "to" Name End
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The formatter uses implement/with and resolve/to, and preserves wildcard imports. Assignment style remains a project preference. Repeated paths/errors can use and or comma; canonical error clauses use and. Collection constructor elements are positional because their order carries meaning. Assert also accepts its single bool positionally.
|
|
68
|
+
|
|
69
|
+
## Control flow and tests
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
Statement := Assignment | Expression End | "pass" End
|
|
73
|
+
| "return" [Expression] End | "throw" Expression End
|
|
74
|
+
| "if" Expression Block ["else" (Block | If)]
|
|
75
|
+
| "while" Expression Block
|
|
76
|
+
| "for" Pattern "in" Expression Block
|
|
77
|
+
| Pattern ("=" | "to") Expression End
|
|
78
|
+
| "match" Expression BlockOfCases
|
|
79
|
+
| "try" Block {"catch" Type Name Block}
|
|
80
|
+
["always" Block]
|
|
81
|
+
| "borrow" Name Block | "unsafe" Block | "scope" Block
|
|
82
|
+
| "lock" Expression "as" Name Block
|
|
83
|
+
| "freeze" Expression "as" Name End
|
|
84
|
+
| "yield" Expression End
|
|
85
|
+
| "serve" Name {"and" Name} "on port" Expression End
|
|
86
|
+
|
|
87
|
+
Pattern := Name | "(" Name {"," Name} [","] ")"
|
|
88
|
+
MatchCase := "when" ("null" | "some" Name | "true" | "false" | Type Name) Block
|
|
89
|
+
| "else" Block
|
|
90
|
+
|
|
91
|
+
Test := "test" LocalFunction BlockOfGroups
|
|
92
|
+
| "test" LocalClassType SubjectName BlockOfGroups
|
|
93
|
+
| "test endpoint" LocalEndpoint ClientName BlockOfGroups
|
|
94
|
+
Group := "when" TestName BlockOfSetupAndCases
|
|
95
|
+
Case := "it" TestName ["for" Pattern "in" ListOfTupleRows] Block
|
|
96
|
+
TestName := Identifier | String
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Setup bindings precede setup statements, which precede cases. Empty bodies use pass. Includes are composition/setup operations; declarations and setup ordering are checked beyond parsing.
|
|
100
|
+
|
|
101
|
+
Optional values have two cases: null and some. Omitted inputs become null. Type? and missing are obsolete spellings; use optional Type and null. Old matches with separate missing and null branches require one merged null branch.
|
|
102
|
+
|
|
103
|
+
## Expressions and ambiguity
|
|
104
|
+
|
|
105
|
+
| Spelling | Meaning |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| `[a, b]` | List literal. |
|
|
108
|
+
| `(a, b)`, `(a,)`, `()` | Tuple literals. |
|
|
109
|
+
| `(a)` | Grouping. |
|
|
110
|
+
| `{a, b}` | Set literal. |
|
|
111
|
+
| `{key: value}` | Map literal. |
|
|
112
|
+
| `{}` | Empty Set or Map determined by context. |
|
|
113
|
+
| `[Validator] header...` | Interceptor annotation on a declaration. |
|
|
114
|
+
| `receiver.member(label=value)` | Labeled method call. |
|
|
115
|
+
| `receiver.member(value)` | Same-name label shorthand when value is a name. |
|
|
116
|
+
| `start load(input=value)` | A scope-owned task. |
|
|
117
|
+
| `wait for first and second` | Ordered task results. |
|
|
118
|
+
| `wait for tasks` | Ordered collection of results. |
|
|
119
|
+
| `handle save(input from form)` | A checked deferred HTTP form action. |
|
|
120
|
+
| `<Panel title={name}>...</Panel>` | Checked server component producing Html. |
|
|
121
|
+
|
|
122
|
+
Operators from high to low precedence: member/call, unary minus, multiplication/division, addition/subtraction, ordered comparisons, equality, not, and, or. Thus `not count == 0` means `not (count == 0)`. Boolean operations short-circuit from left to right. Only the word spellings are accepted; `&&`, `||`, and unary `!` are syntax errors. `!=` remains accepted. Binary operators associate left. No assignment expression or implicit truthiness is supported. Exponentiation, remainder, and implicit casts are absent.
|
|
123
|
+
|
|
124
|
+
Function contract clauses may appear in any order, once each; the formatter writes returns, changes, uses, then unless. Storage aliases apply to class/record/interceptor fields rather than ordinary function parameters.
|
|
125
|
+
|
|
126
|
+
## Newlines, indentation, and comments
|
|
127
|
+
|
|
128
|
+
- A newline outside delimiters ends a complete statement. EOF and a closing block brace also end it; semicolons may separate same-line statements.
|
|
129
|
+
- An unfinished operator continues onto the next line. Parentheses, lists, tuples, sets, and maps continue until their matching delimiter.
|
|
130
|
+
- A leading operator or call parenthesis on a new line begins a new statement.
|
|
131
|
+
- A colon for a block is followed by a newline and increased indentation. A colon inside a Map literal separates key/value and creates no indentation block.
|
|
132
|
+
- Tabs and spaces are both valid. Mixed characters in one prefix, inconsistent sibling levels, extra unrequested indentation, or a dedent that matches no ancestor are errors.
|
|
133
|
+
- Blank lines and comment-only lines do not alter indentation. // line comments and /* block comments */ are supported.
|
|
134
|
+
- Return expressions begin on the return line; use parentheses to continue one.
|
|
135
|
+
|
|
136
|
+
The parser owns these rules. The formatter reparses and compares program structure before offering an edit, preserving comments while choosing the project's block and assignment styles.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Approved language changes — 0.15
|
|
2
|
+
|
|
3
|
+
## 0.19 additions
|
|
4
|
+
|
|
5
|
+
Deterministic adjacent source specs, used dependency surfaces with offline links, optional comment requirements, source-package specs, and VS Code preview/generation are described in [compiled specifications](specifications.md). Boolean operators use only `and`, `or`, and `not`; construction uses `initialize` inside declarations. DI uses `implement … with …` and `resolve … to …`; migration is available through the CLI and editor.
|
|
6
|
+
|
|
7
|
+
## 0.18 additions
|
|
8
|
+
|
|
9
|
+
- User-authored source packages, public export boundaries, exact npm aliases/local snapshots, transitive dependency scopes and frozen locks are implemented. See [the author/consumer guide](packages.md).
|
|
10
|
+
- Class implementations and private helpers infer capability effects while interface/public function contracts, mutation and checked errors remain explicit. Hover, explain and generated API docs expose inference.
|
|
11
|
+
- [Performance graphs](performance.md) compare verified C/Node/Python workloads, memory and real HTTP throughput. Scaling and lifecycle gaps remain recorded; the measurements do not establish general production readiness.
|
|
12
|
+
- Native scalar lowering retains wrapping integers and checked division, with scalar-only temporaries outside GC roots. Map/Set insertions reuse probes, destructured Map iteration copies fields without per-entry tuple allocation, and HTTP service drains bounded ready batches with coalesced I/O notifications. Behavioral regressions cover generic/default methods, GC, collection mutation and the existing HTTP pipeline.
|
|
13
|
+
|
|
14
|
+
The original 0.15 map below records the earlier audit delivery.
|
|
15
|
+
|
|
16
|
+
The September 28 audit recommendations and optional indentation blocks are approved. This map records the delivered implementation, accepted spelling, evidence, and practical limits.
|
|
17
|
+
|
|
18
|
+
## Syntax
|
|
19
|
+
|
|
20
|
+
- [x] Colon-led blocks with tabs or spaces, interchangeable with braces; ambiguous indentation rejected and literal braces retained.
|
|
21
|
+
- [x] Canonical formatter, named-import expansion, declaration diagnostics, and [compact grammar](grammar.md).
|
|
22
|
+
- [x] Immutable records and public constructor labels distinct from private storage.
|
|
23
|
+
- [x] Snapshot iteration, tuple destructuring, and checked matching.
|
|
24
|
+
|
|
25
|
+
Accepted forms: `if ready:`, `record Point(int x, int y)`, `Counter(mutable int initial to _count) implements Count`, `for (key, value) in map`, and `match value: when null: ... when some item: ...`. Class initialization uses an internal `initialize` block. The formatter verifies parsed structure and preserves declaration documentation and wildcard imports.
|
|
26
|
+
|
|
27
|
+
## Compiler contracts
|
|
28
|
+
|
|
29
|
+
- [x] Generic invariance, conflict-aware concrete inference, constraints, and checked interface variance.
|
|
30
|
+
- [x] Null narrowing and ownership flow across aliases, nested references, injected call results, branches, and loop re-entry.
|
|
31
|
+
- [x] Pure defaults, changes/uses contracts, interface/interceptor checks, and read-only public/reference access.
|
|
32
|
+
- [x] Header dependencies, pure construction, complete DI graphs, explicit lifetimes/scopes, and shared mutation choices.
|
|
33
|
+
- [x] Recoverable index/arithmetic/conversion failures, specific error contracts, and recovery/propagation fixes.
|
|
34
|
+
|
|
35
|
+
Accepted forms: `read<T implements Named>(T value)`, `interface Producer<out T>`, `increment() changes self`, `save(resolve FileWriter files) uses files.write unless FileError`, `implement Counter with CounterImpl scoped mutable`, and `scope:`.
|
|
36
|
+
|
|
37
|
+
Stateful DI defaults to fresh; stateless adapters default to shared. Shared state needs shared mutable. Scope requirements propagate through factories; scoped references cannot escape and shared objects cannot retain them. Local cleanup cannot add effects/errors through layers. Calls forward declared dependencies rather than looking up global services.
|
|
38
|
+
|
|
39
|
+
## Modules and context
|
|
40
|
+
|
|
41
|
+
- [x] Import cycles, allowed folder edges, strict sibling surfaces, and optional module/public/wildcard/error lints.
|
|
42
|
+
- [x] Immutable semantic documents and shared built-in/type/inference contracts.
|
|
43
|
+
- [x] Deep seams for dependency ordering, ownership flow, effects, continuation analysis, and interceptor lowering.
|
|
44
|
+
- [x] Explain/context output with provenance, effects, layers, tests, lifetimes, bounded source context, and architecture deltas.
|
|
45
|
+
- [x] Documentation-tag validation, optional public docs warnings, and compiler-checked executable guides.
|
|
46
|
+
- [x] Persistent incremental LSP and local checking while main composition is unfinished.
|
|
47
|
+
|
|
48
|
+
`main.yaml` configures module_dependencies, strict_modules, lint, and formatter preferences. Explain/context accepts --file, --name, --budget, and --baseline. The VS Code commands display current-file contracts/context beside the source.
|
|
49
|
+
|
|
50
|
+
### Compiler navigation
|
|
51
|
+
|
|
52
|
+
| Module | Owned decision |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| [types.ts](../src/types.ts), [inference.ts](../src/inference.ts) | Type identities and consistent generic unification. |
|
|
55
|
+
| [builtins.ts](../src/builtins.ts) | Built-in labels, types, mutability, errors, docs, and native operation names. |
|
|
56
|
+
| [ownership.ts](../src/ownership.ts), [freshness.ts](../src/freshness.ts) | Object origins, loans, escape, joins, and conservative freshness. |
|
|
57
|
+
| [effects.ts](../src/effects.ts) | Declared mutation/capability contract resolution. |
|
|
58
|
+
| [di.ts](../src/di.ts), [policies.ts](../src/policies.ts) | Graph ordering/cycle paths and module/documentation policy. |
|
|
59
|
+
| [continuation.ts](../src/continuation.ts), [interceptors.ts](../src/interceptors.ts) | At-most-once next analysis, written layer order, input/dependency mapping, and ownership-transfer layout. |
|
|
60
|
+
| [semantic.ts](../src/semantic.ts), [documentation.ts](../src/documentation.ts) | Checked scopes/contracts/provenance and inherited callable documentation. |
|
|
61
|
+
| [lsp.ts](../src/lsp.ts) | Versioned document transport and cached import-closure checks. |
|
|
62
|
+
| [formatter.ts](../src/formatter.ts) | Canonical syntax, comment ownership, and parsed-program equivalence. |
|
|
63
|
+
| [native.ts](../src/native.ts), [config.ts](../src/config.ts) | Native compiler invocation, mapped diagnostics, coverage, timing, and config validation. |
|
|
64
|
+
|
|
65
|
+
The checker coordinates these modules and still owns core type/body checking. Editor locals come from checked scopes rather than a second syntax-based inference implementation.
|
|
66
|
+
|
|
67
|
+
## Testing and native runtime
|
|
68
|
+
|
|
69
|
+
- [x] Same-file function/class suites, independently executed parameter rows, explicit fixtures/compositions, and native coverage.
|
|
70
|
+
- [x] Numeric widths/wrapping, Unicode/NUL behavior, FFI widths, and checked conversion.
|
|
71
|
+
- [x] Check-time config validation, source-mapped native diagnostics, pinned package manifests/lockfiles.
|
|
72
|
+
- [x] Native benchmark workload/report, source metadata, and LLDB adapter/terminal integration.
|
|
73
|
+
|
|
74
|
+
Accepted forms: `test add:`, `it adds for (left, right, expected) in [(1, 2, 3)]:`, `fixture seven() returns int:`, and `include TestServices` in setup. Coverage is statement-line coverage of the compiled test closure.
|
|
75
|
+
|
|
76
|
+
The C boundary uses int64_t for int and checked 32-bit C int for c_int. Text is UTF-8 without NUL. [Benchmark measurements](benchmarks.json) include startup and identify the environment.
|
|
77
|
+
|
|
78
|
+
## Audit coverage
|
|
79
|
+
|
|
80
|
+
| Findings | Delivered solution |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| 1, 5, 6, 7, 9 | Pure defaults; declared mutation/capabilities; explicit adapters; pure construction; effective layer contracts. |
|
|
83
|
+
| 2, 3, 4 | Stateful fresh defaults; explicit shared/scoped choices; header DI; complete construction graph and dependency fixes. |
|
|
84
|
+
| 8, 16, 17, 20 | Read-only storage; immutable records; iteration/destructuring/match; public labels/private storage. |
|
|
85
|
+
| 10, 11, 12, 13, 14, 15 | Ownership/null flow; invariance/variance/constraints/inference; checked runtime failures and specific recovery/propagation. |
|
|
86
|
+
| 18, 19, 21, 22, 23 | Named-import expansion; public/module policy; architecture deltas; canonical syntax and precise grammar diagnostics. |
|
|
87
|
+
| 24, 26 | Function/row suites, imported fixtures/compositions, coverage, checked docs, and executable guides. |
|
|
88
|
+
| 25, 27, 28, 29 | Resolved semantics and provenance; shared registries; deep compiler seams; bounded context and cached persistent LSP. |
|
|
89
|
+
| 30 | Defined numeric/text/ABI behavior; config/native diagnostics; benchmark evidence; source maps/debug launch; pinned dependencies. |
|
|
90
|
+
|
|
91
|
+
## Verification
|
|
92
|
+
|
|
93
|
+
- [x] All 16 bundled projects migrated, checked, formatted idempotently, and run natively; their six built-in cases pass.
|
|
94
|
+
- [x] Eleven complete guide projects compile/run, with six documented test cases and unchanged native behavior after formatting.
|
|
95
|
+
- [x] Regressions cover successful and rejected contracts, versioned LSP caching, concrete quick-fix edits, zero-count coverage, source diagnostics, and cleanup paths.
|
|
96
|
+
- [x] Final TypeScript/compiler gate: type checking and all 156 regression tests pass.
|
|
97
|
+
|
|
98
|
+
The VS Code release is 0.15.0. Its package includes the compiler, runtime, source examples, and these guides; build artifacts are excluded. Use the repository packaging/install commands in README.md.
|
|
99
|
+
|
|
100
|
+
### Current limits
|
|
101
|
+
|
|
102
|
+
Ownership and short-circuit descriptions are conservative analyses rather than formal proofs. The LSP caches parsed modules and checked import closures, not individual expressions. Coverage counts statement lines, not branches; startup is excluded from tests.
|
|
103
|
+
|
|
104
|
+
LLDB resolves AugScript source breakpoints. Its launch smoke test stalled on this host and was stopped; interactive stepping/call stacks remain unverified here. The VS Code DAP path requires lldb-dap, which is not installed on this machine. Native tagged-value variable views need further debugger work.
|
|
105
|
+
|
|
106
|
+
Benchmarks establish only the measured workload on this host; no universal speed or Python/Rust comparison is claimed. Threads, binary/pointer-heavy FFI, and a package resolver remain deferred as agreed. Clock/random/network capabilities can follow the same explicit-capability contract when those APIs are added.
|
package/docs/index.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
layout: home
|
|
3
|
+
hero:
|
|
4
|
+
name: August
|
|
5
|
+
text: The world runs on language
|
|
6
|
+
tagline: A statically checked language for developers working with LLMs. Readable modules, clear dependencies, explicit effects, native C output.
|
|
7
|
+
actions:
|
|
8
|
+
- theme: brand
|
|
9
|
+
text: Build your first project
|
|
10
|
+
link: /getting-started
|
|
11
|
+
- theme: alt
|
|
12
|
+
text: Install and try it
|
|
13
|
+
link: /packages
|
|
14
|
+
- theme: alt
|
|
15
|
+
text: Build a web service
|
|
16
|
+
link: /web
|
|
17
|
+
- theme: alt
|
|
18
|
+
text: Browse real projects
|
|
19
|
+
link: /examples/
|
|
20
|
+
- theme: alt
|
|
21
|
+
text: See performance graphs
|
|
22
|
+
link: /performance
|
|
23
|
+
features:
|
|
24
|
+
- title: Understand a module in context
|
|
25
|
+
details: Public exports, labeled inputs, same-file tests, and source comments tell a new reader what the code promises.
|
|
26
|
+
- title: See dependencies and side effects
|
|
27
|
+
details: Interface contracts, resolve parameters, and changes clauses keep behavior visible at the module boundary. Implementation effects are inferred and explained in hover and specs.
|
|
28
|
+
- title: Build native applications
|
|
29
|
+
details: The CLI checks August, emits C11, and invokes the C compiler. First-party HTTP endpoints use narrow native library adapters.
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Documentation for the code you run
|
|
33
|
+
|
|
34
|
+
These pages are versioned with the compiler. Guide projects are compiled and tested in CI. Library API pages and language construct help are generated from the same declarations and comments that supply editor hover. [Compiled specifications](specifications.md) explain each source file beside its code, including private behavior and links to offline dependency docs.
|
|
35
|
+
|
|
36
|
+
Start with [getting started](getting-started.md) to create a new project with one `npx` command. [Browse complete projects](examples/index.md) with a choice of indentation or braces and compiled specifications beside the code. The [same-app OpenID Connect example](examples/oidc-login/index.md) demonstrates a login page, provider, client, and separate session JWT.
|
|
37
|
+
|
|
38
|
+
## Why August
|
|
39
|
+
|
|
40
|
+
A developer opening an unfamiliar file should see what it provides, what it imports, which inputs each call takes, what it can change, and which errors it can raise. August puts tests beside declarations and generates a readable specification from checked code. Folder exports form a deliberate public boundary. These choices help people and code assistants work within small, explainable modules.
|
|
41
|
+
|
|
42
|
+
## Performance and readiness
|
|
43
|
+
|
|
44
|
+
August emits C11 and builds native executables. In the [published benchmark suite](performance.md), the CPU loop took 7.24 ms in August and 8.17 ms in C on the measured host; a 200,000-item Map/Set workload took 15.10 ms in August and 6.38 ms in C. The HTTP result depends on load; at 16 clients the measured August server handled 73,370 requests per second, while at other client counts the comparison changes. See the graphs, code, inputs, hardware, and reproduction commands before drawing conclusions.
|
|
45
|
+
|
|
46
|
+
August is experimental. [Production readiness](production-readiness.md) identifies platform, licensing, security, and reliability gates. The [roadmap to 1.0.0](roadmap.md) and [gap ledger](web-library-gaps.md) show the work still required. See [packages](packages.md) for installation and the [Docker images](docker.md) for Linux core, web, and crypto applications.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Ownership and task conformance
|
|
2
|
+
|
|
3
|
+
August 0.19 checks ownership before compiling and joins every child before its `scope` ends. This page records the behavior exercised by the [language conformance suite](../tests/language-conformance.test.mjs). It is a candidate 1.0 contract; the [compatibility policy](compatibility.md) takes effect only with a 1.0 release.
|
|
4
|
+
|
|
5
|
+
## What the compiler guarantees
|
|
6
|
+
|
|
7
|
+
| Rule | Developer-visible behavior | Conformance case |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| Owned moves | Passing an `own` value to an `own` input or `Shared(value=...)` consumes the old name. A second use is a compile error. A value borrowed by a child cannot move through a call, another `Shared<T>`, a local declaration, a return, or a throw until the child finishes. | `OWN-1`, `SHARED-1`, `TASK-8`, `TASK-11` through `TASK-13`, `TASK-17` |
|
|
10
|
+
| Mutable access | Reading through another alias during `borrow` is a compile error. The alias can be read again after the block. | `BORROW-1` |
|
|
11
|
+
| Child captures | A child can read a managed object without copying it. The parent must wait before mutating that object through any alias, borrowed call, or field write. This applies even when the parent opened `borrow` before starting the child. Every possible branch must wait before mutation resumes. Freezing also waits for active mutable access. | `TASK-1` through `TASK-4`, `TASK-10`, `TASK-14` |
|
|
12
|
+
| Repeated starts | A `start` inside a loop can create several children. Waiting for one result does not release captures from other iterations; the enclosing `scope` joins them all. Put a `scope` inside the loop when each iteration should release its capture before the next iteration. | `TASK-7`, `TASK-15`, `TASK-16` |
|
|
13
|
+
| Collection waits | Waiting for one dynamically selected `Task<T>` does not release captures from other tasks that might be selected. A task that holds a reference to another task also cannot release that task's capture when only the first is awaited. `wait for` a `List<Task<T>>` joins every child in the list and releases their captures. | `TASK-18`, `TASK-19` |
|
|
14
|
+
| Checked child errors | Starting a child checks errors in its argument expressions. An error from the scheduled operation is checked at `wait for` or at the implicit scope join. Within the same scope, the checker knows the child's declared errors. A helper given a public `Task<T>` parameter handles or declares `Error`, since that type does not carry a narrower error list. | `ERROR-1`, `ERROR-3` |
|
|
15
|
+
|
|
16
|
+
The compiler tracks object origins through aliases and fields. It can reject code when it cannot prove that two references are separate. [The language guide](reference.md#ownership-and-read-access) explains `own`, `borrow`, `freeze`, and `Shared<T>`.
|
|
17
|
+
|
|
18
|
+
## What native execution guarantees
|
|
19
|
+
|
|
20
|
+
| Rule | Developer-visible behavior | Conformance case |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| Owned cleanup | An owned local is dropped once after normal scope exit or a checked error. Moving it transfers that responsibility. An owned `Shared<T>` drops its transferred payload. | `OWN-1`, `OWN-2`, `SHARED-1` |
|
|
23
|
+
| Scope exit | Leaving a scope, including by `return`, joins its children before the caller resumes and before the scope releases owned dependencies. An inner scope's join releases its capture for later outer code. Captured resources remain live through collection pressure and drop once after the join. | `CLEANUP-2`, `TASK-5`, `TASK-6`; [resource join test](../tests/concurrency.test.mjs) |
|
|
24
|
+
| `always` | Cleanup runs before a returned result is observed and while a cancelled child unwinds. | `CLEANUP-1`, `CANCEL-1` |
|
|
25
|
+
| Child failure | An unhandled child failure cancels siblings. Their `always` cleanup finishes before the error leaves the scope. An error already in flight from the parent remains primary if child cleanup also fails. | `CANCEL-1`, `ERROR-2` |
|
|
26
|
+
| Syntax choice | Brace blocks and indented blocks run the same ownership and task behavior. | `SYNTAX-1` |
|
|
27
|
+
|
|
28
|
+
Tasks currently run cooperatively on one OS thread. A long loop reaches cancellation at compiler-inserted checkpoints. `Shared<T>` is the explicit path for synchronized mutable state. The runtime does not yet promise parallel CPU execution.
|
|
29
|
+
|
|
30
|
+
Run the focused suite with `node --test tests/language-conformance.test.mjs`. The full repository test command also runs existing [concurrency](../tests/concurrency.test.mjs), ownership, errors, formatter, and generated-spec tests. This suite is growing through adversarial review; a green run does not establish complete ownership safety. The [roadmap](roadmap.md) keeps the language semantics gate open until that review and native CI finish.
|