@greenpandastudios/aug-cli 0.19.0 → 0.20.1

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.
Files changed (459) hide show
  1. package/README.md +9 -6
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/bin/aug.mjs +12 -2
  4. package/docs/about.md +27 -0
  5. package/docs/api/crypto.md +103 -69
  6. package/docs/api/io.md +35 -33
  7. package/docs/api/json.md +3 -3
  8. package/docs/api/memory.md +23 -19
  9. package/docs/api/time.md +10 -9
  10. package/docs/api/web.md +33 -38
  11. package/docs/compatibility.md +3 -3
  12. package/docs/contributing-benchmarks.md +38 -0
  13. package/docs/dev-containers.md +95 -0
  14. package/docs/diagnostics.md +15 -5
  15. package/docs/docker.md +174 -12
  16. package/docs/editor.md +35 -0
  17. package/docs/example-projects.json +206 -24
  18. package/docs/examples/approved-design/counters.md +34 -126
  19. package/docs/examples/approved-design/dependencies/august/0.20.1/io/contracts.md +178 -0
  20. package/docs/examples/approved-design/domain/app.md +13 -77
  21. package/docs/examples/approved-design/domain/export.md +5 -19
  22. package/docs/examples/approved-design/domain/models.md +4 -23
  23. package/docs/examples/approved-design/domain/numbers.md +24 -114
  24. package/docs/examples/approved-design/index.md +16 -7
  25. package/docs/examples/approved-design/main.md +19 -96
  26. package/docs/examples/benchmark/index.md +6 -5
  27. package/docs/examples/benchmark/main.md +7 -35
  28. package/docs/examples/cli-args/index.md +6 -5
  29. package/docs/examples/cli-args/main.md +6 -31
  30. package/docs/examples/collections/index.md +6 -5
  31. package/docs/examples/collections/main.md +7 -35
  32. package/docs/examples/collections-benchmark/index.md +6 -5
  33. package/docs/examples/collections-benchmark/main.md +7 -35
  34. package/docs/examples/cpu-benchmark/index.md +6 -5
  35. package/docs/examples/cpu-benchmark/main.md +5 -24
  36. package/docs/examples/developer-workflow/calculator.md +39 -186
  37. package/docs/examples/developer-workflow/dependencies/august/0.20.1/io/contracts.md +178 -0
  38. package/docs/examples/developer-workflow/index.md +16 -7
  39. package/docs/examples/developer-workflow/logging/console.md +10 -56
  40. package/docs/examples/developer-workflow/logging/export.md +4 -14
  41. package/docs/examples/developer-workflow/logging/logger.md +7 -43
  42. package/docs/examples/developer-workflow/main.md +17 -69
  43. package/docs/examples/drop/index.md +6 -5
  44. package/docs/examples/drop/main.md +7 -27
  45. package/docs/examples/drop/resource.md +7 -30
  46. package/docs/examples/errors/errors.md +7 -27
  47. package/docs/examples/errors/index.md +6 -5
  48. package/docs/examples/errors/main.md +7 -28
  49. package/docs/examples/ffi/index.md +6 -5
  50. package/docs/examples/ffi/main.md +6 -20
  51. package/docs/examples/ffi/native.md +8 -34
  52. package/docs/examples/generic-di/dependencies/august/0.20.1/io/contracts.md +178 -0
  53. package/docs/examples/generic-di/index.md +6 -5
  54. package/docs/examples/generic-di/main.md +9 -39
  55. package/docs/examples/generic-di/types.md +23 -92
  56. package/docs/examples/generics/index.md +6 -5
  57. package/docs/examples/generics/main.md +10 -47
  58. package/docs/examples/generics/types.md +25 -100
  59. package/docs/examples/hello/app/export.md +4 -12
  60. package/docs/examples/hello/app/greeter.md +13 -91
  61. package/docs/examples/hello/dependencies/august/0.20.1/io/contracts.md +178 -0
  62. package/docs/examples/hello/index.md +17 -6
  63. package/docs/examples/hello/logging/console.md +10 -54
  64. package/docs/examples/hello/logging/export.md +4 -14
  65. package/docs/examples/hello/logging/logger.md +7 -45
  66. package/docs/examples/hello/main.md +9 -39
  67. package/docs/examples/http-benchmark/index.md +6 -5
  68. package/docs/examples/http-benchmark/main.md +6 -20
  69. package/docs/examples/http-benchmark/routes.md +9 -31
  70. package/docs/examples/index.md +46 -29
  71. package/docs/examples/interceptors/app.md +20 -139
  72. package/docs/examples/interceptors/dependencies/august/0.20.1/io/contracts.md +178 -0
  73. package/docs/examples/interceptors/index.md +6 -5
  74. package/docs/examples/interceptors/interceptors.md +24 -148
  75. package/docs/examples/interceptors/logging.md +13 -76
  76. package/docs/examples/interceptors/main.md +10 -65
  77. package/docs/examples/json-benchmark/data.md +4 -20
  78. package/docs/examples/json-benchmark/dependencies/packages/@git/url_2d3c37c690c0fa115be1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.md +67 -0
  79. package/docs/examples/json-benchmark/index.md +7 -5
  80. package/docs/examples/json-benchmark/main-yaml.md +20 -0
  81. package/docs/examples/json-benchmark/main.md +10 -49
  82. package/docs/examples/new-syntax/console.md +10 -52
  83. package/docs/examples/new-syntax/dependencies/august/0.20.1/io/contracts.md +178 -0
  84. package/docs/examples/new-syntax/greeter.md +13 -71
  85. package/docs/examples/new-syntax/index.md +6 -5
  86. package/docs/examples/new-syntax/logger.md +7 -43
  87. package/docs/examples/new-syntax/main.md +10 -53
  88. package/docs/examples/new-syntax/math.md +6 -24
  89. package/docs/examples/oidc-login/client/contracts.md +10 -61
  90. package/docs/examples/oidc-login/client/endpoints.md +32 -154
  91. package/docs/examples/oidc-login/client/export.md +5 -23
  92. package/docs/examples/oidc-login/client/login.md +234 -344
  93. package/docs/examples/oidc-login/client/logout.md +38 -143
  94. package/docs/examples/oidc-login/client/protocol.md +183 -304
  95. package/docs/examples/oidc-login/client/session.md +41 -149
  96. package/docs/examples/oidc-login/client/views.md +13 -58
  97. package/docs/examples/oidc-login/common/export.md +6 -26
  98. package/docs/examples/oidc-login/common/headers.md +42 -72
  99. package/docs/examples/oidc-login/common/keys.md +40 -164
  100. package/docs/examples/oidc-login/common/settings.md +24 -40
  101. package/docs/examples/oidc-login/common/views.md +7 -28
  102. package/docs/examples/oidc-login/dependencies/packages/@git/url_0eb7c89453c87681ed15/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/store.md +205 -0
  103. package/docs/examples/oidc-login/dependencies/packages/@git/url_2d3c37c690c0fa115be1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.md +67 -0
  104. package/docs/examples/oidc-login/dependencies/packages/@git/url_897efafd565158fc4908/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.md +267 -0
  105. package/docs/examples/oidc-login/dependencies/packages/@git/url_9ef654c66d34ab8f5527/0.0.0-git.b14a0f9aa41f1ce58bd51133bcdc424033e40d40/contracts.md +415 -0
  106. package/docs/examples/oidc-login/dependencies/packages/@git/url_9ef654c66d34ab8f5527/0.0.0-git.b14a0f9aa41f1ce58bd51133bcdc424033e40d40/jose.md +271 -0
  107. package/docs/examples/oidc-login/dependencies/packages/@git/url_c092cd151499c4e1d8a1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.md +89 -0
  108. package/docs/examples/oidc-login/index.md +8 -7
  109. package/docs/examples/oidc-login/main-yaml.md +7 -0
  110. package/docs/examples/oidc-login/main.md +26 -153
  111. package/docs/examples/oidc-login/provider/authorization.md +232 -275
  112. package/docs/examples/oidc-login/provider/contracts.md +24 -146
  113. package/docs/examples/oidc-login/provider/credentials.md +24 -57
  114. package/docs/examples/oidc-login/provider/discovery.md +48 -122
  115. package/docs/examples/oidc-login/provider/export.md +11 -37
  116. package/docs/examples/oidc-login/provider/token.md +159 -237
  117. package/docs/examples/oidc-login/provider/userinfo.md +47 -102
  118. package/docs/examples/oidc-login/provider/views.md +13 -53
  119. package/docs/examples/ownership/counter.md +17 -63
  120. package/docs/examples/ownership/index.md +6 -5
  121. package/docs/examples/ownership/main.md +7 -30
  122. package/docs/examples/ownership-transfer/dependencies/august/0.20.1/io/contracts.md +178 -0
  123. package/docs/examples/ownership-transfer/index.md +6 -5
  124. package/docs/examples/ownership-transfer/main.md +10 -52
  125. package/docs/examples/ownership-transfer/resource.md +15 -67
  126. package/docs/examples/packages-app/dependencies/packages/@example/aug-math/0.1.0/arithmetic.md +12 -50
  127. package/docs/examples/packages-app/index.md +7 -6
  128. package/docs/examples/packages-app/main.md +7 -25
  129. package/docs/examples/packages-math/aug-package-json.md +1 -1
  130. package/docs/examples/packages-math/index.md +7 -6
  131. package/docs/examples/packages-math/src/arithmetic.md +12 -50
  132. package/docs/examples/packages-math/src/export.md +4 -12
  133. package/docs/examples/startup-benchmark/index.md +6 -5
  134. package/docs/examples/startup-benchmark/main.md +5 -17
  135. package/docs/examples/visibility/counter.md +19 -67
  136. package/docs/examples/visibility/index.md +6 -5
  137. package/docs/examples/visibility/main.md +7 -31
  138. package/docs/examples/weather-api/forecasts.md +168 -0
  139. package/docs/examples/weather-api/index.md +42 -0
  140. package/docs/examples/weather-api/main-yaml.md +21 -0
  141. package/docs/examples/weather-api/main.md +65 -0
  142. package/docs/examples.json +10 -0
  143. package/docs/getting-started.md +105 -2
  144. package/docs/grammar.md +6 -4
  145. package/docs/guides/change-a-module.md +64 -0
  146. package/docs/guides/index.md +27 -0
  147. package/docs/index.md +51 -29
  148. package/docs/language-conformance.md +1 -1
  149. package/docs/language-constructs.md +22 -22
  150. package/docs/language-design-audit.md +1 -1
  151. package/docs/learn/data-and-errors.md +77 -0
  152. package/docs/learn/index.md +30 -0
  153. package/docs/learn/modules-and-dependencies.md +73 -0
  154. package/docs/learn/state-and-tests.md +71 -0
  155. package/docs/learn/values-and-functions.md +62 -0
  156. package/docs/lesson-failures.json +8 -0
  157. package/docs/maintaining-docs.md +16 -4
  158. package/docs/packages.md +72 -126
  159. package/docs/performance.md +13 -41
  160. package/docs/production-readiness.md +5 -4
  161. package/docs/public/downloads/approved-design.zip +0 -0
  162. package/docs/public/downloads/benchmark.zip +0 -0
  163. package/docs/public/downloads/cli-args.zip +0 -0
  164. package/docs/public/downloads/collections-benchmark.zip +0 -0
  165. package/docs/public/downloads/collections.zip +0 -0
  166. package/docs/public/downloads/cpu-benchmark.zip +0 -0
  167. package/docs/public/downloads/developer-workflow.zip +0 -0
  168. package/docs/public/downloads/drop.zip +0 -0
  169. package/docs/public/downloads/errors.zip +0 -0
  170. package/docs/public/downloads/ffi.zip +0 -0
  171. package/docs/public/downloads/generic-di.zip +0 -0
  172. package/docs/public/downloads/generics.zip +0 -0
  173. package/docs/public/downloads/hello.zip +0 -0
  174. package/docs/public/downloads/http-benchmark.zip +0 -0
  175. package/docs/public/downloads/interceptors.zip +0 -0
  176. package/docs/public/downloads/json-benchmark.zip +0 -0
  177. package/docs/public/downloads/new-syntax.zip +0 -0
  178. package/docs/public/downloads/oidc-login.zip +0 -0
  179. package/docs/public/downloads/ownership-transfer.zip +0 -0
  180. package/docs/public/downloads/ownership.zip +0 -0
  181. package/docs/public/downloads/packages-app.zip +0 -0
  182. package/docs/public/downloads/packages-math.zip +0 -0
  183. package/docs/public/downloads/startup-benchmark.zip +0 -0
  184. package/docs/public/downloads/visibility.zip +0 -0
  185. package/docs/public/downloads/weather-api.zip +0 -0
  186. package/docs/reference.md +23 -17
  187. package/docs/releasing.md +29 -15
  188. package/docs/research/code-to-natural-language.md +108 -0
  189. package/docs/research/ecosystem-workflow.md +41 -0
  190. package/docs/research/wiki-editorial-design.md +71 -0
  191. package/docs/roadmap.md +1 -1
  192. package/docs/specifications.md +27 -11
  193. package/docs/testing.md +19 -5
  194. package/docs/tooling.md +25 -12
  195. package/docs/weather-api.md +65 -0
  196. package/docs/web.md +50 -18
  197. package/docs/writing-docs.md +49 -0
  198. package/examples/{hello/.aug-spec/august/0.19.0 → approved-design/.aug-spec/august/0.20.1}/io/contracts.aug +4 -3
  199. package/examples/approved-design/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  200. package/examples/approved-design/.aug-spec/manifest.json +3 -3
  201. package/examples/approved-design/counters.aug +5 -4
  202. package/examples/approved-design/counters.aug.md +25 -132
  203. package/examples/approved-design/domain/app.aug +2 -1
  204. package/examples/approved-design/domain/app.aug.md +10 -80
  205. package/examples/approved-design/domain/export.aug +1 -0
  206. package/examples/approved-design/domain/export.aug.md +4 -20
  207. package/examples/approved-design/domain/models.aug +1 -0
  208. package/examples/approved-design/domain/models.aug.md +3 -25
  209. package/examples/approved-design/domain/numbers.aug +3 -2
  210. package/examples/approved-design/domain/numbers.aug.md +19 -116
  211. package/examples/approved-design/main.aug +1 -0
  212. package/examples/approved-design/main.aug.md +12 -95
  213. package/examples/benchmark/.aug-spec/manifest.json +1 -1
  214. package/examples/benchmark/main.aug +1 -0
  215. package/examples/benchmark/main.aug.md +6 -36
  216. package/examples/cli-args/.aug-spec/manifest.json +1 -1
  217. package/examples/cli-args/main.aug +1 -0
  218. package/examples/cli-args/main.aug.md +5 -32
  219. package/examples/collections/.aug-spec/manifest.json +1 -1
  220. package/examples/collections/main.aug +1 -0
  221. package/examples/collections/main.aug.md +6 -36
  222. package/examples/{generic-di/.aug-spec/august/0.19.0 → developer-workflow/.aug-spec/august/0.20.1}/io/contracts.aug +4 -3
  223. package/examples/developer-workflow/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  224. package/examples/developer-workflow/.aug-spec/manifest.json +3 -3
  225. package/examples/developer-workflow/calculator.aug +3 -2
  226. package/examples/developer-workflow/calculator.aug.md +28 -189
  227. package/examples/developer-workflow/logging/console.aug +2 -1
  228. package/examples/developer-workflow/logging/console.aug.md +7 -57
  229. package/examples/developer-workflow/logging/export.aug +1 -0
  230. package/examples/developer-workflow/logging/export.aug.md +3 -15
  231. package/examples/developer-workflow/logging/logger.aug +1 -0
  232. package/examples/developer-workflow/logging/logger.aug.md +6 -46
  233. package/examples/developer-workflow/main.aug +1 -0
  234. package/examples/developer-workflow/main.aug.md +10 -68
  235. package/examples/drop/.aug-spec/manifest.json +1 -1
  236. package/examples/drop/main.aug +1 -0
  237. package/examples/drop/main.aug.md +6 -28
  238. package/examples/drop/resource.aug +1 -0
  239. package/examples/drop/resource.aug.md +6 -34
  240. package/examples/errors/.aug-spec/manifest.json +1 -1
  241. package/examples/errors/errors.aug +2 -1
  242. package/examples/errors/errors.aug.md +4 -27
  243. package/examples/errors/main.aug +1 -0
  244. package/examples/errors/main.aug.md +6 -29
  245. package/examples/ffi/.aug-spec/manifest.json +1 -1
  246. package/examples/ffi/main.aug +1 -0
  247. package/examples/ffi/main.aug.md +5 -21
  248. package/examples/ffi/native.aug +2 -1
  249. package/examples/ffi/native.aug.md +5 -35
  250. package/examples/{approved-design/.aug-spec/august/0.19.0 → generic-di/.aug-spec/august/0.20.1}/io/contracts.aug +4 -3
  251. package/examples/generic-di/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  252. package/examples/generic-di/.aug-spec/manifest.json +3 -3
  253. package/examples/generic-di/main.aug +1 -0
  254. package/examples/generic-di/main.aug.md +8 -40
  255. package/examples/generic-di/types.aug +3 -2
  256. package/examples/generic-di/types.aug.md +18 -97
  257. package/examples/generics/.aug-spec/manifest.json +1 -1
  258. package/examples/generics/main.aug +1 -0
  259. package/examples/generics/main.aug.md +9 -48
  260. package/examples/generics/types.aug +4 -3
  261. package/examples/generics/types.aug.md +18 -104
  262. package/examples/{developer-workflow/.aug-spec/august/0.19.0 → hello/.aug-spec/august/0.20.1}/io/contracts.aug +4 -3
  263. package/examples/hello/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  264. package/examples/hello/.aug-spec/manifest.json +3 -3
  265. package/examples/hello/app/export.aug +1 -0
  266. package/examples/hello/app/export.aug.md +3 -13
  267. package/examples/hello/app/greeter.aug +2 -1
  268. package/examples/hello/app/greeter.aug.md +10 -94
  269. package/examples/hello/logging/console.aug +2 -1
  270. package/examples/hello/logging/console.aug.md +7 -55
  271. package/examples/hello/logging/export.aug +1 -0
  272. package/examples/hello/logging/export.aug.md +3 -15
  273. package/examples/hello/logging/logger.aug +1 -0
  274. package/examples/hello/logging/logger.aug.md +6 -48
  275. package/examples/hello/main.aug +1 -0
  276. package/examples/hello/main.aug.md +8 -40
  277. package/examples/interceptors/.aug-spec/august/0.20.1/io/contracts.aug +37 -0
  278. package/examples/interceptors/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  279. package/examples/interceptors/.aug-spec/manifest.json +3 -3
  280. package/examples/interceptors/app.aug +3 -2
  281. package/examples/interceptors/app.aug.md +15 -141
  282. package/examples/interceptors/interceptors.aug +3 -2
  283. package/examples/interceptors/interceptors.aug.md +19 -152
  284. package/examples/interceptors/logging.aug +2 -1
  285. package/examples/interceptors/logging.aug.md +10 -79
  286. package/examples/interceptors/main.aug +1 -0
  287. package/examples/interceptors/main.aug.md +9 -66
  288. package/examples/new-syntax/.aug-spec/august/0.20.1/io/contracts.aug +37 -0
  289. package/examples/new-syntax/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  290. package/examples/new-syntax/.aug-spec/manifest.json +3 -3
  291. package/examples/new-syntax/console.aug +2 -1
  292. package/examples/new-syntax/console.aug.md +7 -53
  293. package/examples/new-syntax/greeter.aug +2 -1
  294. package/examples/new-syntax/greeter.aug.md +10 -74
  295. package/examples/new-syntax/logger.aug +1 -0
  296. package/examples/new-syntax/logger.aug.md +6 -46
  297. package/examples/new-syntax/main.aug +1 -0
  298. package/examples/new-syntax/main.aug.md +9 -54
  299. package/examples/new-syntax/math.aug +2 -1
  300. package/examples/new-syntax/math.aug.md +3 -24
  301. package/examples/oidc-login/.aug-spec/manifest.json +13 -13
  302. package/examples/oidc-login/.aug-spec/packages/@git/url_0eb7c89453c87681ed15/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/store.aug.md +71 -0
  303. package/examples/oidc-login/.aug-spec/packages/@git/url_2d3c37c690c0fa115be1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.aug.md +17 -0
  304. package/examples/oidc-login/.aug-spec/packages/@git/url_897efafd565158fc4908/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.aug.md +125 -0
  305. package/examples/oidc-login/.aug-spec/{august/0.19.0/crypto → packages/@git/url_9ef654c66d34ab8f5527/0.0.0-git.b14a0f9aa41f1ce58bd51133bcdc424033e40d40}/contracts.aug +12 -11
  306. package/examples/oidc-login/.aug-spec/packages/@git/url_9ef654c66d34ab8f5527/0.0.0-git.b14a0f9aa41f1ce58bd51133bcdc424033e40d40/contracts.aug.md +244 -0
  307. package/examples/oidc-login/.aug-spec/{august/0.19.0/crypto → packages/@git/url_9ef654c66d34ab8f5527/0.0.0-git.b14a0f9aa41f1ce58bd51133bcdc424033e40d40}/jose.aug +6 -5
  308. package/examples/oidc-login/.aug-spec/packages/@git/url_9ef654c66d34ab8f5527/0.0.0-git.b14a0f9aa41f1ce58bd51133bcdc424033e40d40/jose.aug.md +71 -0
  309. package/examples/oidc-login/.aug-spec/packages/@git/url_c092cd151499c4e1d8a1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.aug.md +30 -0
  310. package/examples/oidc-login/aug.lock.json +100 -0
  311. package/examples/oidc-login/client/contracts.aug +1 -0
  312. package/examples/oidc-login/client/contracts.aug.md +9 -66
  313. package/examples/oidc-login/client/endpoints.aug +6 -5
  314. package/examples/oidc-login/client/endpoints.aug.md +13 -145
  315. package/examples/oidc-login/client/export.aug +1 -0
  316. package/examples/oidc-login/client/export.aug.md +4 -24
  317. package/examples/oidc-login/client/login.aug +7 -6
  318. package/examples/oidc-login/client/login.aug.md +25 -303
  319. package/examples/oidc-login/client/logout.aug +5 -4
  320. package/examples/oidc-login/client/logout.aug.md +13 -135
  321. package/examples/oidc-login/client/protocol.aug +7 -6
  322. package/examples/oidc-login/client/protocol.aug.md +36 -283
  323. package/examples/oidc-login/client/session.aug +5 -4
  324. package/examples/oidc-login/client/session.aug.md +12 -139
  325. package/examples/oidc-login/client/views.aug +3 -2
  326. package/examples/oidc-login/client/views.aug.md +8 -57
  327. package/examples/oidc-login/common/export.aug +1 -0
  328. package/examples/oidc-login/common/export.aug.md +5 -27
  329. package/examples/oidc-login/common/headers.aug +4 -3
  330. package/examples/oidc-login/common/headers.aug.md +9 -67
  331. package/examples/oidc-login/common/keys.aug +6 -5
  332. package/examples/oidc-login/common/keys.aug.md +29 -165
  333. package/examples/oidc-login/common/settings.aug +2 -1
  334. package/examples/oidc-login/common/settings.aug.md +5 -39
  335. package/examples/oidc-login/common/views.aug +2 -1
  336. package/examples/oidc-login/common/views.aug.md +4 -28
  337. package/examples/oidc-login/main.aug +6 -16
  338. package/examples/oidc-login/main.aug.md +17 -146
  339. package/examples/oidc-login/main.yaml +7 -0
  340. package/examples/oidc-login/provider/authorization.aug +7 -6
  341. package/examples/oidc-login/provider/authorization.aug.md +23 -238
  342. package/examples/oidc-login/provider/contracts.aug +1 -0
  343. package/examples/oidc-login/provider/contracts.aug.md +23 -158
  344. package/examples/oidc-login/provider/credentials.aug +3 -2
  345. package/examples/oidc-login/provider/credentials.aug.md +9 -53
  346. package/examples/oidc-login/provider/discovery.aug +4 -3
  347. package/examples/oidc-login/provider/discovery.aug.md +11 -118
  348. package/examples/oidc-login/provider/export.aug +1 -0
  349. package/examples/oidc-login/provider/export.aug.md +6 -34
  350. package/examples/oidc-login/provider/token.aug +6 -5
  351. package/examples/oidc-login/provider/token.aug.md +16 -204
  352. package/examples/oidc-login/provider/userinfo.aug +4 -3
  353. package/examples/oidc-login/provider/userinfo.aug.md +10 -92
  354. package/examples/oidc-login/provider/views.aug +3 -2
  355. package/examples/oidc-login/provider/views.aug.md +8 -52
  356. package/examples/ownership/.aug-spec/manifest.json +1 -1
  357. package/examples/ownership/counter.aug +3 -2
  358. package/examples/ownership/counter.aug.md +12 -66
  359. package/examples/ownership/main.aug +1 -0
  360. package/examples/ownership/main.aug.md +6 -31
  361. package/examples/ownership-transfer/.aug-spec/august/0.20.1/io/contracts.aug +37 -0
  362. package/examples/ownership-transfer/.aug-spec/august/0.20.1/io/contracts.aug.md +82 -0
  363. package/examples/ownership-transfer/.aug-spec/manifest.json +3 -3
  364. package/examples/ownership-transfer/main.aug +1 -0
  365. package/examples/ownership-transfer/main.aug.md +9 -53
  366. package/examples/ownership-transfer/resource.aug +2 -1
  367. package/examples/ownership-transfer/resource.aug.md +12 -71
  368. package/examples/packages/app/.aug-spec/manifest.json +1 -1
  369. package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug +2 -1
  370. package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug.md +9 -51
  371. package/examples/packages/app/main.aug +1 -0
  372. package/examples/packages/app/main.aug.md +6 -26
  373. package/examples/packages/math/.aug-spec/manifest.json +1 -1
  374. package/examples/packages/math/aug-package.json +1 -1
  375. package/examples/packages/math/src/arithmetic.aug +2 -1
  376. package/examples/packages/math/src/arithmetic.aug.md +9 -51
  377. package/examples/packages/math/src/export.aug +1 -0
  378. package/examples/packages/math/src/export.aug.md +3 -13
  379. package/examples/visibility/.aug-spec/manifest.json +1 -1
  380. package/examples/visibility/counter.aug +4 -3
  381. package/examples/visibility/counter.aug.md +12 -68
  382. package/examples/visibility/main.aug +1 -0
  383. package/examples/visibility/main.aug.md +6 -32
  384. package/examples/weather-api/.aug-spec/manifest.json +8 -0
  385. package/examples/weather-api/AGENTS.md +17 -0
  386. package/examples/weather-api/README.md +19 -0
  387. package/examples/weather-api/forecasts.aug +47 -0
  388. package/examples/weather-api/forecasts.aug.md +32 -0
  389. package/examples/weather-api/main.aug +4 -0
  390. package/examples/weather-api/main.aug.md +15 -0
  391. package/examples/weather-api/main.yaml +5 -0
  392. package/examples/weather-api/weather.http +5 -0
  393. package/package.json +3 -4
  394. package/scripts/bootstrap-native.mjs +181 -106
  395. package/scripts/native-setup.mjs +98 -0
  396. package/scripts/native-toolchain.mjs +28 -0
  397. package/src/builtins.js +1 -1
  398. package/src/checker.js +259 -72
  399. package/src/cli.js +114 -20
  400. package/src/codegen.js +1 -1
  401. package/src/config.js +1 -1
  402. package/src/contracts.js +10 -0
  403. package/src/editor.js +71 -16
  404. package/src/fixes.js +90 -2
  405. package/src/formatter.js +19 -8
  406. package/src/git-packages.js +110 -0
  407. package/src/help.js +24 -23
  408. package/src/http-contracts.js +14 -0
  409. package/src/http-policies.js +5 -5
  410. package/src/libraries.js +1 -1
  411. package/src/lsp.js +14 -5
  412. package/src/native.js +19 -13
  413. package/src/navigation.js +4 -2
  414. package/src/openapi.js +5 -4
  415. package/src/package-locking.js +45 -0
  416. package/src/package-manager.js +251 -67
  417. package/src/parser.js +13 -5
  418. package/src/policies.js +3 -3
  419. package/src/project-init.js +78 -4
  420. package/src/project.js +9 -7
  421. package/src/semantic.js +46 -2
  422. package/src/snippets.js +59 -0
  423. package/src/spec-hints.js +56 -0
  424. package/src/spec-tree.js +241 -0
  425. package/src/spec.js +626 -303
  426. package/docs/examples/approved-design/dependencies/august/0.19.0/io/contracts.md +0 -395
  427. package/docs/examples/developer-workflow/dependencies/august/0.19.0/io/contracts.md +0 -395
  428. package/docs/examples/generic-di/dependencies/august/0.19.0/io/contracts.md +0 -395
  429. package/docs/examples/hello/dependencies/august/0.19.0/io/contracts.md +0 -395
  430. package/docs/examples/interceptors/dependencies/august/0.19.0/io/contracts.md +0 -395
  431. package/docs/examples/json-benchmark/dependencies/august/0.19.0/json/contracts.md +0 -103
  432. package/docs/examples/new-syntax/dependencies/august/0.19.0/io/contracts.md +0 -395
  433. package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/contracts.md +0 -925
  434. package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/jose.md +0 -434
  435. package/docs/examples/oidc-login/dependencies/august/0.19.0/json/contracts.md +0 -103
  436. package/docs/examples/oidc-login/dependencies/august/0.19.0/memory/store.md +0 -374
  437. package/docs/examples/oidc-login/dependencies/august/0.19.0/time/contracts.md +0 -150
  438. package/docs/examples/oidc-login/dependencies/august/0.19.0/web/contracts.md +0 -532
  439. package/docs/examples/ownership-transfer/dependencies/august/0.19.0/io/contracts.md +0 -395
  440. package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  441. package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  442. package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  443. package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  444. package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug +0 -36
  445. package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  446. package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug +0 -36
  447. package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  448. package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug.md +0 -791
  449. package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug.md +0 -266
  450. package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug.md +0 -55
  451. package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug.md +0 -250
  452. package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug.md +0 -96
  453. package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug.md +0 -420
  454. package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug +0 -36
  455. package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug.md +0 -316
  456. /package/examples/oidc-login/.aug-spec/{august/0.19.0/memory → packages/@git/url_0eb7c89453c87681ed15/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301}/store.aug +0 -0
  457. /package/examples/oidc-login/.aug-spec/{august/0.19.0/json → packages/@git/url_2d3c37c690c0fa115be1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301}/contracts.aug +0 -0
  458. /package/examples/oidc-login/.aug-spec/{august/0.19.0/web → packages/@git/url_897efafd565158fc4908/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301}/contracts.aug +0 -0
  459. /package/examples/oidc-login/.aug-spec/{august/0.19.0/time → packages/@git/url_c092cd151499c4e1d8a1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301}/contracts.aug +0 -0
@@ -0,0 +1,95 @@
1
+ # Develop in a VS Code Dev Container
2
+
3
+ Run the August compiler, tests, and native dependencies inside a Linux container while editing your local project in VS Code. This keeps the C toolchain off your host. The project folder stays on your machine; the compiler and prepared dependencies live in the container image.
4
+
5
+ You need Docker with a running Linux engine, VS Code, and Microsoft's [Dev Containers extension](https://code.visualstudio.com/docs/devcontainers/containers). Creating a new project also needs Node.js 24 and npm on the host. You can instead open an existing project or a [downloaded example](examples/index.md).
6
+
7
+ Keep your project in a writable folder shared with the Docker engine. If container creation reports that the bind source path does not exist, enable that folder in your engine's file-sharing settings. A remote Docker engine needs a separate workspace-sharing setup; [Docker's bind mount guide](https://docs.docker.com/engine/storage/bind-mounts/#considerations-and-constraints) explains the constraint.
8
+
9
+ ## Create the project and container files
10
+
11
+ Start a project:
12
+
13
+ ```sh
14
+ npm install --global @greenpandastudios/aug-cli@next
15
+ aug init hello-august
16
+ cd hello-august
17
+ mkdir .devcontainer
18
+ ```
19
+
20
+ Save `.devcontainer/Dockerfile` with these contents. It installs the published CLI and prepares all native libraries, including web and crypto. No host C compiler is required.
21
+
22
+ ```dockerfile
23
+ FROM node:24-bookworm
24
+ ARG AUG_VERSION=0.20.1
25
+ ENV AUG_NATIVE_HOME=/opt/augscript/.aug-native
26
+ RUN apt-get update \
27
+ && apt-get install -y --no-install-recommends \
28
+ git clang libclang-rt-14-dev make cmake m4 autoconf \
29
+ automake libtool python3 zlib1g-dev ca-certificates \
30
+ && rm -rf /var/lib/apt/lists/*
31
+ RUN npm install --global --ignore-scripts --no-audit --no-fund \
32
+ @greenpandastudios/aug-cli@${AUG_VERSION} \
33
+ && aug-native
34
+ WORKDIR /workspace
35
+ USER node
36
+ CMD ["sleep", "infinity"]
37
+ ```
38
+
39
+ Save `.devcontainer/devcontainer.json` beside it:
40
+
41
+ ```json
42
+ {
43
+ "name": "August",
44
+ "build": {
45
+ "dockerfile": "Dockerfile",
46
+ "context": "."
47
+ },
48
+ "remoteUser": "node",
49
+ "updateRemoteUserUID": true,
50
+ "init": true,
51
+ "postCreateCommand": ["aug", "check", "."],
52
+ "forwardPorts": [8080],
53
+ "portsAttributes": {
54
+ "8080": { "label": "August HTTP" }
55
+ },
56
+ "customizations": {
57
+ "vscode": {
58
+ "extensions": ["augscript.augscript"],
59
+ "settings": {
60
+ "augscript.nativeHome": "/opt/augscript/.aug-native"
61
+ }
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ The editor installs the August extension inside the container and points it at the prepared native cache. Terminal commands run as the image's `node` user. On Linux, the Dev Container tooling adjusts that user's ID to match your local files. The [non-root user guide](https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user) explains this behavior.
68
+
69
+ ## Open and run it
70
+
71
+ Open `hello-august` in VS Code. From the Command Palette, choose **Dev Containers: Reopen in Container**. The first build downloads and compiles the native libraries and can take several minutes. Later opens reuse the built image. When the container is ready, the configured creation command checks your project.
72
+
73
+ Open a terminal **in that VS Code window** and run:
74
+
75
+ ```sh
76
+ aug check .
77
+ aug run .
78
+ aug test .
79
+ aug spec .
80
+ aug spec . --check
81
+ ```
82
+
83
+ The starter prints `Hello, August!`, its test passes, and spec generation writes the neighboring explanations. You can use `aug` directly because the CLI is installed in the image. Follow [Your first project](getting-started.md) to understand and change the source.
84
+
85
+ Edits, generated specs, and `.aug-build` remain in the mounted project folder. Native programs built here are Linux executables; run them inside the container. Rebuilding the container keeps your source files and rebuilds the environment. After changing the Dockerfile or CLI version, choose **Dev Containers: Rebuild Container**. Keep the toolchain and editor versions compatible with your project.
86
+
87
+ ## Run an HTTP service
88
+
89
+ Use the [small HTTP service](docker.md#deploy-an-http-application) or a downloaded [web project](examples/index.md). Run `aug run .` in the container terminal. For a service on port 8080, the configuration forwards that port to your host. Open VS Code's **Ports** view and follow its local address; VS Code may choose a different local port if 8080 is occupied.
90
+
91
+ Add other listening ports to `forwardPorts` when your application needs them. Editor forwarding and Docker's `--publish` are different mechanisms: VS Code can forward a service listening on the container's loopback address, while a deployed Docker service needs the listening address shown in [the Docker guide](docker.md#deploy-an-http-application). The [Dev Container configuration reference](https://containers.dev/implementors/json_reference/#general-devcontainerjson-properties) describes port forwarding and lifecycle commands.
92
+
93
+ If the project imports source packages, run `aug install . --frozen` before checking it, and change `postCreateCommand` to `"aug install . --frozen && aug check ."`. Commit the manifest and lockfile. See [packages](packages.md#reproducible-builds) for the workflow.
94
+
95
+ For a deployment image, follow [Build and deploy with Docker](docker.md). The development image includes tools and a writable workspace; the deployment guide packages the compiled application for a server.
@@ -1,6 +1,12 @@
1
- # AugScript diagnostics and fixes
1
+ # Diagnostics and fixes
2
2
 
3
- Diagnostics include a code, source location, and expected/actual contract where relevant. VS Code shows them while editing, with hover guidance and lightbulb actions. Fixes are precise edits; they are offered only where the compiler has enough information. Warnings do not prevent a build.
3
+ Start with the diagnostic's file, line, and message. The code identifies the rule that failed; the tables below explain likely remedies. VS Code shows the same diagnostics while you edit, with hover help and lightbulb actions where the compiler can offer a precise change. Warnings do not prevent a build.
4
+
5
+ Terminal diagnostics include the source line, a pointer to the location, and a `help:` explanation. `aug check --json` preserves structured diagnostics for tooling. Fix the first dependency or configuration error before investigating follow-on name errors.
6
+
7
+ If `aug run` cannot prepare or start a program, its message identifies the failed stage. A missing C compiler includes the host installation command and the `CC` override. A failed download identifies the library and URL; retry after checking the connection. A failed native build links its log. An offline cache miss explains how to prepare it online. Changed installed source packages require an explicit `aug install` so a run does not hide unexpected edits. A program stopped by a signal reports that signal after its own runtime output.
8
+
9
+ When a fix changes a dependency, effect, error, or mutable input, review the caller's contract too. A suggested edit can satisfy a language rule without deciding the right recovery or design for your application. [The book](learn/index.md) includes deliberate mistakes you can check and repair yourself.
4
10
 
5
11
  ## Syntax and data
6
12
 
@@ -40,7 +46,7 @@ Both braces and indentation are accepted. The formatter uses main.yaml preferenc
40
46
 
41
47
  ### EFFECT
42
48
 
43
- Callables are pure by default. Declare `changes self` for state transitions or `changes input` for an owned/borrowed input. Receive I/O capabilities through resolve headers and declare `uses dependency.operation`. Callers and interface contracts include every effective effect, including layers.
49
+ Bodies infer `changes self` for state transitions and `changes input` for borrowed inputs. Bodyless interfaces declare permitted changes. Receive I/O capabilities through dependency headers. Executable bodies infer capability operations, mutations, and escaping checked errors. Bodyless interfaces declare their allowed effects with `uses dependency.operation`; explicit clauses remain checked bounds. Calls and interceptor layers must fit the effective contract.
44
50
 
45
51
  Public fields and managed inputs grant reading. Mark local storage mutable when it needs initialization-independent changes. Constructors are pure; move startup effects into a named method. drop performs only local cleanup and cannot acquire effects/errors through interceptors.
46
52
 
@@ -64,7 +70,7 @@ A child task keeps its captured objects available until `wait for` or its scope
64
70
 
65
71
  ### THROWS
66
72
 
67
- A checked error lacks a compatible catch or unless declaration. The language uses `unless`; THROWS is the diagnostic identifier retained for tooling.
73
+ A checked error reaches main without a compatible catch, or exceeds an explicit unless bound. Bodies infer escaping errors when unless is omitted. The language uses `unless`; THROWS is the diagnostic identifier retained for tooling.
68
74
 
69
75
  **Propagate with unless** adds the specific error to the enclosing contract. At composition statements, **Catch and report the failure** creates a visible recovery template. Choose domain recovery deliberately; no fix silently discards an error.
70
76
 
@@ -91,7 +97,11 @@ Next exists only inside around. `next()` forwards original inputs; `next(y=value
91
97
  | TEST | Put a class/function suite beside its declaration. Unique groups/cases; bindings before setup before cases. Check row arity/types and execute a bool assertion in each case. |
92
98
  | DOC | @param labels, value-return tags, and error tags must match the effective signature. Unknown tags are errors. Missing public docs become warnings only when enabled. |
93
99
  | CONFIG | main.yaml uses the supported keys and simple YAML lists. Unknown/duplicate keys and invalid values fail during check. |
94
- | FFI | Use supported boundary types, matching C widths, labeled inputs, unsafe, and uses C.function in callable contracts. |
100
+ | FFI | Use supported boundary types, matching C widths, labeled inputs, unsafe, and an inferred or declared C.function effect. |
95
101
  | NATIVE | A C compiler error mapped to its .aug file and line. Fix the boundary declaration or linker configuration; inspect emit-c for generated details. |
96
102
 
97
103
  See [testing](testing.md) and [native tooling](tooling.md) for executable examples and exact limits.
104
+
105
+ ## INFERENCE: add a type anchor
106
+
107
+ The compiler cannot infer a result when recursive calls have no concrete return evidence, or when generic contracts keep expanding. State a finite `returns T`, `uses`, or `unless` contract at that boundary. Empty collections also need a contextual item type. This does not require repeating contracts on ordinary bodies.
package/docs/docker.md CHANGED
@@ -1,21 +1,67 @@
1
- # Docker build and run images
1
+ # Build and deploy with Docker
2
2
 
3
- The repository supplies two base images. The **build** image contains Node.js 24, the August compiler, Clang and its sanitizer runtime, and the pinned native task, JSON, web, and crypto dependencies. The **run** image is a small Debian userland with the matching native shared libraries and CA certificates. It runs a compiled August executable as an unprivileged user. Build the run image after the build image so both use the same native dependency build.
3
+ Compile an August application in a Linux build container, then deploy its executable in a separate runtime image. You need Docker with a running Linux engine and a POSIX shell for these commands. The application does not need Node.js or a compiler in its deployed container. For editing and testing inside VS Code, use [a Dev Container](dev-containers.md).
4
4
 
5
- Build the images from the repository root:
5
+ ## Prepare the toolchain images
6
+
7
+ Build two local images from the published npm CLI. The **build** image contains Node.js 24, the August compiler, Clang and its sanitizer runtime, and the pinned native task, JSON, web, and crypto dependencies. The **run** image is a small Debian userland with matching native shared libraries and CA certificates. It runs a compiled August executable as an unprivileged user. These are local image recipes; August does not currently publish registry tags for them.
8
+
9
+ Save this as `Dockerfile.build` in an empty working folder. It installs the published toolchain, then prepares its native dependencies. Pin `AUG_VERSION` to the version used by your application:
10
+
11
+ ```dockerfile
12
+ FROM node:24-bookworm
13
+ ARG AUG_VERSION=0.20.1
14
+ ENV AUG_NATIVE_HOME=/opt/augscript/.aug-native
15
+ RUN apt-get update \
16
+ && apt-get install -y --no-install-recommends \
17
+ git clang libclang-rt-14-dev make cmake m4 autoconf \
18
+ automake libtool python3 zlib1g-dev ca-certificates \
19
+ && rm -rf /var/lib/apt/lists/*
20
+ RUN npm install --global --ignore-scripts --no-audit --no-fund \
21
+ @greenpandastudios/aug-cli@${AUG_VERSION} \
22
+ && aug-native
23
+ WORKDIR /workspace
24
+ ENTRYPOINT ["aug"]
25
+ CMD ["--help"]
26
+ ```
27
+
28
+ Save this as `Dockerfile.run` beside it. Keeping the same native library path preserves the executable's runtime search path:
29
+
30
+ ```dockerfile
31
+ FROM augscript/build:local AS native
32
+ FROM debian:bookworm-slim
33
+ RUN apt-get update \
34
+ && apt-get install -y --no-install-recommends ca-certificates zlib1g \
35
+ && rm -rf /var/lib/apt/lists/*
36
+ COPY --from=native /opt/augscript/.aug-native/prefix/lib /opt/augscript/.aug-native/prefix/lib
37
+ RUN groupadd --system august \
38
+ && useradd --system --gid august --home-dir /app august
39
+ WORKDIR /app
40
+ USER august
41
+ ENTRYPOINT ["/app/program"]
42
+ ```
43
+
44
+ Build them in that order:
6
45
 
7
46
  ```sh
8
- docker build -f docker/Dockerfile.build -t augscript/build:local .
9
- docker build -f docker/Dockerfile.run -t augscript/run:local .
10
- docker build -f docker/Dockerfile.crypto-smoke -t augscript/crypto-smoke:local .
11
- docker run --rm augscript/crypto-smoke:local
12
- docker build -f docker/Dockerfile.web-smoke -t augscript/web-smoke:local .
13
- docker run --rm -p 127.0.0.1:8080:8080 augscript/web-smoke:local
47
+ docker build -f Dockerfile.build -t augscript/build:local .
48
+ docker build -f Dockerfile.run -t augscript/run:local .
14
49
  ```
15
50
 
16
- Create a project with `aug init my-app`, then compile it for Linux. The mount is writable because `aug build` writes `.aug-build` and generated specifications into the project. The following commands assume your Docker engine can bind-mount your working directory:
51
+ The first build downloads and compiles native dependencies; later builds can reuse Docker's cached layers. Keep these local images on the same Docker engine that builds your application.
52
+
53
+ ## Compile an existing project
54
+
55
+ Create your application with the [npx starter](getting-started.md) or download a [complete project](examples/index.md), then compile it for Linux. The mount is writable because `aug build` writes `.aug-build` and generated specifications into the project. Run the commands below from the parent of `my-app`.
56
+
57
+ Keep the project in a directory shared with your Docker engine. If Docker reports that the bind source path does not exist, check the engine's file-sharing settings. A remote engine cannot mount a folder that exists only on your client machine; see [bind mount constraints](https://docs.docker.com/engine/storage/bind-mounts/#considerations-and-constraints).
17
58
 
18
59
  ```sh
60
+ docker run --rm \
61
+ --user "$(id -u):$(id -g)" \
62
+ --mount type=bind,source="$PWD/my-app",target=/workspace \
63
+ augscript/build:local install .
64
+
19
65
  docker run --rm \
20
66
  --user "$(id -u):$(id -g)" \
21
67
  --mount type=bind,source="$PWD/my-app",target=/workspace \
@@ -30,6 +76,122 @@ docker run --rm \
30
76
  augscript/run:local
31
77
  ```
32
78
 
33
- The crypto smoke command prints the SHA-256 digest of `abc`. The web smoke image serves `GET /health` on port 8080 and returns `{"status":"ok"}`. The run image uses Debian bookworm's C runtime; a binary built with this build image uses the matching base distribution. The run image has no shell command in its entry point and contains no compiler, source, package manager, or application secrets. Supply environment, network, ports, and data mounts for your application when needed. These images are source recipes, not published registry tags.
79
+ The two images use the same Debian distribution and native library paths. A Linux executable built here runs inside the runtime container, including when your host is macOS or Windows.
80
+
81
+ ## Deploy an HTTP application
82
+
83
+ Start a project using Node.js 24 and npm on your host:
84
+
85
+ ```sh
86
+ npm install --global @greenpandastudios/aug-cli@next
87
+ aug init my-api
88
+ cd my-api
89
+ ```
90
+
91
+ Replace `main.aug` and add `endpoints.aug`. The starter's unused greeting module can remain. This service has one endpoint that returns a record as JSON.
92
+
93
+ **main.aug**
94
+
95
+ ```aug project=docker-http file=main.aug
96
+ import health from endpoints
97
+
98
+ serve health on port 8080
99
+ ```
100
+
101
+ **endpoints.aug**
102
+
103
+ ```aug project=docker-http file=endpoints.aug
104
+ record Health(string status)
105
+
106
+ /** Confirm that the HTTP handler can answer a request. */
107
+ endpoint GET "/health" as health() returns Health:
108
+ return Health(status="ok")
109
+
110
+ test endpoint health client:
111
+ when health_checks:
112
+ it answers_successfully:
113
+ response = client.request(method="GET", path="/health")
114
+ assert(condition=response.status == 200)
115
+ ```
116
+
117
+ Save `main.yaml` beside `main.aug`:
118
+
119
+ ```yaml
120
+ optimization: release
121
+ web:
122
+ host: 0.0.0.0
123
+ ```
124
+
125
+ `web.host` must accept connections through the container's network interface. August's default, `127.0.0.1`, only accepts connections inside that container. The port comes from the `serve` statement; `main.yaml` selects the listening address and release compilation.
126
+
127
+ Save this `Dockerfile` in `my-api`. Docker's [multi-stage build](https://docs.docker.com/build/building/multi-stage/) copies the compiled executable into the runtime image:
128
+
129
+ ```dockerfile
130
+ FROM augscript/build:local AS build
131
+ COPY . /workspace
132
+ RUN aug test /workspace \
133
+ && aug build /workspace --out /tmp/program
134
+ FROM augscript/run:local
135
+ COPY --from=build --chown=august:august /tmp/program /app/program
136
+ ```
137
+
138
+ Save `.dockerignore` in the same folder:
139
+
140
+ ```text
141
+ .git
142
+ .aug-build
143
+ .aug-native
144
+ .aug-packages
145
+ node_modules
146
+ .devcontainer
147
+ .env
148
+ .env.*
149
+ *.key
150
+ *.pem
151
+ ```
152
+
153
+ Keep credentials out of the build context. Mount runtime files at the paths your application uses. The compiler reads `main.yaml` while building; environment variables configure your application only when its code reads them. If your application imports source packages, commit its manifest and `aug.lock.json`, then add `RUN aug install /workspace --frozen` before the test/build step. [Frozen installs](packages.md#reproducible-builds) restore the locked dependency graph; include local package sources in the build context when the manifest references them.
154
+
155
+ Build and start your application image. The build runs the endpoint test before compiling. Keep your terminal in `my-api`:
156
+
157
+ ```sh
158
+ docker build -t my-api:0.1.0 .
159
+ docker run --detach --name my-api --init \
160
+ --restart unless-stopped \
161
+ --publish 127.0.0.1:8080:8080 \
162
+ my-api:0.1.0
163
+ curl --fail http://127.0.0.1:8080/health
164
+ ```
165
+
166
+ The test passes, and the HTTP request returns `{"status":"ok"}`. The published port is available on the Docker host's loopback address. Change the mapping deliberately if clients must connect directly from other hosts; omitting `127.0.0.1` publishes on all host interfaces. See [Docker's port publishing guide](https://docs.docker.com/engine/network/port-publishing/).
167
+
168
+ Inspect output and stop this deployment with:
169
+
170
+ ```sh
171
+ docker logs my-api
172
+ docker stop my-api
173
+ docker rm my-api
174
+ ```
175
+
176
+ ## Move the image to a server
177
+
178
+ Tag and push the **application** image to your registry. Replace `registry.example.com/team` with your registry and namespace, and sign in using that registry's instructions:
179
+
180
+ ```sh
181
+ docker tag my-api:0.1.0 registry.example.com/team/my-api:0.1.0
182
+ docker push registry.example.com/team/my-api:0.1.0
183
+ ```
184
+
185
+ On a Linux Docker server with access to that registry, pull and run it:
186
+
187
+ ```sh
188
+ docker pull registry.example.com/team/my-api:0.1.0
189
+ docker run --detach --name my-api --init \
190
+ --restart unless-stopped \
191
+ --publish 127.0.0.1:8080:8080 \
192
+ registry.example.com/team/my-api:0.1.0
193
+ ```
194
+
195
+ Place a TLS reverse proxy on that server in front of `127.0.0.1:8080`, or configure the application's [native TLS](web.md#openapi-configuration). For native TLS, use stable absolute container paths for the certificate and private key in `main.yaml`, then mount those files at the same paths when starting the container. Build for the server's CPU architecture: an ARM64 image does not become an x86-64 executable when pushed. These recipes build for the Docker engine's default platform; run the build on the target architecture or use a separately verified cross-platform build setup.
34
196
 
35
- For a reproducible image build without a host bind mount, use a multistage Dockerfile: start with `FROM augscript/build:local AS build`, copy the application into `/workspace`, run `aug build /workspace --out /tmp/program`, then start with `FROM augscript/run:local` and copy `/tmp/program` to `/app/program` with `--chown=august:august`. The repository's [`Dockerfile.smoke`](../docker/Dockerfile.smoke) exercises this pattern with the generated starter.
197
+ Pin the CLI version and retain the application image digest for each deployment. The base tags and Debian package versions can change; use reviewed base-image digests and controlled dependency updates when reproducing a release. Redistributed native libraries also have [license and notice obligations](production-readiness.md#dependencies-and-licenses). August remains experimental; use the [readiness review](production-readiness.md) when assessing a trial deployment.
package/docs/editor.md ADDED
@@ -0,0 +1,35 @@
1
+ # Write August in VS Code
2
+
3
+ Install the matching [AugScript extension](packages.md#vs-code), open the project folder, and start in `main.aug`. The editor reads the same checked contracts as the CLI, including unsaved changes. Install source dependencies with `aug run` or `aug install` so their declarations and documentation are available locally.
4
+
5
+ ## Complete a call
6
+
7
+ Type part of a function or method name and choose a completion. The editor inserts its labeled inputs and places the cursor at the first value. Press Tab to move through the values. Injected `resolve` inputs are supplied by DI and do not appear as arguments you must fill in.
8
+
9
+ For a function such as `total(int price, int quantity)`, completion inserts a call shaped like `total(price=0, quantity=0)`. The numbers are editable placeholders. Signature help describes each input while you type. If a local value has the same name as its input, you can use August's labeled shorthand, such as `total(price, quantity)`.
10
+
11
+ Public declarations from nearby modules and installed packages also appear in completion. Choosing one can add its import. Imports follow `export.aug`; private names and unexported declarations stay out of the suggestions.
12
+
13
+ ## Start a declaration or test
14
+
15
+ Type `record`, `interface`, `implementation`, or `method` for a declaration template. `test`, `testclass`, and `testendpoint` supply same-file tests. `endpointget`, `endpointpost`, `endpointpatch`, and `endpointdelete` supply route templates. Other templates cover imports, exports, conditions, errors, borrows, tasks, locks, interceptors, and comments.
16
+
17
+ The completion provider follows `block_style` and `indentation` in `main.yaml`. Templates are starting points: replace their names, values, and bodies before running the program. The extension also supplies VS Code snippets and enables Tab completion for August files.
18
+
19
+ ## Understand a contract
20
+
21
+ Hover over a declaration, a call, a keyword, or a built-in operation. Help includes Javadoc when it is present. Ctrl-click, or Cmd-click on macOS, opens the declaration. In an import, clicking `from` opens the sibling file or the package's `export.aug`.
22
+
23
+ Contract hints show inferred return types, mutation, capabilities, and checked errors beside executable headers. They are display text; saving or formatting does not add them to the source. A tooltip expands long contracts. Set `augscript.inferredContractHints` to false to hide them. Bodyless interfaces and foreign declarations still state their contracts in code.
24
+
25
+ ## Fix a diagnostic
26
+
27
+ Place the cursor on an error and open the lightbulb with Ctrl+. or Cmd+.. The editor offers fixes it can derive from the checked code: importing a visible declaration, correcting a nearby name or input label, expanding a wildcard import, adding a required method, or containing a mutable or native operation.
28
+
29
+ Review the edit before accepting it. A suggested name can be plausible without being the name you intended. After a change, run `aug check`, your tests, and `aug spec` to refresh the neighboring explanation.
30
+
31
+ ## Find the files and run tests
32
+
33
+ Run **AugScript: Enable File Icons** for the August icon theme. Source files have a blue mark; `main.aug` has an amber startup mark, and `export.aug` has a purple module mark. **AugScript: Open Welcome** opens the bundled illustrated guide.
34
+
35
+ Same-file cases appear in VS Code's Testing view. Use that view to run a case or group, or run `aug test` in the terminal. [Tests](testing.md) explains fixtures and endpoint tests. [CLI and configuration](tooling.md) describes language-server integration, native cache settings, and command-line tools.
@@ -1,26 +1,208 @@
1
1
  [
2
- {"path":"examples/hello","title":"Hello world with dependencies","group":"Start here","description":"A greeter, a logger, narrow folder exports, and explicit application bindings."},
3
- {"path":"examples/new-syntax","title":"Labeled calls and injection","group":"Start here","description":"Constructor injection, named inputs, ordinary functions, and same-file tests."},
4
- {"path":"examples/developer-workflow","title":"A small tested application","group":"Start here","description":"A calculator module with logging, fixtures, groups, and parameterized tests."},
5
- {"path":"examples/cli-args","title":"Command-line arguments","group":"Start here","description":"Read arguments, inspect collections, and return a process exit status."},
6
- {"path":"examples/collections","title":"Lists, tuples, sets, and maps","group":"Values and errors","description":"Create typed collections and update them through checked mutable access."},
7
- {"path":"examples/generics","title":"Generic contracts","group":"Values and errors","description":"Write reusable records, interfaces, classes, and functions with type parameters."},
8
- {"path":"examples/generic-di","title":"Generic dependency injection","group":"Values and errors","description":"Bind a generic interface and resolve a class that uses it."},
9
- {"path":"examples/errors","title":"Checked failures","group":"Values and errors","description":"Declare errors with unless, catch them, and run cleanup."},
10
- {"path":"examples/ownership","title":"Read access and mutable borrows","group":"State and lifetime","description":"Share a reference for reading and grant explicit access for mutation."},
11
- {"path":"examples/ownership-transfer","title":"Move ownership","group":"State and lifetime","description":"Transfer an owned resource between labeled calls."},
12
- {"path":"examples/drop","title":"Resource cleanup","group":"State and lifetime","description":"Release an owned resource when its lifetime ends."},
13
- {"path":"examples/visibility","title":"Private state and helpers","group":"State and lifetime","description":"Keep underscore-prefixed implementation details inside their scope."},
14
- {"path":"examples/approved-design","title":"Modules and composition","group":"Modules and packages","description":"Combine domain modules, generic values, explicit capabilities, and scoped providers."},
15
- {"path":"examples/interceptors","title":"Function and constructor middleware","group":"Modules and packages","description":"Layer interceptors, map inputs, and keep logging dependencies explicit."},
16
- {"path":"examples/packages/math","title":"Create a package","group":"Modules and packages","description":"Publish a small arithmetic library through export.aug and test its public surface."},
17
- {"path":"examples/packages/app","title":"Use a package","group":"Modules and packages","description":"Install the neighboring arithmetic package and import it through a local alias."},
18
- {"path":"examples/ffi","title":"A native C boundary","group":"Native applications","description":"Declare a C operation and call it inside an unsafe block."},
19
- {"path":"examples/benchmark","title":"A finite benchmark","group":"Native applications","description":"Measure a deterministic arithmetic workload with aug bench."},
20
- {"path":"examples/oidc-login","title":"OpenID Connect login application","group":"Web applications","description":"A login page, provider, client, session JWT, and logout flow in one August project."},
21
- {"path":"benchmarks/startup","title":"Startup benchmark","group":"Measured programs","description":"The small program used to measure process startup."},
22
- {"path":"benchmarks/cpu","title":"CPU benchmark","group":"Measured programs","description":"Two million dependent integer steps with a checked result."},
23
- {"path":"benchmarks/collections","title":"Map and Set benchmark","group":"Measured programs","description":"Insert, find, and iterate over 20,000 collection entries."},
24
- {"path":"benchmarks/json","title":"JSON benchmark","group":"Measured programs","description":"Parse, decode, and serialize a typed record 5,000 times."},
25
- {"path":"benchmarks/http","title":"HTTP benchmark","group":"Measured programs","description":"Serve the typed JSON endpoint used in the throughput measurements."}
2
+ {
3
+ "path": "examples/hello",
4
+ "title": "Hello world with dependencies",
5
+ "group": "Start here",
6
+ "description": "The application prints a greeting through an injected logger. Its entry point selects the providers, and each folder exposes a small public surface.",
7
+ "walkthrough": [
8
+ {
9
+ "file": "main.aug",
10
+ "explanation": "Startup binds the console, logger, and application, then resolves the greeter and calls it."
11
+ },
12
+ {
13
+ "file": "app/greeter.aug",
14
+ "explanation": "The greeter receives its logger in the header and delegates the greeting to it. The interface states the console effect."
15
+ },
16
+ {
17
+ "file": "logging/export.aug",
18
+ "explanation": "This is the logging folder's public surface. Callers can import the exported contract and provider."
19
+ },
20
+ {
21
+ "file": "logging/logger.aug",
22
+ "explanation": "The contract describes the log operation and its output capability; the console provider implements it."
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "path": "examples/weather-api",
28
+ "title": "Weather API",
29
+ "group": "Web applications",
30
+ "description": "Serve five simulated forecasts as typed JSON. The record, endpoint, and tests share a file; main.aug starts the listener and main.yaml enables OpenAPI.",
31
+ "walkthrough": [
32
+ {
33
+ "file": "main.aug",
34
+ "explanation": "Import the forecast endpoint and serve it on port 8787."
35
+ },
36
+ {
37
+ "file": "forecasts.aug",
38
+ "explanation": "Read the response record, five fixed forecasts, and cases that exercise the endpoint pipeline."
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "path": "examples/new-syntax",
44
+ "title": "Labeled calls and injection",
45
+ "group": "Start here",
46
+ "description": "Constructor injection, named inputs, ordinary functions, and same-file tests."
47
+ },
48
+ {
49
+ "path": "examples/developer-workflow",
50
+ "title": "A small tested application",
51
+ "group": "Start here",
52
+ "description": "A calculator logs each addition. Its nearby tests replace the logger and verify both labeled inputs and fresh setup.",
53
+ "walkthrough": [
54
+ {
55
+ "file": "main.aug",
56
+ "explanation": "Startup supplies providers, uses collections, invokes the calculator, and catches a simulated load failure."
57
+ },
58
+ {
59
+ "file": "calculator.aug",
60
+ "explanation": "Read the arithmetic contract, the injected logger, and the same-file cases together. The private silent adapter keeps tests independent of output."
61
+ },
62
+ {
63
+ "file": "logging/logger.aug",
64
+ "explanation": "This is the contract used by both the production logger and the test adapter."
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "path": "examples/cli-args",
70
+ "title": "Command-line arguments",
71
+ "group": "Start here",
72
+ "description": "Read arguments, inspect collections, and return a process exit status."
73
+ },
74
+ {
75
+ "path": "examples/collections",
76
+ "title": "Lists, tuples, sets, and maps",
77
+ "group": "Values and errors",
78
+ "description": "Create typed collections and update them through checked mutable access."
79
+ },
80
+ {
81
+ "path": "examples/generics",
82
+ "title": "Generic contracts",
83
+ "group": "Values and errors",
84
+ "description": "Write reusable records, interfaces, classes, and functions with type parameters."
85
+ },
86
+ {
87
+ "path": "examples/generic-di",
88
+ "title": "Generic dependency injection",
89
+ "group": "Values and errors",
90
+ "description": "Bind a generic interface and resolve a class that uses it."
91
+ },
92
+ {
93
+ "path": "examples/errors",
94
+ "title": "Checked failures",
95
+ "group": "Values and errors",
96
+ "description": "Declare errors with unless, catch them, and run cleanup."
97
+ },
98
+ {
99
+ "path": "examples/ownership",
100
+ "title": "Read access and mutable borrows",
101
+ "group": "State and lifetime",
102
+ "description": "Share a reference for reading and grant explicit access for mutation."
103
+ },
104
+ {
105
+ "path": "examples/ownership-transfer",
106
+ "title": "Move ownership",
107
+ "group": "State and lifetime",
108
+ "description": "Transfer an owned resource between labeled calls."
109
+ },
110
+ {
111
+ "path": "examples/drop",
112
+ "title": "Resource cleanup",
113
+ "group": "State and lifetime",
114
+ "description": "Release an owned resource when its lifetime ends."
115
+ },
116
+ {
117
+ "path": "examples/visibility",
118
+ "title": "Private state and helpers",
119
+ "group": "State and lifetime",
120
+ "description": "Keep underscore-prefixed implementation details inside their scope."
121
+ },
122
+ {
123
+ "path": "examples/approved-design",
124
+ "title": "Modules and composition",
125
+ "group": "Modules and packages",
126
+ "description": "Startup combines narrow domain exports with a scoped counter provider. Records and validation keep data and checked failures visible.",
127
+ "walkthrough": [
128
+ {
129
+ "file": "main.aug",
130
+ "explanation": "Follow the domain imports, provider choices, explicit scope, and checked failure before opening the implementation files."
131
+ },
132
+ {
133
+ "file": "domain/export.aug",
134
+ "explanation": "The export file gives callers the folder's deliberate public API."
135
+ },
136
+ {
137
+ "file": "domain/numbers.aug",
138
+ "explanation": "The validation interceptor rejects a negative input. Tests cover successful doubling and recovery from that failure."
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "path": "examples/interceptors",
144
+ "title": "Function and constructor middleware",
145
+ "group": "Modules and packages",
146
+ "description": "Layer interceptors, map inputs, and keep logging dependencies explicit."
147
+ },
148
+ {
149
+ "path": "examples/packages/math",
150
+ "title": "Create a package",
151
+ "group": "Modules and packages",
152
+ "description": "Publish a small arithmetic library through export.aug and test its public surface."
153
+ },
154
+ {
155
+ "path": "examples/packages/app",
156
+ "title": "Use a package",
157
+ "group": "Modules and packages",
158
+ "description": "Install the neighboring arithmetic package and import it through a local alias."
159
+ },
160
+ {
161
+ "path": "examples/ffi",
162
+ "title": "A native C boundary",
163
+ "group": "Native applications",
164
+ "description": "Declare a C operation and call it inside an unsafe block."
165
+ },
166
+ {
167
+ "path": "examples/benchmark",
168
+ "title": "A finite benchmark",
169
+ "group": "Native applications",
170
+ "description": "Measure a deterministic arithmetic workload with aug bench."
171
+ },
172
+ {
173
+ "path": "examples/oidc-login",
174
+ "title": "OpenID Connect login application",
175
+ "group": "Web applications",
176
+ "description": "One executable hosts a login page, an OpenID Connect provider and client, session JWTs, and logout. Accounts, keys, and sessions are held in memory for this development demonstration."
177
+ },
178
+ {
179
+ "path": "benchmarks/startup",
180
+ "title": "Startup benchmark",
181
+ "group": "Measured programs",
182
+ "description": "The small program used to measure process startup."
183
+ },
184
+ {
185
+ "path": "benchmarks/cpu",
186
+ "title": "CPU benchmark",
187
+ "group": "Measured programs",
188
+ "description": "Two million dependent integer steps with a checked result."
189
+ },
190
+ {
191
+ "path": "benchmarks/collections",
192
+ "title": "Map and Set benchmark",
193
+ "group": "Measured programs",
194
+ "description": "Insert, find, and iterate over 20,000 collection entries."
195
+ },
196
+ {
197
+ "path": "benchmarks/json",
198
+ "title": "JSON benchmark",
199
+ "group": "Measured programs",
200
+ "description": "Parse, decode, and serialize a typed record 5,000 times."
201
+ },
202
+ {
203
+ "path": "benchmarks/http",
204
+ "title": "HTTP benchmark",
205
+ "group": "Measured programs",
206
+ "description": "Serve the typed JSON endpoint used in the throughput measurements."
207
+ }
26
208
  ]