@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.
Files changed (414) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +13 -0
  3. package/THIRD_PARTY_NOTICES.md +18 -0
  4. package/bin/aug.mjs +3 -0
  5. package/docs/api/crypto.md +351 -0
  6. package/docs/api/io.md +207 -0
  7. package/docs/api/json.md +21 -0
  8. package/docs/api/memory.md +109 -0
  9. package/docs/api/time.md +54 -0
  10. package/docs/api/web.md +184 -0
  11. package/docs/assets/benchmarks/execution.svg +2978 -0
  12. package/docs/assets/benchmarks/http.svg +1674 -0
  13. package/docs/assets/benchmarks/improvements.svg +2315 -0
  14. package/docs/assets/benchmarks/memory.svg +1891 -0
  15. package/docs/benchmark-baseline.json +1087 -0
  16. package/docs/benchmark-results.json +91123 -0
  17. package/docs/benchmarks.json +38 -0
  18. package/docs/compatibility.md +42 -0
  19. package/docs/concurrency-implementation.md +18 -0
  20. package/docs/diagnostics.md +97 -0
  21. package/docs/docker.md +35 -0
  22. package/docs/example-projects.json +26 -0
  23. package/docs/examples/approved-design/counters.md +253 -0
  24. package/docs/examples/approved-design/dependencies/august/0.19.0/io/contracts.md +395 -0
  25. package/docs/examples/approved-design/domain/app.md +165 -0
  26. package/docs/examples/approved-design/domain/export.md +83 -0
  27. package/docs/examples/approved-design/domain/models.md +80 -0
  28. package/docs/examples/approved-design/domain/numbers.md +248 -0
  29. package/docs/examples/approved-design/index.md +39 -0
  30. package/docs/examples/approved-design/main-yaml.md +24 -0
  31. package/docs/examples/approved-design/main.md +215 -0
  32. package/docs/examples/benchmark/index.md +33 -0
  33. package/docs/examples/benchmark/main-yaml.md +17 -0
  34. package/docs/examples/benchmark/main.md +117 -0
  35. package/docs/examples/cli-args/index.md +32 -0
  36. package/docs/examples/cli-args/main.md +107 -0
  37. package/docs/examples/collections/index.md +32 -0
  38. package/docs/examples/collections/main.md +118 -0
  39. package/docs/examples/collections-benchmark/index.md +34 -0
  40. package/docs/examples/collections-benchmark/main.md +115 -0
  41. package/docs/examples/cpu-benchmark/index.md +34 -0
  42. package/docs/examples/cpu-benchmark/main.md +90 -0
  43. package/docs/examples/developer-workflow/calculator.md +357 -0
  44. package/docs/examples/developer-workflow/dependencies/august/0.19.0/io/contracts.md +395 -0
  45. package/docs/examples/developer-workflow/index.md +37 -0
  46. package/docs/examples/developer-workflow/logging/console.md +124 -0
  47. package/docs/examples/developer-workflow/logging/export.md +70 -0
  48. package/docs/examples/developer-workflow/logging/logger.md +111 -0
  49. package/docs/examples/developer-workflow/main.md +172 -0
  50. package/docs/examples/drop/index.md +33 -0
  51. package/docs/examples/drop/main.md +85 -0
  52. package/docs/examples/drop/resource.md +95 -0
  53. package/docs/examples/errors/errors.md +85 -0
  54. package/docs/examples/errors/index.md +33 -0
  55. package/docs/examples/errors/main.md +92 -0
  56. package/docs/examples/ffi/index.md +33 -0
  57. package/docs/examples/ffi/main.md +75 -0
  58. package/docs/examples/ffi/native.md +93 -0
  59. package/docs/examples/generic-di/dependencies/august/0.19.0/io/contracts.md +395 -0
  60. package/docs/examples/generic-di/index.md +33 -0
  61. package/docs/examples/generic-di/main.md +111 -0
  62. package/docs/examples/generic-di/types.md +180 -0
  63. package/docs/examples/generics/index.md +33 -0
  64. package/docs/examples/generics/main.md +120 -0
  65. package/docs/examples/generics/types.md +189 -0
  66. package/docs/examples/hello/app/export.md +67 -0
  67. package/docs/examples/hello/app/greeter.md +190 -0
  68. package/docs/examples/hello/dependencies/august/0.19.0/io/contracts.md +395 -0
  69. package/docs/examples/hello/index.md +37 -0
  70. package/docs/examples/hello/logging/console.md +121 -0
  71. package/docs/examples/hello/logging/export.md +71 -0
  72. package/docs/examples/hello/logging/logger.md +120 -0
  73. package/docs/examples/hello/main.md +115 -0
  74. package/docs/examples/http-benchmark/index.md +35 -0
  75. package/docs/examples/http-benchmark/main.md +79 -0
  76. package/docs/examples/http-benchmark/routes.md +88 -0
  77. package/docs/examples/index.md +60 -0
  78. package/docs/examples/interceptors/app.md +250 -0
  79. package/docs/examples/interceptors/dependencies/august/0.19.0/io/contracts.md +395 -0
  80. package/docs/examples/interceptors/index.md +35 -0
  81. package/docs/examples/interceptors/interceptors.md +284 -0
  82. package/docs/examples/interceptors/logging.md +155 -0
  83. package/docs/examples/interceptors/main.md +162 -0
  84. package/docs/examples/json-benchmark/data.md +71 -0
  85. package/docs/examples/json-benchmark/dependencies/august/0.19.0/json/contracts.md +103 -0
  86. package/docs/examples/json-benchmark/index.md +35 -0
  87. package/docs/examples/json-benchmark/main.md +131 -0
  88. package/docs/examples/new-syntax/console.md +118 -0
  89. package/docs/examples/new-syntax/dependencies/august/0.19.0/io/contracts.md +395 -0
  90. package/docs/examples/new-syntax/greeter.md +145 -0
  91. package/docs/examples/new-syntax/index.md +36 -0
  92. package/docs/examples/new-syntax/logger.md +111 -0
  93. package/docs/examples/new-syntax/main.md +135 -0
  94. package/docs/examples/new-syntax/math.md +79 -0
  95. package/docs/examples/oidc-login/client/contracts.md +151 -0
  96. package/docs/examples/oidc-login/client/endpoints.md +263 -0
  97. package/docs/examples/oidc-login/client/export.md +107 -0
  98. package/docs/examples/oidc-login/client/login.md +515 -0
  99. package/docs/examples/oidc-login/client/logout.md +249 -0
  100. package/docs/examples/oidc-login/client/protocol.md +595 -0
  101. package/docs/examples/oidc-login/client/session.md +297 -0
  102. package/docs/examples/oidc-login/client/views.md +144 -0
  103. package/docs/examples/oidc-login/common/export.md +115 -0
  104. package/docs/examples/oidc-login/common/headers.md +162 -0
  105. package/docs/examples/oidc-login/common/keys.md +336 -0
  106. package/docs/examples/oidc-login/common/settings.md +116 -0
  107. package/docs/examples/oidc-login/common/views.md +103 -0
  108. package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/contracts.md +925 -0
  109. package/docs/examples/oidc-login/dependencies/august/0.19.0/crypto/jose.md +434 -0
  110. package/docs/examples/oidc-login/dependencies/august/0.19.0/json/contracts.md +103 -0
  111. package/docs/examples/oidc-login/dependencies/august/0.19.0/memory/store.md +374 -0
  112. package/docs/examples/oidc-login/dependencies/august/0.19.0/time/contracts.md +150 -0
  113. package/docs/examples/oidc-login/dependencies/august/0.19.0/web/contracts.md +532 -0
  114. package/docs/examples/oidc-login/index.md +57 -0
  115. package/docs/examples/oidc-login/main-yaml.md +28 -0
  116. package/docs/examples/oidc-login/main.md +283 -0
  117. package/docs/examples/oidc-login/provider/authorization.md +457 -0
  118. package/docs/examples/oidc-login/provider/contracts.md +267 -0
  119. package/docs/examples/oidc-login/provider/credentials.md +148 -0
  120. package/docs/examples/oidc-login/provider/discovery.md +215 -0
  121. package/docs/examples/oidc-login/provider/export.md +131 -0
  122. package/docs/examples/oidc-login/provider/token.md +364 -0
  123. package/docs/examples/oidc-login/provider/userinfo.md +228 -0
  124. package/docs/examples/oidc-login/provider/views.md +137 -0
  125. package/docs/examples/ownership/counter.md +140 -0
  126. package/docs/examples/ownership/index.md +33 -0
  127. package/docs/examples/ownership/main.md +90 -0
  128. package/docs/examples/ownership-transfer/dependencies/august/0.19.0/io/contracts.md +395 -0
  129. package/docs/examples/ownership-transfer/index.md +33 -0
  130. package/docs/examples/ownership-transfer/main.md +125 -0
  131. package/docs/examples/ownership-transfer/resource.md +150 -0
  132. package/docs/examples/packages-app/dependencies/packages/@example/aug-math/0.1.0/arithmetic.md +117 -0
  133. package/docs/examples/packages-app/index.md +34 -0
  134. package/docs/examples/packages-app/main-yaml.md +18 -0
  135. package/docs/examples/packages-app/main.md +80 -0
  136. package/docs/examples/packages-math/aug-package-json.md +24 -0
  137. package/docs/examples/packages-math/index.md +36 -0
  138. package/docs/examples/packages-math/package-json.md +25 -0
  139. package/docs/examples/packages-math/src/arithmetic.md +121 -0
  140. package/docs/examples/packages-math/src/export.md +63 -0
  141. package/docs/examples/startup-benchmark/index.md +34 -0
  142. package/docs/examples/startup-benchmark/main.md +68 -0
  143. package/docs/examples/visibility/counter.md +142 -0
  144. package/docs/examples/visibility/index.md +33 -0
  145. package/docs/examples/visibility/main.md +96 -0
  146. package/docs/examples.json +47 -0
  147. package/docs/getting-started.md +5 -0
  148. package/docs/grammar.md +136 -0
  149. package/docs/implementation-map.md +106 -0
  150. package/docs/index.md +46 -0
  151. package/docs/language-conformance.md +30 -0
  152. package/docs/language-constructs.md +1461 -0
  153. package/docs/language-design-audit.md +147 -0
  154. package/docs/maintaining-docs.md +43 -0
  155. package/docs/packages.md +184 -0
  156. package/docs/performance.md +535 -0
  157. package/docs/production-readiness.md +39 -0
  158. package/docs/reference.md +361 -0
  159. package/docs/release-review.md +23 -0
  160. package/docs/releasing.md +79 -0
  161. package/docs/roadmap.md +13 -0
  162. package/docs/specifications.md +86 -0
  163. package/docs/testing.md +120 -0
  164. package/docs/tooling.md +197 -0
  165. package/docs/web-implementation-plan.md +39 -0
  166. package/docs/web-library-gaps.md +27 -0
  167. package/docs/web.md +197 -0
  168. package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  169. package/examples/approved-design/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  170. package/examples/approved-design/.aug-spec/manifest.json +14 -0
  171. package/examples/approved-design/counters.aug +22 -0
  172. package/examples/approved-design/counters.aug.md +177 -0
  173. package/examples/approved-design/domain/app.aug +12 -0
  174. package/examples/approved-design/domain/app.aug.md +97 -0
  175. package/examples/approved-design/domain/export.aug +5 -0
  176. package/examples/approved-design/domain/export.aug.md +25 -0
  177. package/examples/approved-design/domain/models.aug +2 -0
  178. package/examples/approved-design/domain/models.aug.md +30 -0
  179. package/examples/approved-design/domain/numbers.aug +29 -0
  180. package/examples/approved-design/domain/numbers.aug.md +141 -0
  181. package/examples/approved-design/main.aug +26 -0
  182. package/examples/approved-design/main.aug.md +108 -0
  183. package/examples/approved-design/main.yaml +8 -0
  184. package/examples/benchmark/.aug-spec/manifest.json +7 -0
  185. package/examples/benchmark/main.aug +17 -0
  186. package/examples/benchmark/main.aug.md +43 -0
  187. package/examples/benchmark/main.yaml +1 -0
  188. package/examples/cli-args/.aug-spec/manifest.json +7 -0
  189. package/examples/cli-args/main.aug +15 -0
  190. package/examples/cli-args/main.aug.md +38 -0
  191. package/examples/collections/.aug-spec/manifest.json +7 -0
  192. package/examples/collections/main.aug +18 -0
  193. package/examples/collections/main.aug.md +43 -0
  194. package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  195. package/examples/developer-workflow/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  196. package/examples/developer-workflow/.aug-spec/manifest.json +13 -0
  197. package/examples/developer-workflow/calculator.aug +55 -0
  198. package/examples/developer-workflow/calculator.aug.md +228 -0
  199. package/examples/developer-workflow/logging/console.aug +8 -0
  200. package/examples/developer-workflow/logging/console.aug.md +67 -0
  201. package/examples/developer-workflow/logging/export.aug +2 -0
  202. package/examples/developer-workflow/logging/export.aug.md +19 -0
  203. package/examples/developer-workflow/logging/logger.aug +6 -0
  204. package/examples/developer-workflow/logging/logger.aug.md +57 -0
  205. package/examples/developer-workflow/main.aug +25 -0
  206. package/examples/developer-workflow/main.aug.md +79 -0
  207. package/examples/drop/.aug-spec/manifest.json +8 -0
  208. package/examples/drop/main.aug +3 -0
  209. package/examples/drop/main.aug.md +35 -0
  210. package/examples/drop/resource.aug +8 -0
  211. package/examples/drop/resource.aug.md +44 -0
  212. package/examples/errors/.aug-spec/manifest.json +8 -0
  213. package/examples/errors/errors.aug +6 -0
  214. package/examples/errors/errors.aug.md +33 -0
  215. package/examples/errors/main.aug +7 -0
  216. package/examples/errors/main.aug.md +36 -0
  217. package/examples/ffi/.aug-spec/manifest.json +8 -0
  218. package/examples/ffi/main.aug +2 -0
  219. package/examples/ffi/main.aug.md +27 -0
  220. package/examples/ffi/native.aug +6 -0
  221. package/examples/ffi/native.aug.md +43 -0
  222. package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  223. package/examples/generic-di/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  224. package/examples/generic-di/.aug-spec/manifest.json +10 -0
  225. package/examples/generic-di/main.aug +9 -0
  226. package/examples/generic-di/main.aug.md +49 -0
  227. package/examples/generic-di/types.aug +17 -0
  228. package/examples/generic-di/types.aug.md +124 -0
  229. package/examples/generics/.aug-spec/manifest.json +8 -0
  230. package/examples/generics/main.aug +9 -0
  231. package/examples/generics/main.aug.md +58 -0
  232. package/examples/generics/types.aug +19 -0
  233. package/examples/generics/types.aug.md +132 -0
  234. package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  235. package/examples/hello/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  236. package/examples/hello/.aug-spec/manifest.json +14 -0
  237. package/examples/hello/app/export.aug +1 -0
  238. package/examples/hello/app/export.aug.md +17 -0
  239. package/examples/hello/app/greeter.aug +22 -0
  240. package/examples/hello/app/greeter.aug.md +109 -0
  241. package/examples/hello/logging/console.aug +7 -0
  242. package/examples/hello/logging/console.aug.md +65 -0
  243. package/examples/hello/logging/export.aug +2 -0
  244. package/examples/hello/logging/export.aug.md +19 -0
  245. package/examples/hello/logging/logger.aug +9 -0
  246. package/examples/hello/logging/logger.aug.md +59 -0
  247. package/examples/hello/main.aug +9 -0
  248. package/examples/hello/main.aug.md +49 -0
  249. package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  250. package/examples/interceptors/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  251. package/examples/interceptors/.aug-spec/manifest.json +12 -0
  252. package/examples/interceptors/app.aug +28 -0
  253. package/examples/interceptors/app.aug.md +162 -0
  254. package/examples/interceptors/interceptors.aug +40 -0
  255. package/examples/interceptors/interceptors.aug.md +180 -0
  256. package/examples/interceptors/logging.aug +12 -0
  257. package/examples/interceptors/logging.aug.md +96 -0
  258. package/examples/interceptors/main.aug +22 -0
  259. package/examples/interceptors/main.aug.md +76 -0
  260. package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  261. package/examples/new-syntax/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  262. package/examples/new-syntax/.aug-spec/manifest.json +13 -0
  263. package/examples/new-syntax/console.aug +7 -0
  264. package/examples/new-syntax/console.aug.md +63 -0
  265. package/examples/new-syntax/greeter.aug +10 -0
  266. package/examples/new-syntax/greeter.aug.md +89 -0
  267. package/examples/new-syntax/logger.aug +6 -0
  268. package/examples/new-syntax/logger.aug.md +57 -0
  269. package/examples/new-syntax/main.aug +12 -0
  270. package/examples/new-syntax/main.aug.md +64 -0
  271. package/examples/new-syntax/math.aug +3 -0
  272. package/examples/new-syntax/math.aug.md +29 -0
  273. package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug +73 -0
  274. package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/contracts.aug.md +791 -0
  275. package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug +68 -0
  276. package/examples/oidc-login/.aug-spec/august/0.19.0/crypto/jose.aug.md +266 -0
  277. package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug +6 -0
  278. package/examples/oidc-login/.aug-spec/august/0.19.0/json/contracts.aug.md +55 -0
  279. package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug +45 -0
  280. package/examples/oidc-login/.aug-spec/august/0.19.0/memory/store.aug.md +250 -0
  281. package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug +11 -0
  282. package/examples/oidc-login/.aug-spec/august/0.19.0/time/contracts.aug.md +96 -0
  283. package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug +58 -0
  284. package/examples/oidc-login/.aug-spec/august/0.19.0/web/contracts.aug.md +420 -0
  285. package/examples/oidc-login/.aug-spec/manifest.json +40 -0
  286. package/examples/oidc-login/README.md +29 -0
  287. package/examples/oidc-login/client/contracts.aug +7 -0
  288. package/examples/oidc-login/client/contracts.aug.md +80 -0
  289. package/examples/oidc-login/client/endpoints.aug +21 -0
  290. package/examples/oidc-login/client/endpoints.aug.md +161 -0
  291. package/examples/oidc-login/client/export.aug +7 -0
  292. package/examples/oidc-login/client/export.aug.md +29 -0
  293. package/examples/oidc-login/client/login.aug +58 -0
  294. package/examples/oidc-login/client/login.aug.md +331 -0
  295. package/examples/oidc-login/client/logout.aug +18 -0
  296. package/examples/oidc-login/client/logout.aug.md +150 -0
  297. package/examples/oidc-login/client/protocol.aug +106 -0
  298. package/examples/oidc-login/client/protocol.aug.md +326 -0
  299. package/examples/oidc-login/client/session.aug +34 -0
  300. package/examples/oidc-login/client/session.aug.md +155 -0
  301. package/examples/oidc-login/client/views.aug +21 -0
  302. package/examples/oidc-login/client/views.aug.md +68 -0
  303. package/examples/oidc-login/common/export.aug +9 -0
  304. package/examples/oidc-login/common/export.aug.md +33 -0
  305. package/examples/oidc-login/common/headers.aug +11 -0
  306. package/examples/oidc-login/common/headers.aug.md +79 -0
  307. package/examples/oidc-login/common/keys.aug +37 -0
  308. package/examples/oidc-login/common/keys.aug.md +207 -0
  309. package/examples/oidc-login/common/settings.aug +4 -0
  310. package/examples/oidc-login/common/settings.aug.md +47 -0
  311. package/examples/oidc-login/common/views.aug +16 -0
  312. package/examples/oidc-login/common/views.aug.md +34 -0
  313. package/examples/oidc-login/main.aug +39 -0
  314. package/examples/oidc-login/main.aug.md +166 -0
  315. package/examples/oidc-login/main.yaml +12 -0
  316. package/examples/oidc-login/provider/authorization.aug +59 -0
  317. package/examples/oidc-login/provider/authorization.aug.md +264 -0
  318. package/examples/oidc-login/provider/contracts.aug +15 -0
  319. package/examples/oidc-login/provider/contracts.aug.md +193 -0
  320. package/examples/oidc-login/provider/credentials.aug +10 -0
  321. package/examples/oidc-login/provider/credentials.aug.md +64 -0
  322. package/examples/oidc-login/provider/discovery.aug +13 -0
  323. package/examples/oidc-login/provider/discovery.aug.md +133 -0
  324. package/examples/oidc-login/provider/export.aug +13 -0
  325. package/examples/oidc-login/provider/export.aug.md +41 -0
  326. package/examples/oidc-login/provider/token.aug +37 -0
  327. package/examples/oidc-login/provider/token.aug.md +223 -0
  328. package/examples/oidc-login/provider/userinfo.aug +26 -0
  329. package/examples/oidc-login/provider/userinfo.aug.md +104 -0
  330. package/examples/oidc-login/provider/views.aug +18 -0
  331. package/examples/oidc-login/provider/views.aug.md +63 -0
  332. package/examples/ownership/.aug-spec/manifest.json +8 -0
  333. package/examples/ownership/counter.aug +14 -0
  334. package/examples/ownership/counter.aug.md +85 -0
  335. package/examples/ownership/main.aug +4 -0
  336. package/examples/ownership/main.aug.md +38 -0
  337. package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug +36 -0
  338. package/examples/ownership-transfer/.aug-spec/august/0.19.0/io/contracts.aug.md +316 -0
  339. package/examples/ownership-transfer/.aug-spec/manifest.json +10 -0
  340. package/examples/ownership-transfer/main.aug +9 -0
  341. package/examples/ownership-transfer/main.aug.md +63 -0
  342. package/examples/ownership-transfer/resource.aug +16 -0
  343. package/examples/ownership-transfer/resource.aug.md +89 -0
  344. package/examples/packages/README.md +15 -0
  345. package/examples/packages/app/.aug-spec/manifest.json +9 -0
  346. package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug +9 -0
  347. package/examples/packages/app/.aug-spec/packages/@example/aug-math/0.1.0/arithmetic.aug.md +63 -0
  348. package/examples/packages/app/main.aug +2 -0
  349. package/examples/packages/app/main.aug.md +33 -0
  350. package/examples/packages/app/main.yaml +2 -0
  351. package/examples/packages/math/.aug-spec/manifest.json +8 -0
  352. package/examples/packages/math/README.md +3 -0
  353. package/examples/packages/math/aug-package.json +8 -0
  354. package/examples/packages/math/package.json +9 -0
  355. package/examples/packages/math/src/arithmetic.aug +8 -0
  356. package/examples/packages/math/src/arithmetic.aug.md +63 -0
  357. package/examples/packages/math/src/export.aug +1 -0
  358. package/examples/packages/math/src/export.aug.md +17 -0
  359. package/examples/visibility/.aug-spec/manifest.json +8 -0
  360. package/examples/visibility/counter.aug +14 -0
  361. package/examples/visibility/counter.aug.md +87 -0
  362. package/examples/visibility/main.aug +7 -0
  363. package/examples/visibility/main.aug.md +39 -0
  364. package/package.json +50 -0
  365. package/runtime/aug_crypto.c +121 -0
  366. package/runtime/aug_html.c +93 -0
  367. package/runtime/aug_http.c +829 -0
  368. package/runtime/aug_json.c +165 -0
  369. package/runtime/aug_runtime.c +792 -0
  370. package/runtime/aug_runtime.h +245 -0
  371. package/runtime/aug_tasks.c +172 -0
  372. package/runtime/aug_time.c +5 -0
  373. package/runtime/aug_values.c +80 -0
  374. package/scripts/bootstrap-native.mjs +121 -0
  375. package/scripts/native-dependencies.lock.json +65 -0
  376. package/scripts/native-home.mjs +11 -0
  377. package/src/actions.js +109 -0
  378. package/src/ast.js +19 -0
  379. package/src/builtins.js +93 -0
  380. package/src/checker.js +2896 -0
  381. package/src/cli.js +344 -0
  382. package/src/codegen.js +1159 -0
  383. package/src/config.js +149 -0
  384. package/src/continuation.js +110 -0
  385. package/src/di.js +24 -0
  386. package/src/documentation.js +27 -0
  387. package/src/editor.js +782 -0
  388. package/src/effects.js +29 -0
  389. package/src/fixes.js +222 -0
  390. package/src/formatter.js +296 -0
  391. package/src/freshness.js +154 -0
  392. package/src/help.js +212 -0
  393. package/src/html.js +27 -0
  394. package/src/http-policies.js +90 -0
  395. package/src/inference.js +16 -0
  396. package/src/interceptors.js +70 -0
  397. package/src/javadoc.js +67 -0
  398. package/src/lexer.js +199 -0
  399. package/src/libraries.js +31 -0
  400. package/src/lsp.js +180 -0
  401. package/src/native.js +144 -0
  402. package/src/navigation.js +162 -0
  403. package/src/openapi.js +220 -0
  404. package/src/ownership.js +232 -0
  405. package/src/package-manager.js +299 -0
  406. package/src/parser.js +1155 -0
  407. package/src/policies.js +130 -0
  408. package/src/project-init.js +19 -0
  409. package/src/project.js +292 -0
  410. package/src/schemas.js +62 -0
  411. package/src/semantic.js +255 -0
  412. package/src/spec.js +738 -0
  413. package/src/testing.js +186 -0
  414. package/src/types.js +10 -0
@@ -0,0 +1,147 @@
1
+ # AugScript: simplicity and developer scalability
2
+
3
+ ## Readability audit, September 29, 2026
4
+
5
+ August 0.19 uses ASD-STE100 as guidance for plain technical explanations. The language keeps local behavior and neighboring contracts in view. The deterministic [spec compiler](specifications.md) extends that context to readers who do not read code.
6
+
7
+ | Finding | Change |
8
+ | --- | --- |
9
+ | Symbolic booleans required translation into prose. | Only `and`, `or`, and `not` are accepted. Comparisons bind before `not`. |
10
+ | Constructor `=>` work interrupted the class header. | `initialize` sits inside the class or record beside its fields and behavior. |
11
+ | Optional values had several spellings and separate missing/null states. | Only `optional Type` is accepted. Its value is T or null; omission becomes null. |
12
+ | Several DI spellings described the same operation. | Use `implement … with …` and `resolve … to …`. Migration actions convert old spellings. |
13
+ | Wildcard imports could obscure the actual dependency surface. | Preserve the requested import syntax; specs explain only names and operations used, with links to complete dependency explanations. |
14
+ | A reader had to assemble branches, private helpers, errors, and tests by hand. | Each `.aug.md` describes all local behavior, with precise-version offline dependency docs. |
15
+ | Required comments could repeat visible code and add ceremony. | Comments remain optional and are pulled into specs. Projects can require public or all declaration/method comments in `main.yaml`. |
16
+ | Effect clauses repeated interface contracts in implementations. | The existing inference for implementations/private helpers remains checked and appears in specs and hover. Public contracts remain explicit. |
17
+
18
+ Ordinary assignments retain both `=` and `to`. Labeled calls, explicit imports, folder exports, checked failures, mutable access, and scoped sharing retain their existing meaning. These constructs communicate context needed to understand a module; brevity must preserve that context.
19
+
20
+ The historical audit below records the earlier findings and their evolution.
21
+
22
+ Audit of the 0.14 compiler, runtime, module system, guide, and VS Code extension on September 28, 2026. The user approved all recommended solutions and optional indentation blocks. Version 0.15 implements that scope; see [the delivery map](implementation-map.md) for accepted spelling, modules, verification, and limits.
23
+
24
+ The findings below describe the historical 0.14 baseline. Source links now point to the evolved implementation; the current guide and delivery map are authoritative for accepted behavior.
25
+
26
+ ## Why this language exists
27
+
28
+ AugScript should let a developer, including one working with an LLM, understand a module from the code in front of them. Its interface should communicate inputs, results, dependencies, failures, mutation, and execution order. A change should stay local to the module that owns the behavior.
29
+
30
+ The two tenets are **simplicity** and **developer scalability**. Concrete design rules follow:
31
+
32
+ 1. Prefer a familiar, canonical spelling for each operation.
33
+ 2. Put dependencies and observable effects in the interface.
34
+ 3. Make ordinary data easy to create and read.
35
+ 4. Make sharing, mutation, and lifetime decisions visible.
36
+ 5. Keep a module’s public interface smaller than its implementation.
37
+ 6. Enforce module rules in the compiler, rather than relying on everyone remembering conventions.
38
+ 7. Keep contracts, documentation, and tests beside the code they explain.
39
+ 8. Give developers tools to gather the exact context needed for a change.
40
+
41
+ These are design goals. Some require changes to earlier decisions, especially shared process bindings, public fields, and mutation through methods. A short natural-language spelling does not, by itself, make its behavior explicit.
42
+
43
+ ## Changes implemented in 0.14
44
+
45
+ | Previous gap | Change |
46
+ | --- | --- |
47
+ | Creating common data required constructor calls and explicit generic arguments. | List, tuple, set, and map literals infer types; typed declarations and concrete call/return contracts supply empty-literal types. |
48
+ | Lists and maps existed, but sets and tuples did not. | Added hash sets and immutable tuple positions, with typed read operations. |
49
+ | Map lookup scanned every entry. | Map and Set now use hash tables; tuple keys have value equality and hashing. |
50
+ | Statement punctuation was mandatory. | Newlines terminate statements; semicolons remain optional separators. Continuation rules avoid silently joining separate calls. |
51
+ | Error contracts used `throws`. | Contracts read `returns T unless Error`; `throw` remains the failure statement. The editor migrates old contracts. |
52
+ | Several imports required repeated statements. | `import A and B from module` and `import everything from module` are supported. |
53
+ | Sibling imports could accidentally expose a sibling’s imports depending on processing order. | Import resolution uses that file’s own declarations. Neither named nor wildcard imports expose transitive imports. |
54
+ | Wildcard imports hide their actual imported names. | Hover now lists resolved names and source files. Explicit named imports remain the clearest choice. |
55
+ | Behavior examples and regression tests lived outside the language. | Same-file `test / when / it / assert`, CLI discovery/filtering, and an editor test provider. |
56
+ | Test fixtures could otherwise share the production composition root. | Each case gets fresh setup and bindings in a separate native process. Production startup is omitted. |
57
+ | A caught assertion or an empty test could appear successful. | Assertion failure remains a failed case; executing no assertions fails a case. Tests have bounded native execution. |
58
+ | Mutable collections could widen their element types through an alias. | List, Set, and Map type arguments are invariant. |
59
+ | An interface implementation could change parameter ownership silently. | Parameter ownership is checked as part of the interface signature. |
60
+ | A non-void body could fall through and return runtime null. | The compiler requires a value or failure on every path. |
61
+
62
+ The runnable example is [developer-workflow](../examples/developer-workflow/main.aug); tests are beside [Calculator](../examples/developer-workflow/calculator.aug). See [the language guide](reference.md) and [testing guide](testing.md).
63
+
64
+ ## Baseline findings: dependencies and side effects
65
+
66
+ | Finding | Evidence at the time of the audit | Recommended solution |
67
+ | --- | --- | --- |
68
+ | **1. A plain method call can mutate shared state.** A caller reading `worker.work()` cannot tell whether it changes the worker, its injected objects, or external state. | Methods carry parameters, results, ownership, and checked errors, but no effect contract in [the AST](../src/ast.ts). Field writes need a local borrow; ordinary calls do not require the caller to know the method’s mutation. | Make functions and methods pure by default. A mutating method declares `changes self`; external effects come from named capabilities and appear in its checked contract. Require the corresponding mutable access at the call site. |
69
+ | **2. Process-wide DI makes sharing the easiest lifetime.** Every resolve of a key receives the same object, even when a developer expects independent state. | [Binding checking](../src/checker.ts) creates one instance per key; [generated C](../src/codegen.ts) stores all bindings in global roots. | Distinguish stateless shared adapters from stateful instances. Add explicit lifetimes or composition scopes. Require an explicit shared-state choice for mutable bindings. Keep one root in main, with module-level composition helpers for large apps. |
70
+ | **3. Explicit resolve expressions are service-locator access.** A dependency can appear deep in a body, absent from the header. | `checkExpression` permits `resolve` wherever expressions are allowed. Function parameters already support the clearer `resolve Type name` form. | Require dependency parameters outside composition/setup code. Offer a fix that lifts a body resolve into a header dependency. Explicit retrieval remains appropriate in main and test setup. |
71
+ | **4. The startup dependency graph misses body lookups and helper calls.** An order-independent binding can read a not-yet-built dependency through its constructor body. | `checkBindings` follows injected fields and constructor interceptor dependencies, rather than every transitive call or resolve in startup code. | First prohibit body-level resolve during construction. Then derive a checked dependency/effect graph from headers and calls, with a diagnostic showing the full cycle or missing edge. |
72
+ | **5. I/O is ambient.** Any file can call print or file I/O without importing or receiving that dependency. File errors are checked, but the ability to touch the filesystem is not visible in the interface. | Built-ins in [the checker](../src/checker.ts), [editor help](../src/help.ts), and [runtime](../runtime/aug_runtime.c). | Model Console, FileReader, and FileWriter as capabilities passed explicitly or injected. Keep convenient output in main and test tooling. Inject clock, randomness, and network capabilities when those features arrive. |
73
+ | **6. Constructor work can perform arbitrary effects.** Resolving a graph can trigger logging, file writes, or other work before the explicit application statements. | Constructor `=>` blocks and constructor interceptors run during eager binding creation. | Keep construction limited to establishing valid local state. Put startup effects in a named, effect-declared method called visibly from main. Check constructor purity. |
74
+ | **7. Interceptors change behavior beyond the visible body.** They can skip execution, replace inputs/results, and add dependencies/errors. A tag shows that there is a wrapper, but its full contract requires another file. | [Interceptor planning](../src/checker.ts), [layer code generation](../src/codegen.ts), and existing chain/error hover. | Preserve explicit tags and written ordering. Add complete layer dependencies, effects, and short-circuit behavior to callable hover and context output. Make each layer satisfy the same effect and mutation rules as its target. Avoid global or implicit interceptor registration. |
75
+
76
+ ## Baseline findings: data, contracts, and ownership
77
+
78
+ | Finding | Evidence | Recommended solution |
79
+ | --- | --- | --- |
80
+ | **8. Unprefixed constructor fields are public and writable.** A module can expose all of its storage accidentally and let callers bypass invariants. | Header parameters become fields automatically; `_` controls visibility in [project and member checking](../src/checker.ts). | Preserve the public naming rule, but make public fields read-only by default. Require explicit mutable storage. Expose a method for transitions that maintain invariants. Prefer immutable data at module seams. |
81
+ | **9. Plain managed inputs are not a deep read-only guarantee.** A method can mutate referenced objects or invoke another mutating method through a seemingly ordinary input. | Ownership checks focus on direct variables, fields, and known collection operations. Method contracts do not classify mutation. | Track read versus mutable access through calls and nested storage. A managed parameter grants reading; mutation requires a checked borrow or an explicitly declared capability. |
82
+ | **10. Alias and move checking is incomplete.** Two resolves of the same binding, references retrieved from fields/collections, and aliases created by calls may refer to the same object without a common tracked root. Loops are checked once rather than to a fixed point. | `aliasRoot`, `rootName`, `mergeMoved`, and block checking in [checker.ts](../src/checker.ts). | Build a control-flow analysis that tracks origins, loans, moves, escape, and loop re-entry. Include binding identity and nested references. Until then, treat the ownership implementation as a prototype rather than a proof of exclusive access. |
83
+ | **11. General generic variance is too permissive.** Mutable built-ins are now invariant, but user-defined generic types can still widen arguments through assignability. | `assignable` recursively checks other same-ID generic arguments; classes may have mutable fields and interfaces may consume their type parameter. | Make user-defined generic types invariant by default. Add explicit checked variance only when a type is proven to expose its parameter solely for reading or writing. Add constrained generics with clear diagnostics. |
84
+ | **12. Generic inference and constraints are uneven.** Collection inputs now infer nested generic arguments, but unresolved parameters, multiple competing candidates, and generic DI specialization need stronger checks. | `inferCallType`, `resolveType`, and type-keyed DI in [checker.ts](../src/checker.ts). | Require a concrete inference result at each call; report conflicts at argument labels and show the expected constraint. Use one substitution/unification implementation for functions, classes, interfaces, interceptors, and DI. |
85
+ | **13. Missing values are difficult to use safely.** Map.get returns a nullable result, but a non-null check does not narrow a class reference for a later method call. | Nullable assignment/receiver checks exist; flow narrowing is absent. | Add flow-sensitive narrowing after `if value != null` and early-return guards. Consider an explicit result/option type when absence carries domain meaning. Avoid a unchecked “trust me” conversion. |
86
+ | **14. Some safe-looking operations abort the entire process.** Invalid list positions and division by zero bypass the `unless` model. | `fail()` in [the runtime](../runtime/aug_runtime.c) exits immediately. Tuple constant bounds are checked, but list indexes are dynamic. | Define which failures are recoverable. Use checked IndexError/ArithmeticError or a safe nullable/result operation for dynamic access. Reserve process aborts for invariant corruption and unrecoverable allocation failures. |
87
+ | **15. Broad `unless Error` and print-only catch fixes can hide intent.** An unfamiliar reader loses the failure cases or sees errors silently consumed. | Root Error contracts and the catch-and-print fix in [fixes.ts](../src/fixes.ts). | Prefer specific public error contracts. Offer propagate-with-unless and deliberate recovery fixes before a generic print handler; flag unused caught errors or catch blocks that merely discard failures. Explain which layers add errors. |
88
+ | **16. Mandatory interfaces can add ceremony for simple data.** An empty marker interface exists only to let a data holder be declared. | Every class requires implements; there is no record/value declaration. | Keep explicit interfaces for substitutable behavior. Add a first-class immutable record/value feature for data, with labeled construction, structural equality, and validation where needed. This is a new design decision, not implemented syntax. |
89
+ | **17. Some operations still lack readable data syntax.** Collection creation is concise now, but reading tuples requires `.get(index=...)`, and there are no iteration, destructuring, named records, or pattern matching features. | [Parser](../src/parser.ts) and built-in collection methods. | Add a small, consistent set: labeled record fields, tuple destructuring, `for item in items`, and checked matching. Choose readable constructs that expose types and missing cases. Keep shortcuts out if they obscure data shape. |
90
+
91
+ ## Baseline findings: modules and natural-language consistency
92
+
93
+ | Finding | Evidence | Recommended solution |
94
+ | --- | --- | --- |
95
+ | **18. Everything imports weaken local dependency lists.** Adding an export elsewhere changes the importing scope, even if the consumer’s text does not change. | The newly supported wildcard import in [project.ts](../src/project.ts). Visibility and collisions are enforced, and hover shows its expansion. | Keep the requested feature. Provide an “expand to named imports” action and an optional production lint. Prefer it in composition roots or small curated modules; use named imports in implementation modules. |
96
+ | **19. Public-by-name still exports a broad sibling surface.** A declaration need not be listed in export.aug to be imported by a sibling file. | The direct sibling path takes public local declarations; export.aug controls only folder crossings. | Preserve the chosen visibility rule, but lint accidental public helpers and broad module surfaces. Encourage `_` for implementation helpers. Offer an optional stronger module policy for large projects. |
97
+ | **20. Private constructor labels expose private spelling.** An external caller must know `_value` to construct a class with that private field. | The documented/tested `Box(_value=2)` behavior in [the guide](reference.md). | Separate the public constructor label from private storage, or make a public parameter initialize a named private field. Keep the distinction explicit in the header and document it in signature help. |
98
+ | **21. Module edges are visible but architecture is not enforced.** Cycles, imports across domain layers, and dependency fan-out can grow into a shared monolith. | Folder exports enforce access, but [project.ts](../src/project.ts) has no import-cycle or allowed-dependency policy. | Check import cycles and let modules declare allowed dependencies. Report changed module edges and interface growth. Use fan-out and mutable sharing as warning signals; avoid arbitrary file-length bans that punish deep, cohesive modules. |
99
+ | **22. Syntax has multiple historical spellings.** Bind/implement, assignment/resolve forms, comma/and errors, and explicit/implicit void increase the amount of grammar an unfamiliar reader must know. | Parser and help contain accepted alternatives; class/function/throws are explicitly rejected. | Establish a formatter’s canonical output: implement/with, resolve/to, optional semicolons omitted, and explicit named imports. Preserve `=` and `to` as requested, but format consistently within a project. Remove legacy bind after a migration period if desired. |
100
+ | **23. Implements decides whether a header is a class.** Removing the keyword simplified declarations, but a missing implements can turn a header into a function and produce a distant error. Brackets also serve lists and annotations. | Speculative declaration lookahead and annotation disambiguation in [parser.ts](../src/parser.ts). | Retain the agreed bare syntax. Improve diagnostics for class-shaped headers, retain precise declaration symbols in navigation, and publish a small grammar with unambiguous line-boundary rules. Avoid adding more context-dependent header roles. |
101
+ | **24. Tests are close to behavior, but can make files large and cover only classes.** Function modules and large suites need a similarly local workflow without requiring a class wrapper. | The new test grammar and [test runner](../src/testing.ts) support same-file class suites and flat groups. | Add function suites, parameterized cases, reusable explicitly imported fixtures, and coverage. Keep the primary tests beside their declaration. Put large integration tests in a separate module with explicit capabilities. In-memory isolation already exists; external effects need adapters or isolated resources. |
102
+
103
+ ## Baseline findings: developer tools and compiler modules
104
+
105
+ | Finding | Evidence | Recommended solution |
106
+ | --- | --- | --- |
107
+ | **25. Correct understanding still requires context assembly by hand.** Import and tag navigation helps, but there is no command that returns a module’s complete contract and provenance. | CLI has check, symbols, definition, completion, hover, fixes, and tests; no explain/context command. | Add `aug explain` and `aug context`: exact public contracts, imported names and origins, transitive DI, effects, checked errors, interceptor order, and relevant tests. Include source locations and bounded context selection. Make the output useful both to humans and LLM tooling. |
108
+ | **26. Documentation can drift from code.** Javadoc is displayed, but described parameters/errors, public exports, and guide snippets are not checked against the compiler. | [Javadoc parsing](../src/javadoc.ts) formats comments independently of type checking; snippets are maintained manually. | Validate documentation tags against signatures. Diagnose missing public API docs when a project enables that policy. Compile executable documentation examples and show inferred contracts beside prose. Tests should illustrate behavior and limitations, rather than repeat implementation details. |
109
+ | **27. Built-in contracts are duplicated across modules.** Adding Set required edits in the checker, runtime emitter, help, completion, and grammar. This increases the context required for a small change. | Built-in dispatch in [checker.ts](../src/checker.ts), [codegen.ts](../src/codegen.ts), [editor.ts](../src/editor.ts), [help.ts](../src/help.ts), and the grammar. | Create a deep built-in module: one declarative contract registry for labels, types, mutability, errors, and documentation; checker and editor consume it. Keep C runtime adapters behind a narrow seam and verify behavior through native programs. |
110
+ | **28. The checker owns many unrelated policies.** Type resolution, interface merging, DI ordering, ownership, errors, and interception share one large implementation. The editor also reconstructs scope from syntax. | [checker.ts](../src/checker.ts) and [editor.ts](../src/editor.ts). | Expose a resolved semantic model with symbols, scopes, callable contracts, and provenance. Move DI, ownership/effects, and interceptor lowering into modules with small interfaces and shared type operations. Test through their interfaces. A file split without reducing caller knowledge would not improve depth. |
111
+ | **29. Every editor request reloads and checks a whole project.** Main requires all production composition to be valid even when a developer is editing an isolated module. | CLI reloads the project; the extension starts a compiler process for each request. Test analysis is also repeated per case. | Add an incremental language server and cached module checking. Separate type-contract validation from composition completeness; keep whole-application DI validation as a build gate. Let developers get meaningful local diagnostics while the composition root is unfinished. |
112
+ | **30. The build/runtime contract is narrower than its surface suggests.** Native C output still uses tagged values and dynamic member lookup. int is wider in the runtime than the C FFI mapping; strings/file I/O have NUL and encoding limitations; configuration is a small YAML subset checked during build. | [Code generation](../src/codegen.ts), [runtime](../runtime/aug_runtime.c), and [CLI configuration](../src/cli.ts). | Specify numeric range/overflow, text encoding, FFI widths, and ABI conversions. Validate configuration during check and surface native diagnostics at AugScript locations. Benchmark real workloads before promising speed. Add source maps/debugger support and reproducible package/module versions as the project grows. |
113
+
114
+ ## Approved implementation sequence
115
+
116
+ ### First: make the contracts trustworthy
117
+
118
+ Complete generic invariance/inference and control-flow ownership checks. Define runtime failure behavior. These are compiler correctness tasks; their spelling should not become a user configuration option.
119
+
120
+ ### Second: make effects and sharing visible
121
+
122
+ Adopt pure defaults, read-only public data, declared mutation, explicit capabilities, and header-only DI outside composition code. Extend the same rules through interfaces and interceptors. This directly addresses the biggest current conflict with the tenets: shared state can change behind an innocent-looking call.
123
+
124
+ Historical proposal — **now accepted and implemented in 0.15**, with the canonical clause order documented in the reference:
125
+
126
+ ```text
127
+ calculate(int price, int quantity) returns int
128
+
129
+ Counter() implements ICounter {
130
+ increment() changes self
131
+ }
132
+
133
+ save(resolve FileWriter files, string path, string content)
134
+ uses files.write unless FileError
135
+ ```
136
+
137
+ The cost is additional contract text for effectful operations and more compiler analysis. The benefit is that the caller can see and check the behavior without reading every helper body. Effects should name the actual dependency or state being changed; a generic `impure` escape hatch would reveal too little.
138
+
139
+ ### Third: make context and modules easy to navigate
140
+
141
+ The semantic model, explain/context commands, canonical formatting, wildcard expansion, module dependency checks, validated docs, incremental editor, immutable records, and function suites are delivered. Record and function-test semantics are defined in the current guide.
142
+
143
+ ## What should stay
144
+
145
+ Keep explicit imports, export.aug folder boundaries, labeled arguments, same-file tests, checked failure contracts, explicit interceptor tags, and main as the composition root. Keep ordinary reads easy. Keep classes free from class inheritance and interfaces as explicit behavior contracts.
146
+
147
+ The goal is a module with a small interface that states everything its caller needs to know, substantial behavior behind it, and changes with good locality. Enforce effects, sharing, and dependencies to make that possible; formatting alone cannot prevent a monolith.
@@ -0,0 +1,43 @@
1
+ # Keeping documentation current
2
+
3
+ Documentation is part of a language change. The canonical wiki is this repository's `docs` directory, reviewed and versioned with the compiler. GitHub Pages renders these same files; an independently edited GitHub Wiki would create a second source of truth.
4
+
5
+ ## Where to make a change
6
+
7
+ | Change | Update in the same commit |
8
+ | --- | --- |
9
+ | Syntax, type/effect/ownership/DI rules | `docs/reference.md`, relevant grammar/testing/web guide and `src/help.ts` |
10
+ | Public library signature or behavior | Javadoc beside its declaration in `src/stdlib`, the relevant guide and gap ledger |
11
+ | Diagnostic or editor behavior | `src/help.ts`, diagnostics/tooling guide and VS Code changelog |
12
+ | CLI, packages, configuration or supported platform | Tooling/packages/releasing guide and package metadata |
13
+ | Completed or deferred feature | Implementation map, gap ledger and changelog |
14
+
15
+ Public comments should explain observable behavior, named inputs, errors, side effects, and limits. Keep dependencies explicit in examples. Record incomplete capabilities in the gap ledger; do not imply that an unimplemented proposal is usable.
16
+
17
+ ## Generated reference
18
+
19
+ ```sh
20
+ npm run docs:generate
21
+ npm run docs:check
22
+ npm run docs:build
23
+ ```
24
+
25
+ The API generator reads each `export.aug`, resolves the actual public declaration, and uses the same Javadoc/inherited documentation path as hover. It includes public methods and excludes private native helpers. The language constructs page comes from editor help and collection operation contracts. Commit generated Markdown so GitHub readers and package users can read it without building a site. CI rejects stale generated pages.
26
+
27
+ The generator also runs the deterministic spec compiler for every standard-library source file. Commit these adjacent `src/stdlib/**/*.aug.md` files. Unlike public API pages, full source specs include private helpers and all local behavior. For application or third-party package source changes, run `aug spec PROJECT` and verify `aug spec PROJECT --check`. See [the user workflow](specifications.md).
28
+
29
+ ## Repository example gallery
30
+
31
+ `docs/example-projects.json` lists the complete projects shown in [the example gallery](examples/index.md), including the measured benchmark programs. `docs:generate` checks each application and its same-file tests, formats each file in indentation and braces styles, and runs the spec compiler. It publishes code and specs side by side under `docs/examples`, with dependency links that stay in the wiki. Long code lines wrap visually without changing copied source. It also refreshes adjacent example specs and their offline dependency copies. Generation uses temporary project copies; the package-consumer example installs its local dependency offline there. It does not edit example source or create package locks in the checkout.
32
+
33
+ Keep titles and descriptions in the catalog current when adding or changing an example. `docs:check` rejects source/spec drift. Gallery tests require every repository example and benchmark source to be represented, check both displayed syntax styles, and follow the wiki's generated links and declaration anchors. Readers can switch code style with a mouse or keyboard; their choice is kept between pages on the same browser.
34
+
35
+ ## Executable examples
36
+
37
+ Each runnable `aug` fence declares `project=NAME file=PATH`. A guide may spread one project across several fences. Add expected output/test counts to `docs/examples.json`. The documentation test assembles, checks, runs or builds, tests, formats, and checks those projects again. API signatures use `text` fences because a declaration header is not a complete application.
38
+
39
+ ```sh
40
+ node --test tests/documentation.test.mjs
41
+ ```
42
+
43
+ CI checks documentation on every push and pull request. Pull requests changing language/runtime/library/tooling behavior must update a handwritten guide or changelog; the policy check enforces that requirement. The Pages deployment publishes only the documented branch version, with search and source links. Use tags and GitHub history to read earlier releases.
@@ -0,0 +1,184 @@
1
+ # Packages and installation
2
+
3
+ The [augscript monorepo](https://github.com/GreenPandaStudios/augscript) versions the compiler, libraries, documentation, and editor together. Release packages contain the files needed to use them; they do not run install scripts or silently build native libraries.
4
+
5
+ | Distribution | Package | Provides |
6
+ | --- | --- | --- |
7
+ | CLI | `@greenpandastudios/aug-cli` | `aug`, `aug-cli`, `aug-native`, compiler, language server, C runtime, guides and examples |
8
+ | Standard library | `@greenpandastudios/aug-stdlib` | `august.io`, `august.json`, `august.time`, `august.memory` |
9
+ | Web library | `@greenpandastudios/aug-web` | `august.web`, HTTP capabilities and helpers |
10
+ | Crypto library | `@greenpandastudios/aug-crypto` | `august.crypto`, cryptographic capability, RSA JWK and signed JWT helpers |
11
+ | VS Code | `augscript.augscript` / `.vsix` | Syntax, file icons, hover, completion, fixes, navigation, tests and bundled compiler |
12
+
13
+ ## From a checkout
14
+
15
+ Requires Node.js 24+, npm, and a C11 compiler. Full web/crypto native builds run on macOS and Linux; the repository's Docker recipes supply the Linux build tools and libraries. Other platforms remain outside the tested support matrix.
16
+
17
+ ```sh
18
+ git clone git@github.com:GreenPandaStudios/augscript.git
19
+ cd augscript
20
+ npm ci
21
+ node scripts/bootstrap-native.mjs --extract-only --only minicoro,yyjson
22
+ node bin/aug.mjs run examples/approved-design
23
+ node scripts/bootstrap-native.mjs
24
+ node bin/aug.mjs run examples/oidc-login
25
+ ```
26
+
27
+ ## Install release tarballs
28
+
29
+ Until registry publication is configured, download all four `.tgz` files from the same [GitHub release](https://github.com/GreenPandaStudios/augscript/releases). Install them together, replacing VERSION with the release version:
30
+
31
+ ```sh
32
+ npm install --global ./greenpandastudios-aug-stdlib-VERSION.tgz ./greenpandastudios-aug-web-VERSION.tgz ./greenpandastudios-aug-crypto-VERSION.tgz ./greenpandastudios-aug-cli-VERSION.tgz
33
+ aug --version
34
+ aug --help
35
+ aug-native
36
+ aug check path/to/project
37
+ aug run path/to/project
38
+ ```
39
+
40
+ The CLI depends on exact matching library versions. Import spellings stay `import Crypto from august.crypto`; npm package names never enter August source. The packaged CLI loads the separate installed libraries, and editor navigation opens their real `.aug` files.
41
+
42
+ Native dependencies use `~/.cache/augscript/native/VERSION/PLATFORM-ARCH` for an installed CLI. Source checkouts use `.aug-native`. `AUG_NATIVE_HOME` selects a shared cache for CLI and VS Code; building dependencies is an explicit command.
43
+
44
+ For core programs and JSON without web/crypto, `aug-native --extract-only --only minicoro,yyjson` downloads just the portable C sources. Compiler checkpoints use minicoro even in ordinary programs; this source dependency must be present before native execution. Full web/crypto bootstrap is available on macOS and Linux.
45
+
46
+ ## npm registry
47
+
48
+ Create a project with the published CLI:
49
+
50
+ ```sh
51
+ npx @greenpandastudios/aug-cli@next init hello-august
52
+ ```
53
+
54
+ `aug init DIRECTORY` creates a checked application with `main.aug`, a public interface and implementation, a same-file test, README, and `.gitignore`. It refuses a nonempty directory. The npm package exposes `aug-cli` as a binary so `npx` can select the executable by package name. The CLI brings its three matching libraries. Early releases use the `next` dist tag. **This npm package has not been published yet**, so use the checkout or release tarballs above until the owner configures npm access. Registry and Marketplace publication require their own owner accounts; a GitHub account does not grant those identities. See [releasing](releasing.md) for configuration and [getting started](getting-started.md) for the starter command.
55
+
56
+ ## VS Code
57
+
58
+ Install **AugScript** (`augscript.augscript`) from the VS Code Extensions view once its [Marketplace listing](https://marketplace.visualstudio.com/items?itemName=augscript.augscript) is published. The listing is currently unpublished pending owner identity setup. Release publication runs the Marketplace workflow described in [releasing](releasing.md).
59
+
60
+ For direct installation, download the matching `.vsix` from [GitHub Releases](https://github.com/GreenPandaStudios/augscript/releases) and choose **Extensions → Install from VSIX**.
61
+
62
+ The extension bundles the same compiler sources, standard declarations, native bootstrap, guides, and examples. Set `augscript.nativeHome` to an existing dependency build directory. Node.js 24+ remains required.
63
+
64
+ ## Package model
65
+
66
+ `packages/*/package.json` and `aug-package.json` are release manifests. Canonical code lives in `src`, `runtime`, and `src/stdlib`; generated staging directories live under ignored `dist`. `npm run package:packages` builds JavaScript and real npm tarballs. `npm run test:packages` installs those tarballs outside the checkout and checks imports, navigation, native execution, and compatibility.
67
+
68
+ User packages ship August source, retain their own public boundaries, and compile into the application's native executable. They use npm for archive/registry transport and August for visibility, compatibility, dependency scopes and checking. Changing builtin libraries independently of the compiler is unsupported; general native adapter ABI/version distribution remains future work.
69
+
70
+ With the full native bootstrap ready, `npm run test:packages -- --native` additionally builds the OIDC example and runs its signed-identity tests using the installed CLI and separate packages.
71
+
72
+ ## Author a package
73
+
74
+ Create a standalone library; it needs no `main.aug`:
75
+
76
+ ```sh
77
+ aug package init my-math --name @your-npm-name/aug-math
78
+ aug check my-math
79
+ aug test my-math
80
+ aug package pack my-math
81
+ ```
82
+
83
+ The scaffold includes `src/arithmetic.aug` with a same-file test, `src/export.aug`, `aug-package.json`, and npm's `package.json`. Public API, Javadoc and tests stay beside the implementation:
84
+
85
+ ```text
86
+ // src/arithmetic.aug
87
+ /** Add two integers. @param left First integer. @param right Second integer. */
88
+ add(int left, int right) returns int:
89
+ return left + right
90
+
91
+ test add:
92
+ when addition:
93
+ it adds:
94
+ assert(add(left=2, right=3) == 5)
95
+
96
+ // src/export.aug
97
+ export add from arithmetic
98
+ ```
99
+
100
+ `aug-package.json` owns August metadata and dependency aliases:
101
+
102
+ ```json
103
+ {
104
+ "format": 1,
105
+ "name": "@your-npm-name/aug-math",
106
+ "version": "0.1.0",
107
+ "compiler": "0.19.0",
108
+ "source": "src",
109
+ "dependencies": {}
110
+ }
111
+ ```
112
+
113
+ `package.json` supplies npm transport metadata, description, license, README and the files to include. `aug install` and `aug package pack` synchronize its name, version and dependencies from the August manifest. Keep the source folder and `aug-package.json` in its `files` list. Pack checks every declaration and test closure before creating `.aug-build/packages/your-npm-name-aug-math-0.1.0.tgz`. It checks test code; execute the cases with `aug test` before release.
114
+
115
+ After authenticating with an npm account that owns the namespace, publish that verified archive:
116
+
117
+ ```sh
118
+ npm publish my-math/.aug-build/packages/your-npm-name-aug-math-0.1.0.tgz --access public
119
+ ```
120
+
121
+ This is an explicit author action; `aug install` never publishes or executes dependency lifecycle scripts. August does not require a new registry account in addition to npm. See [npm's package publishing guide](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages/).
122
+
123
+ ## Use a package
124
+
125
+ In the consuming application's `main.yaml`, choose a readable import alias:
126
+
127
+ ```yaml
128
+ packages:
129
+ math: "npm:@your-npm-name/aug-math@0.1.0"
130
+ ```
131
+
132
+ Install explicitly, then import the public name:
133
+
134
+ ```sh
135
+ aug install my-app
136
+ aug run my-app
137
+ ```
138
+
139
+ ```text
140
+ // my-app/main.aug
141
+ import add from math
142
+ print(value=add(left=20, right=22))
143
+ ```
144
+
145
+ Local development uses the same source syntax. Replace the specification with `"../my-math"`, `"file:../my-math"`, or a path to the `.tgz`. `aug install` snapshots a local directory, so reinstall after editing its source. Check and build never fetch dependencies or silently refresh a local package. There are no symlinked live dependencies.
146
+
147
+ Only the source root's `export.aug` is visible to another package. To expose a submodule, write `export folder parsing` there and provide `src/parsing/export.aug`; consumers can then use `import Parser from math.parsing`. Private `_names`, files and folders remain inaccessible. `import everything` follows the same public surface. An alias cannot shadow a local file/folder or use the reserved `august` name.
148
+
149
+ Module dependency policies use the alias path (`math` or `math/parsing`) for external edges. Consumer architecture/style lints apply to its own source; they do not impose its conventions on library internals.
150
+
151
+ Ctrl-click an imported declaration, `from`, or a path segment to open the installed source or its export file. Hover preserves its Javadoc. VS Code recognizes a standalone library from `aug-package.json` and refreshes when the manifest or lock changes.
152
+
153
+ ## Dependencies between libraries
154
+
155
+ Declare dependencies in the library's August manifest instead of `main.yaml`:
156
+
157
+ ```json
158
+ "dependencies": {
159
+ "math": "npm:@your-npm-name/aug-math@0.1.0"
160
+ }
161
+ ```
162
+
163
+ Run `aug install` inside that library and use `import add from math`. Each package sees its own declared aliases. A consuming app cannot import a transitive alias unless it also declares that dependency. Multiple package versions have distinct type identities; duplicate copies of the same version share declarations only when their source and dependencies agree. Changed code with the same package name/version is rejected when conflicting copies would coexist.
164
+
165
+ Registry dependencies require exact versions. Ranges, latest tags, Git dependencies and arbitrary URLs are unsupported. Local paths are useful within a development workspace; publish registry references for libraries other developers will install.
166
+
167
+ ## Reproducible builds
168
+
169
+ Commit `aug.lock.json` with your project. It records specifications, the installed graph, exact names/versions, npm integrity metadata, the compiler version, and hashes of source/manifests. `.aug-packages` is an ignored installed snapshot.
170
+
171
+ ```sh
172
+ aug install my-app --frozen
173
+ aug check my-app
174
+ aug test my-app
175
+ aug build my-app
176
+ ```
177
+
178
+ `--frozen` requires a matching lock and unchanged source graph. `--offline` additionally prohibits fetching uncached dependencies; a fresh machine may need one online install before it can work offline. Editing the installed source produces a diagnostic requiring a reinstall. The compiler version must match exactly while the language is experimental.
179
+
180
+ Libraries support `check`, same-file `test`, formatting, explain, editor help, and packing. `run`, `build`, `bench` and server OpenAPI generation belong to an application with `main.aug`. Consumer tests run the consumer's suites; dependency tests are checked and executed by the package author. Arbitrary C source, native build hooks, precompiled August binaries, compiler plugins and stable native ABIs are outside this package format.
181
+
182
+ `aug spec` also works on source libraries. `aug pack DIRECTORY` is an alias for `aug package pack DIRECTORY`. Packing refreshes and includes adjacent `.aug.md` files and `.aug-spec/` so the package carries complete source explanations and precise-version offline dependency links. See [compiled specifications](specifications.md).
183
+
184
+ The [package example](../examples/packages/README.md) exercises the author and consumer workflow locally. The installer uses [npm aliases](https://docs.npmjs.com/cli/v11/using-npm/package-spec/) and [npm install](https://docs.npmjs.com/cli/v11/commands/npm-install/) with lifecycle scripts disabled and local packages installed as copied archives.