sonamu 0.8.25 → 0.9.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 (687) hide show
  1. package/bin/cli.js +60 -13
  2. package/dist/_virtual/rolldown_runtime.js +39 -0
  3. package/dist/ai/agents/agent.d.ts +3 -3
  4. package/dist/ai/agents/agent.d.ts.map +1 -1
  5. package/dist/ai/agents/agent.js +76 -73
  6. package/dist/ai/agents/index.js +3 -3
  7. package/dist/ai/agents/types.d.ts +3 -3
  8. package/dist/ai/agents/types.d.ts.map +1 -1
  9. package/dist/ai/agents/types.js +1 -3
  10. package/dist/ai/index.js +3 -2
  11. package/dist/ai/providers/rtzr/api.js +25 -25
  12. package/dist/ai/providers/rtzr/error.js +25 -26
  13. package/dist/ai/providers/rtzr/index.js +5 -5
  14. package/dist/ai/providers/rtzr/model.d.ts +1 -1
  15. package/dist/ai/providers/rtzr/model.d.ts.map +1 -1
  16. package/dist/ai/providers/rtzr/model.js +117 -133
  17. package/dist/ai/providers/rtzr/options.d.ts.map +1 -1
  18. package/dist/ai/providers/rtzr/options.js +35 -41
  19. package/dist/ai/providers/rtzr/provider.d.ts +1 -1
  20. package/dist/ai/providers/rtzr/provider.d.ts.map +1 -1
  21. package/dist/ai/providers/rtzr/provider.js +53 -51
  22. package/dist/ai/providers/rtzr/utils.d.ts.map +1 -1
  23. package/dist/ai/providers/rtzr/utils.js +84 -84
  24. package/dist/api/base-frame.d.ts +2 -2
  25. package/dist/api/base-frame.d.ts.map +1 -1
  26. package/dist/api/base-frame.js +29 -19
  27. package/dist/api/caster.d.ts +1 -1
  28. package/dist/api/caster.d.ts.map +1 -1
  29. package/dist/api/caster.js +51 -61
  30. package/dist/api/code-converters.d.ts +4 -3
  31. package/dist/api/code-converters.d.ts.map +1 -1
  32. package/dist/api/code-converters.js +226 -249
  33. package/dist/api/config.d.ts +17 -17
  34. package/dist/api/config.d.ts.map +1 -1
  35. package/dist/api/config.js +37 -30
  36. package/dist/api/context.d.ts +10 -10
  37. package/dist/api/context.d.ts.map +1 -1
  38. package/dist/api/context.js +8 -2
  39. package/dist/api/decorators.d.ts +8 -8
  40. package/dist/api/decorators.d.ts.map +1 -1
  41. package/dist/api/decorators.js +245 -268
  42. package/dist/api/index.js +39 -7
  43. package/dist/api/secret.js +22 -15
  44. package/dist/api/sonamu.d.ts +15 -15
  45. package/dist/api/sonamu.d.ts.map +1 -1
  46. package/dist/api/sonamu.js +1012 -1131
  47. package/dist/api/validator.js +88 -79
  48. package/dist/auth/auth-generator.d.ts.map +1 -1
  49. package/dist/auth/auth-generator.js +203 -200
  50. package/dist/auth/better-auth-entities.d.ts +2 -2
  51. package/dist/auth/better-auth-entities.d.ts.map +1 -1
  52. package/dist/auth/better-auth-entities.js +369 -429
  53. package/dist/auth/index.js +21 -6
  54. package/dist/auth/knex-adapter.d.ts +2 -2
  55. package/dist/auth/knex-adapter.d.ts.map +1 -1
  56. package/dist/auth/knex-adapter.js +153 -153
  57. package/dist/auth/plugins/entity-definitions/admin.d.ts +1 -1
  58. package/dist/auth/plugins/entity-definitions/admin.d.ts.map +1 -1
  59. package/dist/auth/plugins/entity-definitions/admin.js +58 -56
  60. package/dist/auth/plugins/entity-definitions/anonymous.d.ts +1 -1
  61. package/dist/auth/plugins/entity-definitions/anonymous.d.ts.map +1 -1
  62. package/dist/auth/plugins/entity-definitions/anonymous.js +20 -20
  63. package/dist/auth/plugins/entity-definitions/api-key.d.ts +1 -1
  64. package/dist/auth/plugins/entity-definitions/api-key.d.ts.map +1 -1
  65. package/dist/auth/plugins/entity-definitions/api-key.js +185 -196
  66. package/dist/auth/plugins/entity-definitions/index.d.ts +1 -1
  67. package/dist/auth/plugins/entity-definitions/index.d.ts.map +1 -1
  68. package/dist/auth/plugins/entity-definitions/index.js +26 -29
  69. package/dist/auth/plugins/entity-definitions/jwt.d.ts +1 -1
  70. package/dist/auth/plugins/entity-definitions/jwt.d.ts.map +1 -1
  71. package/dist/auth/plugins/entity-definitions/jwt.js +62 -64
  72. package/dist/auth/plugins/entity-definitions/organization.d.ts +1 -1
  73. package/dist/auth/plugins/entity-definitions/organization.d.ts.map +1 -1
  74. package/dist/auth/plugins/entity-definitions/organization.js +362 -421
  75. package/dist/auth/plugins/entity-definitions/passkey.d.ts +1 -1
  76. package/dist/auth/plugins/entity-definitions/passkey.d.ts.map +1 -1
  77. package/dist/auth/plugins/entity-definitions/passkey.js +115 -126
  78. package/dist/auth/plugins/entity-definitions/phone-number.d.ts +1 -1
  79. package/dist/auth/plugins/entity-definitions/phone-number.d.ts.map +1 -1
  80. package/dist/auth/plugins/entity-definitions/phone-number.js +31 -40
  81. package/dist/auth/plugins/entity-definitions/sso.d.ts +1 -1
  82. package/dist/auth/plugins/entity-definitions/sso.d.ts.map +1 -1
  83. package/dist/auth/plugins/entity-definitions/sso.js +94 -107
  84. package/dist/auth/plugins/entity-definitions/two-factor.d.ts +1 -1
  85. package/dist/auth/plugins/entity-definitions/two-factor.d.ts.map +1 -1
  86. package/dist/auth/plugins/entity-definitions/two-factor.js +78 -92
  87. package/dist/auth/plugins/entity-definitions/types.d.ts +1 -1
  88. package/dist/auth/plugins/entity-definitions/types.d.ts.map +1 -1
  89. package/dist/auth/plugins/entity-definitions/types.js +1 -10
  90. package/dist/auth/plugins/entity-definitions/username.d.ts +1 -1
  91. package/dist/auth/plugins/entity-definitions/username.d.ts.map +1 -1
  92. package/dist/auth/plugins/entity-definitions/username.js +31 -40
  93. package/dist/auth/plugins/index.js +12 -3
  94. package/dist/auth/plugins/wrappers/admin.d.ts +2 -2
  95. package/dist/auth/plugins/wrappers/admin.d.ts.map +1 -1
  96. package/dist/auth/plugins/wrappers/admin.js +28 -29
  97. package/dist/auth/plugins/wrappers/anonymous.d.ts +2 -1
  98. package/dist/auth/plugins/wrappers/anonymous.d.ts.map +1 -1
  99. package/dist/auth/plugins/wrappers/anonymous.js +23 -22
  100. package/dist/auth/plugins/wrappers/api-key.d.ts +2 -1
  101. package/dist/auth/plugins/wrappers/api-key.d.ts.map +1 -1
  102. package/dist/auth/plugins/wrappers/api-key.js +39 -34
  103. package/dist/auth/plugins/wrappers/index.js +11 -11
  104. package/dist/auth/plugins/wrappers/jwt.d.ts +2 -1
  105. package/dist/auth/plugins/wrappers/jwt.d.ts.map +1 -1
  106. package/dist/auth/plugins/wrappers/jwt.js +31 -26
  107. package/dist/auth/plugins/wrappers/organization.d.ts +2 -1
  108. package/dist/auth/plugins/wrappers/organization.d.ts.map +1 -1
  109. package/dist/auth/plugins/wrappers/organization.js +65 -62
  110. package/dist/auth/plugins/wrappers/passkey.d.ts +2 -1
  111. package/dist/auth/plugins/wrappers/passkey.d.ts.map +1 -1
  112. package/dist/auth/plugins/wrappers/passkey.js +33 -28
  113. package/dist/auth/plugins/wrappers/phone-number.d.ts.map +1 -1
  114. package/dist/auth/plugins/wrappers/phone-number.js +26 -23
  115. package/dist/auth/plugins/wrappers/sso.d.ts.map +1 -1
  116. package/dist/auth/plugins/wrappers/sso.js +37 -31
  117. package/dist/auth/plugins/wrappers/two-factor.d.ts.map +1 -1
  118. package/dist/auth/plugins/wrappers/two-factor.js +31 -28
  119. package/dist/auth/plugins/wrappers/username.d.ts.map +1 -1
  120. package/dist/auth/plugins/wrappers/username.js +23 -23
  121. package/dist/bin/build-config.js +31 -31
  122. package/dist/bin/cli.js +1063 -1204
  123. package/dist/bin/fixture.d.ts.map +1 -1
  124. package/dist/bin/fixture.js +266 -259
  125. package/dist/bin/hmr-hook-register.d.ts.map +1 -1
  126. package/dist/bin/hmr-hook-register.js +19 -18
  127. package/dist/bin/test-command.d.ts.map +1 -1
  128. package/dist/bin/test-command.js +180 -177
  129. package/dist/bin/ts-loader-register.js +13 -6
  130. package/dist/bin/ts-loader-registration.d.ts.map +1 -1
  131. package/dist/bin/ts-loader-registration.js +28 -38
  132. package/dist/cache/cache-manager.d.ts +1 -1
  133. package/dist/cache/cache-manager.d.ts.map +1 -1
  134. package/dist/cache/cache-manager.js +20 -15
  135. package/dist/cache/decorator.d.ts +1 -1
  136. package/dist/cache/decorator.d.ts.map +1 -1
  137. package/dist/cache/decorator.js +84 -76
  138. package/dist/cache/drivers.js +21 -34
  139. package/dist/cache/index.js +10 -7
  140. package/dist/cache/types.d.ts +2 -2
  141. package/dist/cache/types.d.ts.map +1 -1
  142. package/dist/cache/types.js +1 -6
  143. package/dist/cache-control/cache-control.d.ts +2 -2
  144. package/dist/cache-control/cache-control.d.ts.map +1 -1
  145. package/dist/cache-control/cache-control.js +106 -122
  146. package/dist/cache-control/types.d.ts +2 -2
  147. package/dist/cache-control/types.d.ts.map +1 -1
  148. package/dist/cache-control/types.js +1 -19
  149. package/dist/compress/compress.d.ts +1 -1
  150. package/dist/compress/compress.d.ts.map +1 -1
  151. package/dist/compress/compress.js +58 -56
  152. package/dist/compress/index.js +7 -2
  153. package/dist/compress/types.js +1 -11
  154. package/dist/cone/cone-generator.d.ts +1 -1
  155. package/dist/cone/cone-generator.d.ts.map +1 -1
  156. package/dist/cone/cone-generator.js +216 -219
  157. package/dist/database/_batch_update.d.ts +1 -1
  158. package/dist/database/_batch_update.d.ts.map +1 -1
  159. package/dist/database/_batch_update.js +107 -102
  160. package/dist/database/base-model.d.ts +8 -9
  161. package/dist/database/base-model.d.ts.map +1 -1
  162. package/dist/database/base-model.js +371 -392
  163. package/dist/database/base-model.types.d.ts +5 -5
  164. package/dist/database/base-model.types.d.ts.map +1 -1
  165. package/dist/database/base-model.types.js +1 -20
  166. package/dist/database/db.d.ts +5 -2
  167. package/dist/database/db.d.ts.map +1 -1
  168. package/dist/database/db.js +185 -171
  169. package/dist/database/knex.d.ts +1 -1
  170. package/dist/database/knex.d.ts.map +1 -1
  171. package/dist/database/knex.js +48 -42
  172. package/dist/database/puri-subset.types.d.ts +7 -8
  173. package/dist/database/puri-subset.types.d.ts.map +1 -1
  174. package/dist/database/puri-subset.types.js +1 -16
  175. package/dist/database/puri-wrapper.d.ts +6 -6
  176. package/dist/database/puri-wrapper.d.ts.map +1 -1
  177. package/dist/database/puri-wrapper.js +99 -101
  178. package/dist/database/puri.d.ts +4 -5
  179. package/dist/database/puri.d.ts.map +1 -1
  180. package/dist/database/puri.js +1021 -1227
  181. package/dist/database/puri.types.d.ts +6 -6
  182. package/dist/database/puri.types.d.ts.map +1 -1
  183. package/dist/database/puri.types.js +15 -6
  184. package/dist/database/transaction-context.d.ts +2 -2
  185. package/dist/database/transaction-context.d.ts.map +1 -1
  186. package/dist/database/transaction-context.js +22 -13
  187. package/dist/database/upsert-builder.d.ts +3 -3
  188. package/dist/database/upsert-builder.d.ts.map +1 -1
  189. package/dist/database/upsert-builder.js +405 -465
  190. package/dist/dict/en.js +72 -74
  191. package/dist/dict/index.js +13 -13
  192. package/dist/dict/ko.js +72 -74
  193. package/dist/dict/rc-keys.js +150 -168
  194. package/dist/dict/sd.d.ts +3 -1
  195. package/dist/dict/sd.d.ts.map +1 -1
  196. package/dist/dict/sd.js +54 -40
  197. package/dist/dict/sonamu-dictionary.d.ts +1 -1
  198. package/dist/dict/sonamu-dictionary.d.ts.map +1 -1
  199. package/dist/dict/sonamu-dictionary.js +887 -955
  200. package/dist/dict/types.js +1 -7
  201. package/dist/dict/utils.js +26 -24
  202. package/dist/entity/entity-manager.d.ts +9 -9
  203. package/dist/entity/entity-manager.d.ts.map +1 -1
  204. package/dist/entity/entity-manager.js +226 -223
  205. package/dist/entity/entity-template-cone.d.ts +1 -1
  206. package/dist/entity/entity-template-cone.d.ts.map +1 -1
  207. package/dist/entity/entity-template-cone.js +152 -151
  208. package/dist/entity/entity.d.ts.map +1 -1
  209. package/dist/entity/entity.js +952 -1089
  210. package/dist/exceptions/error-handler.d.ts +1 -1
  211. package/dist/exceptions/error-handler.d.ts.map +1 -1
  212. package/dist/exceptions/error-handler.js +32 -27
  213. package/dist/exceptions/so-exceptions.d.ts +1 -1
  214. package/dist/exceptions/so-exceptions.d.ts.map +1 -1
  215. package/dist/exceptions/so-exceptions.js +61 -68
  216. package/dist/filter/index.js +9 -3
  217. package/dist/filter/types.js +92 -88
  218. package/dist/filter/utils.d.ts +1 -1
  219. package/dist/filter/utils.d.ts.map +1 -1
  220. package/dist/filter/utils.js +147 -161
  221. package/dist/index.js +87 -40
  222. package/dist/logger/category.d.ts.map +1 -1
  223. package/dist/logger/category.js +30 -29
  224. package/dist/logger/configure.d.ts.map +1 -1
  225. package/dist/logger/configure.js +83 -107
  226. package/dist/migration/code-generation.d.ts +2 -2
  227. package/dist/migration/code-generation.d.ts.map +1 -1
  228. package/dist/migration/code-generation.js +1385 -1578
  229. package/dist/migration/migration-set.d.ts +1 -1
  230. package/dist/migration/migration-set.d.ts.map +1 -1
  231. package/dist/migration/migration-set.js +177 -227
  232. package/dist/migration/migrator.d.ts +4 -3
  233. package/dist/migration/migrator.d.ts.map +1 -1
  234. package/dist/migration/migrator.js +340 -345
  235. package/dist/migration/postgresql-schema-reader.d.ts +2 -2
  236. package/dist/migration/postgresql-schema-reader.d.ts.map +1 -1
  237. package/dist/migration/postgresql-schema-reader.js +506 -564
  238. package/dist/migration/slack-confirm.d.ts +2 -2
  239. package/dist/migration/slack-confirm.d.ts.map +1 -1
  240. package/dist/migration/slack-confirm.js +205 -193
  241. package/dist/migration/types.d.ts +2 -2
  242. package/dist/migration/types.d.ts.map +1 -1
  243. package/dist/migration/types.js +1 -3
  244. package/dist/naite/messaging-types.d.ts +1 -0
  245. package/dist/naite/messaging-types.d.ts.map +1 -1
  246. package/dist/naite/messaging-types.js +1 -7
  247. package/dist/naite/naite-reporter.d.ts +2 -2
  248. package/dist/naite/naite-reporter.d.ts.map +1 -1
  249. package/dist/naite/naite-reporter.js +127 -120
  250. package/dist/naite/naite.d.ts +3 -2
  251. package/dist/naite/naite.d.ts.map +1 -1
  252. package/dist/naite/naite.js +266 -300
  253. package/dist/ssr/index.d.ts +2 -2
  254. package/dist/ssr/index.d.ts.map +1 -1
  255. package/dist/ssr/index.js +13 -3
  256. package/dist/ssr/registry.d.ts +1 -1
  257. package/dist/ssr/registry.d.ts.map +1 -1
  258. package/dist/ssr/registry.js +45 -37
  259. package/dist/ssr/renderer.d.ts +4 -4
  260. package/dist/ssr/renderer.d.ts.map +1 -1
  261. package/dist/ssr/renderer.js +84 -91
  262. package/dist/ssr/types.d.ts +2 -2
  263. package/dist/ssr/types.d.ts.map +1 -1
  264. package/dist/ssr/types.js +1 -3
  265. package/dist/storage/base-file.js +54 -41
  266. package/dist/storage/buffered-file.d.ts +2 -2
  267. package/dist/storage/buffered-file.d.ts.map +1 -1
  268. package/dist/storage/buffered-file.js +51 -44
  269. package/dist/storage/drivers.d.ts +2 -2
  270. package/dist/storage/drivers.d.ts.map +1 -1
  271. package/dist/storage/drivers.js +12 -7
  272. package/dist/storage/index.js +14 -7
  273. package/dist/storage/s3-driver.d.ts +2 -2
  274. package/dist/storage/s3-driver.d.ts.map +1 -1
  275. package/dist/storage/s3-driver.js +52 -48
  276. package/dist/storage/storage-manager.d.ts +2 -2
  277. package/dist/storage/storage-manager.d.ts.map +1 -1
  278. package/dist/storage/storage-manager.js +33 -25
  279. package/dist/storage/types.d.ts +2 -2
  280. package/dist/storage/types.d.ts.map +1 -1
  281. package/dist/storage/types.js +1 -5
  282. package/dist/storage/uploaded-file.d.ts +1 -1
  283. package/dist/storage/uploaded-file.d.ts.map +1 -1
  284. package/dist/storage/uploaded-file.js +45 -35
  285. package/dist/stream/index.js +7 -2
  286. package/dist/stream/sse.d.ts +2 -2
  287. package/dist/stream/sse.d.ts.map +1 -1
  288. package/dist/stream/sse.js +72 -67
  289. package/dist/syncer/api-parser.d.ts +1 -1
  290. package/dist/syncer/api-parser.d.ts.map +1 -1
  291. package/dist/syncer/api-parser.js +224 -245
  292. package/dist/syncer/checksum.d.ts +1 -1
  293. package/dist/syncer/checksum.d.ts.map +1 -1
  294. package/dist/syncer/checksum.js +86 -72
  295. package/dist/syncer/code-generator.d.ts +2 -2
  296. package/dist/syncer/code-generator.d.ts.map +1 -1
  297. package/dist/syncer/code-generator.js +154 -160
  298. package/dist/syncer/entity-operations.d.ts +1 -1
  299. package/dist/syncer/entity-operations.d.ts.map +1 -1
  300. package/dist/syncer/entity-operations.js +63 -54
  301. package/dist/syncer/file-patterns.d.ts +1 -1
  302. package/dist/syncer/file-patterns.d.ts.map +1 -1
  303. package/dist/syncer/file-patterns.js +38 -38
  304. package/dist/syncer/index.js +19 -8
  305. package/dist/syncer/module-loader.d.ts +5 -5
  306. package/dist/syncer/module-loader.d.ts.map +1 -1
  307. package/dist/syncer/module-loader.js +83 -78
  308. package/dist/syncer/syncer-actions.d.ts +2 -2
  309. package/dist/syncer/syncer-actions.d.ts.map +1 -1
  310. package/dist/syncer/syncer-actions.js +76 -91
  311. package/dist/syncer/syncer.d.ts +7 -6
  312. package/dist/syncer/syncer.d.ts.map +1 -1
  313. package/dist/syncer/syncer.js +426 -492
  314. package/dist/tasks/decorator.d.ts +3 -3
  315. package/dist/tasks/decorator.d.ts.map +1 -1
  316. package/dist/tasks/decorator.js +32 -28
  317. package/dist/tasks/step-wrapper.d.ts +1 -1
  318. package/dist/tasks/step-wrapper.d.ts.map +1 -1
  319. package/dist/tasks/step-wrapper.js +42 -41
  320. package/dist/tasks/workflow-manager.d.ts +2 -2
  321. package/dist/tasks/workflow-manager.d.ts.map +1 -1
  322. package/dist/tasks/workflow-manager.js +192 -221
  323. package/dist/template/entity-converter.d.ts +1 -1
  324. package/dist/template/entity-converter.d.ts.map +1 -1
  325. package/dist/template/entity-converter.js +103 -103
  326. package/dist/template/helpers.d.ts.map +1 -1
  327. package/dist/template/helpers.js +163 -163
  328. package/dist/template/implementations/entity.template.d.ts +1 -1
  329. package/dist/template/implementations/entity.template.d.ts.map +1 -1
  330. package/dist/template/implementations/entity.template.js +76 -85
  331. package/dist/template/implementations/entry-server.template.d.ts +1 -1
  332. package/dist/template/implementations/entry-server.template.d.ts.map +1 -1
  333. package/dist/template/implementations/entry-server.template.js +32 -27
  334. package/dist/template/implementations/generated.template.d.ts +1 -1
  335. package/dist/template/implementations/generated.template.d.ts.map +1 -1
  336. package/dist/template/implementations/generated.template.js +254 -275
  337. package/dist/template/implementations/generated_http.template.d.ts +2 -2
  338. package/dist/template/implementations/generated_http.template.d.ts.map +1 -1
  339. package/dist/template/implementations/generated_http.template.js +114 -133
  340. package/dist/template/implementations/generated_sso.template.d.ts.map +1 -1
  341. package/dist/template/implementations/generated_sso.template.js +249 -275
  342. package/dist/template/implementations/init_types.template.d.ts +1 -1
  343. package/dist/template/implementations/init_types.template.d.ts.map +1 -1
  344. package/dist/template/implementations/init_types.template.js +40 -34
  345. package/dist/template/implementations/model.template.d.ts +1 -1
  346. package/dist/template/implementations/model.template.d.ts.map +1 -1
  347. package/dist/template/implementations/model.template.js +56 -53
  348. package/dist/template/implementations/model_test.template.d.ts +1 -1
  349. package/dist/template/implementations/model_test.template.d.ts.map +1 -1
  350. package/dist/template/implementations/model_test.template.js +32 -24
  351. package/dist/template/implementations/queries.template.d.ts +1 -1
  352. package/dist/template/implementations/queries.template.d.ts.map +1 -1
  353. package/dist/template/implementations/queries.template.js +84 -89
  354. package/dist/template/implementations/sd.template.d.ts +1 -1
  355. package/dist/template/implementations/sd.template.d.ts.map +1 -1
  356. package/dist/template/implementations/sd.template.js +137 -144
  357. package/dist/template/implementations/services.template.d.ts +1 -1
  358. package/dist/template/implementations/services.template.d.ts.map +1 -1
  359. package/dist/template/implementations/services.template.js +164 -189
  360. package/dist/template/implementations/view_form.template.d.ts +1 -1
  361. package/dist/template/implementations/view_form.template.d.ts.map +1 -1
  362. package/dist/template/implementations/view_form.template.js +258 -285
  363. package/dist/template/implementations/view_id_all_select.template.d.ts +1 -1
  364. package/dist/template/implementations/view_id_all_select.template.d.ts.map +1 -1
  365. package/dist/template/implementations/view_id_all_select.template.js +31 -25
  366. package/dist/template/implementations/view_list.template.d.ts +1 -1
  367. package/dist/template/implementations/view_list.template.d.ts.map +1 -1
  368. package/dist/template/implementations/view_list.template.js +304 -355
  369. package/dist/template/implementations/view_search_input.template.d.ts +1 -1
  370. package/dist/template/implementations/view_search_input.template.d.ts.map +1 -1
  371. package/dist/template/implementations/view_search_input.template.js +31 -27
  372. package/dist/template/index.js +21 -7
  373. package/dist/template/template-manager.d.ts +1 -1
  374. package/dist/template/template-manager.d.ts.map +1 -1
  375. package/dist/template/template-manager.js +132 -123
  376. package/dist/template/template-types.js +8 -6
  377. package/dist/template/template.d.ts +2 -2
  378. package/dist/template/template.d.ts.map +1 -1
  379. package/dist/template/template.js +73 -68
  380. package/dist/template/zod-converter.d.ts.map +1 -1
  381. package/dist/template/zod-converter.js +603 -657
  382. package/dist/testing/_relation-graph.d.ts +1 -1
  383. package/dist/testing/_relation-graph.d.ts.map +1 -1
  384. package/dist/testing/_relation-graph.js +93 -88
  385. package/dist/testing/bootstrap.d.ts +22 -13
  386. package/dist/testing/bootstrap.d.ts.map +1 -1
  387. package/dist/testing/bootstrap.js +114 -114
  388. package/dist/testing/data-explorer.d.ts +3 -3
  389. package/dist/testing/data-explorer.d.ts.map +1 -1
  390. package/dist/testing/data-explorer.js +237 -265
  391. package/dist/testing/dev-test-routes.d.ts +2 -2
  392. package/dist/testing/dev-test-routes.d.ts.map +1 -1
  393. package/dist/testing/dev-test-routes.js +258 -249
  394. package/dist/testing/dev-vitest-manager.d.ts +1 -1
  395. package/dist/testing/dev-vitest-manager.d.ts.map +1 -1
  396. package/dist/testing/dev-vitest-manager.js +514 -539
  397. package/dist/testing/faker-mappings.js +422 -420
  398. package/dist/testing/fixture-generator.d.ts +3 -3
  399. package/dist/testing/fixture-generator.d.ts.map +1 -1
  400. package/dist/testing/fixture-generator.js +1216 -1346
  401. package/dist/testing/fixture-loader.js +26 -25
  402. package/dist/testing/fixture-manager.d.ts +3 -3
  403. package/dist/testing/fixture-manager.d.ts.map +1 -1
  404. package/dist/testing/fixture-manager.js +706 -776
  405. package/dist/testing/global-setup.js +53 -49
  406. package/dist/testing/index.js +19 -11
  407. package/dist/testing/naite-vitest-reporter.js +18 -13
  408. package/dist/testing/parallel-db-manager.d.ts +1 -1
  409. package/dist/testing/parallel-db-manager.d.ts.map +1 -1
  410. package/dist/testing/parallel-db-manager.js +63 -78
  411. package/dist/testing/vitest-helpers.d.ts +1 -1
  412. package/dist/testing/vitest-helpers.d.ts.map +1 -1
  413. package/dist/testing/vitest-helpers.js +37 -33
  414. package/dist/types/types.d.ts +28 -28
  415. package/dist/types/types.d.ts.map +1 -1
  416. package/dist/types/types.js +764 -890
  417. package/dist/ui/ai-api.d.ts +1 -1
  418. package/dist/ui/ai-api.d.ts.map +1 -1
  419. package/dist/ui/ai-api.js +52 -42
  420. package/dist/ui/ai-client.d.ts +1 -2
  421. package/dist/ui/ai-client.d.ts.map +1 -1
  422. package/dist/ui/ai-client.js +353 -388
  423. package/dist/ui/api.d.ts +1 -1
  424. package/dist/ui/api.d.ts.map +1 -1
  425. package/dist/ui/api.js +903 -1145
  426. package/dist/ui/cdd-service.d.ts +15 -18
  427. package/dist/ui/cdd-service.d.ts.map +1 -1
  428. package/dist/ui/cdd-service.js +406 -383
  429. package/dist/ui/cdd-types.d.ts +41 -68
  430. package/dist/ui/cdd-types.d.ts.map +1 -1
  431. package/dist/ui/cdd-types.js +1 -3
  432. package/dist/ui-web/assets/index-C-Zz-wYg.css +1 -0
  433. package/dist/ui-web/assets/index-DejDON8K.js +238 -0
  434. package/dist/ui-web/index.html +3 -3
  435. package/dist/utils/async-utils.js +57 -45
  436. package/dist/utils/console-util.d.ts.map +1 -1
  437. package/dist/utils/console-util.js +104 -87
  438. package/dist/utils/controller.js +26 -19
  439. package/dist/utils/esm-utils.js +49 -38
  440. package/dist/utils/formatter.d.ts +1 -2
  441. package/dist/utils/formatter.d.ts.map +1 -1
  442. package/dist/utils/formatter.js +89 -115
  443. package/dist/utils/fs-utils.d.ts.map +1 -1
  444. package/dist/utils/fs-utils.js +68 -65
  445. package/dist/utils/lodash-able.js +11 -4
  446. package/dist/utils/model.d.ts +1 -1
  447. package/dist/utils/model.d.ts.map +1 -1
  448. package/dist/utils/model.js +21 -19
  449. package/dist/utils/object-utils.js +148 -186
  450. package/dist/utils/path-utils.js +67 -57
  451. package/dist/utils/process-utils.d.ts.map +1 -1
  452. package/dist/utils/process-utils.js +37 -31
  453. package/dist/utils/sql-parser.d.ts +1 -1
  454. package/dist/utils/sql-parser.d.ts.map +1 -1
  455. package/dist/utils/sql-parser.js +40 -40
  456. package/dist/utils/type-utils.js +44 -43
  457. package/dist/utils/utils.d.ts +2 -3
  458. package/dist/utils/utils.d.ts.map +1 -1
  459. package/dist/utils/utils.js +81 -93
  460. package/dist/utils/zod-error.d.ts +1 -1
  461. package/dist/utils/zod-error.d.ts.map +1 -1
  462. package/dist/utils/zod-error.js +24 -17
  463. package/dist/vector/chunking.d.ts +1 -1
  464. package/dist/vector/chunking.d.ts.map +1 -1
  465. package/dist/vector/chunking.js +100 -94
  466. package/dist/vector/config.d.ts +1 -1
  467. package/dist/vector/config.d.ts.map +1 -1
  468. package/dist/vector/config.js +76 -78
  469. package/dist/vector/embedding.d.ts +1 -1
  470. package/dist/vector/embedding.d.ts.map +1 -1
  471. package/dist/vector/embedding.js +128 -125
  472. package/dist/vector/index.js +5 -5
  473. package/dist/vector/types.js +1 -5
  474. package/package.json +35 -36
  475. package/src/ai/agents/agent.ts +12 -5
  476. package/src/ai/agents/types.ts +5 -5
  477. package/src/ai/providers/rtzr/model.ts +8 -10
  478. package/src/ai/providers/rtzr/options.ts +2 -1
  479. package/src/ai/providers/rtzr/provider.ts +5 -3
  480. package/src/ai/providers/rtzr/utils.ts +2 -7
  481. package/src/api/__tests__/config.test.ts +15 -8
  482. package/src/api/base-frame.ts +5 -3
  483. package/src/api/caster.ts +7 -6
  484. package/src/api/code-converters.ts +23 -26
  485. package/src/api/config.ts +23 -17
  486. package/src/api/context.ts +18 -11
  487. package/src/api/decorators.ts +17 -18
  488. package/src/api/sonamu.ts +44 -49
  489. package/src/auth/auth-generator.ts +4 -6
  490. package/src/auth/better-auth-entities.ts +3 -2
  491. package/src/auth/knex-adapter.ts +9 -7
  492. package/src/auth/plugins/entity-definitions/admin.ts +1 -1
  493. package/src/auth/plugins/entity-definitions/anonymous.ts +1 -1
  494. package/src/auth/plugins/entity-definitions/api-key.ts +1 -1
  495. package/src/auth/plugins/entity-definitions/index.ts +1 -1
  496. package/src/auth/plugins/entity-definitions/jwt.ts +1 -1
  497. package/src/auth/plugins/entity-definitions/organization.ts +1 -1
  498. package/src/auth/plugins/entity-definitions/passkey.ts +1 -1
  499. package/src/auth/plugins/entity-definitions/phone-number.ts +1 -1
  500. package/src/auth/plugins/entity-definitions/sso.ts +1 -1
  501. package/src/auth/plugins/entity-definitions/two-factor.ts +1 -1
  502. package/src/auth/plugins/entity-definitions/types.ts +1 -1
  503. package/src/auth/plugins/entity-definitions/username.ts +1 -1
  504. package/src/auth/plugins/wrappers/admin.ts +3 -1
  505. package/src/auth/plugins/wrappers/anonymous.ts +3 -1
  506. package/src/auth/plugins/wrappers/api-key.ts +3 -1
  507. package/src/auth/plugins/wrappers/jwt.ts +3 -1
  508. package/src/auth/plugins/wrappers/organization.ts +3 -1
  509. package/src/auth/plugins/wrappers/passkey.ts +3 -1
  510. package/src/auth/plugins/wrappers/phone-number.ts +3 -1
  511. package/src/auth/plugins/wrappers/sso.ts +2 -1
  512. package/src/auth/plugins/wrappers/two-factor.ts +3 -1
  513. package/src/auth/plugins/wrappers/username.ts +3 -1
  514. package/src/bin/__tests__/ts-loader-register.test.ts +7 -12
  515. package/src/bin/build-config.ts +3 -3
  516. package/src/bin/cli.ts +27 -25
  517. package/src/bin/fixture.ts +4 -2
  518. package/src/bin/hmr-hook-register.ts +1 -0
  519. package/src/bin/test-command.ts +4 -2
  520. package/src/bin/ts-loader-registration.ts +6 -22
  521. package/src/cache/cache-manager.ts +2 -1
  522. package/src/cache/decorator.ts +2 -2
  523. package/src/cache/types.ts +3 -3
  524. package/src/cache-control/cache-control.ts +3 -2
  525. package/src/cache-control/types.ts +2 -2
  526. package/src/compress/compress.ts +1 -1
  527. package/src/cone/cone-generator.ts +7 -5
  528. package/src/database/_batch_update.ts +1 -1
  529. package/src/database/base-model.ts +20 -14
  530. package/src/database/base-model.types.ts +12 -11
  531. package/src/database/db.ts +56 -21
  532. package/src/database/knex.ts +2 -2
  533. package/src/database/puri-subset.test-d.ts +130 -27
  534. package/src/database/puri-subset.types.ts +7 -8
  535. package/src/database/puri-wrapper.ts +29 -26
  536. package/src/database/puri.ts +36 -34
  537. package/src/database/puri.types.test-d.ts +6 -5
  538. package/src/database/puri.types.ts +9 -12
  539. package/src/database/transaction-context.ts +2 -2
  540. package/src/database/upsert-builder.ts +17 -10
  541. package/src/dict/sd.ts +17 -4
  542. package/src/dict/sonamu-dictionary.ts +23 -17
  543. package/src/entity/entity-manager.ts +9 -7
  544. package/src/entity/entity-template-cone.ts +10 -3
  545. package/src/entity/entity.ts +20 -16
  546. package/src/exceptions/error-handler.ts +2 -1
  547. package/src/exceptions/so-exceptions.ts +1 -1
  548. package/src/filter/utils.ts +3 -2
  549. package/src/logger/category.ts +1 -0
  550. package/src/logger/configure.ts +5 -5
  551. package/src/migration/__tests__/code-generation.search-text.test.ts +2 -3
  552. package/src/migration/code-generation.ts +26 -25
  553. package/src/migration/migration-set.ts +16 -18
  554. package/src/migration/migrator.ts +38 -33
  555. package/src/migration/postgresql-schema-reader.ts +12 -12
  556. package/src/migration/slack-confirm.ts +5 -4
  557. package/src/migration/types.ts +2 -2
  558. package/src/naite/messaging-types.ts +1 -1
  559. package/src/naite/naite-reporter.ts +5 -3
  560. package/src/naite/naite.ts +12 -7
  561. package/src/shared/app.shared.ts.txt +2 -2
  562. package/src/shared/web.shared.ts.txt +2 -2
  563. package/src/skills/AGENTS.md +19 -18
  564. package/src/skills/commands/sonamu-skills.md +9 -9
  565. package/src/skills/sonamu/SKILL.md +126 -76
  566. package/src/skills/sonamu/ai-agents.md +27 -26
  567. package/src/skills/sonamu/api.md +81 -69
  568. package/src/skills/sonamu/auth-migration.md +13 -27
  569. package/src/skills/sonamu/auth-plugins.md +41 -31
  570. package/src/skills/sonamu/auth.md +30 -24
  571. package/src/skills/sonamu/cdd.md +26 -17
  572. package/src/skills/sonamu/cone.md +50 -50
  573. package/src/skills/sonamu/config.md +74 -51
  574. package/src/skills/sonamu/create-sonamu.md +31 -19
  575. package/src/skills/sonamu/database.md +43 -26
  576. package/src/skills/sonamu/entity-basic.md +61 -61
  577. package/src/skills/sonamu/entity-relations.md +84 -80
  578. package/src/skills/sonamu/entity-validation-checklist.md +19 -15
  579. package/src/skills/sonamu/fixture-cli.md +52 -30
  580. package/src/skills/sonamu/framework-change.md +9 -7
  581. package/src/skills/sonamu/frontend.md +64 -82
  582. package/src/skills/sonamu/i18n.md +45 -37
  583. package/src/skills/sonamu/migration.md +54 -31
  584. package/src/skills/sonamu/model.md +98 -66
  585. package/src/skills/sonamu/naite.md +34 -32
  586. package/src/skills/sonamu/project-init.md +28 -8
  587. package/src/skills/sonamu/puri.md +82 -91
  588. package/src/skills/sonamu/scaffolding.md +44 -32
  589. package/src/skills/sonamu/skill-contribution.md +50 -45
  590. package/src/skills/sonamu/subset.md +13 -13
  591. package/src/skills/sonamu/tasks.md +73 -58
  592. package/src/skills/sonamu/testing-devrunner.md +56 -36
  593. package/src/skills/sonamu/testing.md +23 -58
  594. package/src/skills/sonamu/upsert.md +32 -31
  595. package/src/skills/sonamu/vector.md +37 -36
  596. package/src/ssr/index.ts +2 -12
  597. package/src/ssr/registry.ts +1 -1
  598. package/src/ssr/renderer.ts +7 -5
  599. package/src/ssr/types.ts +2 -2
  600. package/src/storage/buffered-file.ts +4 -2
  601. package/src/storage/drivers.ts +3 -2
  602. package/src/storage/s3-driver.ts +7 -4
  603. package/src/storage/storage-manager.ts +3 -2
  604. package/src/storage/types.ts +3 -2
  605. package/src/storage/uploaded-file.ts +1 -1
  606. package/src/stream/sse.ts +2 -2
  607. package/src/syncer/api-parser.ts +8 -5
  608. package/src/syncer/checksum.ts +9 -5
  609. package/src/syncer/code-generator.ts +16 -8
  610. package/src/syncer/entity-operations.ts +5 -3
  611. package/src/syncer/file-patterns.ts +2 -1
  612. package/src/syncer/module-loader.ts +9 -6
  613. package/src/syncer/syncer-actions.ts +5 -3
  614. package/src/syncer/syncer.ts +18 -24
  615. package/src/tasks/decorator.ts +10 -8
  616. package/src/tasks/step-wrapper.ts +1 -1
  617. package/src/tasks/workflow-manager.ts +18 -15
  618. package/src/template/__tests__/generated.template.search-text.test.ts +1 -0
  619. package/src/template/entity-converter.ts +4 -2
  620. package/src/template/generated.template.test-d.ts +2 -1
  621. package/src/template/helpers.ts +5 -2
  622. package/src/template/implementations/entity.template.ts +9 -8
  623. package/src/template/implementations/entry-server.template.ts +1 -1
  624. package/src/template/implementations/generated.template.ts +21 -29
  625. package/src/template/implementations/generated_http.template.ts +9 -6
  626. package/src/template/implementations/generated_sso.template.ts +6 -4
  627. package/src/template/implementations/init_types.template.ts +3 -2
  628. package/src/template/implementations/model.template.ts +4 -2
  629. package/src/template/implementations/model_test.template.ts +3 -2
  630. package/src/template/implementations/queries.template.ts +6 -14
  631. package/src/template/implementations/sd.template.ts +4 -2
  632. package/src/template/implementations/services.template.ts +7 -11
  633. package/src/template/implementations/view_form.template.ts +5 -3
  634. package/src/template/implementations/view_id_all_select.template.ts +3 -2
  635. package/src/template/implementations/view_list.template.ts +7 -5
  636. package/src/template/implementations/view_search_input.template.ts +3 -2
  637. package/src/template/template-manager.ts +4 -3
  638. package/src/template/template.ts +4 -3
  639. package/src/template/zod-converter.ts +10 -7
  640. package/src/testing/__tests__/dev-test-routes.test.ts +3 -2
  641. package/src/testing/__tests__/dev-vitest-manager.test.ts +1 -0
  642. package/src/testing/_relation-graph.ts +2 -2
  643. package/src/testing/bootstrap.ts +55 -27
  644. package/src/testing/data-explorer.ts +5 -4
  645. package/src/testing/dev-test-routes.ts +8 -5
  646. package/src/testing/dev-vitest-manager.ts +13 -12
  647. package/src/testing/fixture-generator.ts +15 -21
  648. package/src/testing/fixture-manager.ts +21 -17
  649. package/src/testing/parallel-db-manager.ts +2 -1
  650. package/src/testing/vitest-helpers.ts +2 -1
  651. package/src/types/__tests__/entity-json-schema-search-text.test.ts +1 -0
  652. package/src/types/types.ts +8 -8
  653. package/src/typings/knex.d.ts +4 -4
  654. package/src/ui/ai-api.ts +5 -3
  655. package/src/ui/ai-client.ts +7 -6
  656. package/src/ui/api.ts +42 -39
  657. package/src/ui/cdd-service.ts +268 -257
  658. package/src/ui/cdd-types.ts +40 -75
  659. package/src/utils/console-util.ts +3 -1
  660. package/src/utils/formatter.ts +94 -102
  661. package/src/utils/fs-utils.ts +2 -1
  662. package/src/utils/model.ts +2 -2
  663. package/src/utils/object-utils.ts +3 -3
  664. package/src/utils/process-utils.ts +2 -1
  665. package/src/utils/sql-parser.ts +10 -1
  666. package/src/utils/type-utils.ts +3 -3
  667. package/src/utils/utils.ts +9 -7
  668. package/src/utils/zod-error.ts +1 -1
  669. package/src/vector/chunking.ts +1 -1
  670. package/src/vector/config.ts +1 -1
  671. package/src/vector/embedding.ts +11 -9
  672. package/tsdown.api.config.ts +50 -0
  673. package/.swcrc.project-default +0 -18
  674. package/dist/api/__tests__/config.test.js +0 -189
  675. package/dist/bin/__tests__/test-command.test.js +0 -112
  676. package/dist/bin/__tests__/ts-loader-register.test.js +0 -45
  677. package/dist/database/puri-subset.test-d.js +0 -81
  678. package/dist/database/puri.types.test-d.js +0 -129
  679. package/dist/migration/__tests__/code-generation.search-text.test.js +0 -435
  680. package/dist/template/__tests__/generated.template.search-text.test.js +0 -99
  681. package/dist/template/generated.template.test-d.js +0 -24
  682. package/dist/testing/__tests__/dev-test-routes.test.js +0 -144
  683. package/dist/testing/__tests__/dev-vitest-manager.test.js +0 -152
  684. package/dist/types/__tests__/entity-json-schema-search-text.test.js +0 -256
  685. package/dist/typings/knex.d.js +0 -3
  686. package/dist/ui-web/assets/index-BrQKU3j9.css +0 -1
  687. package/dist/ui-web/assets/index-CxiydzeC.js +0 -257
@@ -3,18 +3,18 @@ Read ~/.claude/skills/sonamu/SKILL.md and follow its instructions.
3
3
  Then greet the user with the following format (exactly):
4
4
 
5
5
  ---
6
+
6
7
  Sonamu 스킬 가이드가 로드됐습니다. 어떤 작업을 하실 건가요?
7
8
 
8
- **Workflow** · CDD · project-init · config
9
+ **Workflow** · CDD · project-init · config
9
10
  **Entity/DB** · entity-basic · entity-relations · subset · migration · database
10
- **API** · model · api · puri · upsert
11
- **Testing** · testing · devrunner · naite · cone · fixture-cli
12
- **Auth** · auth · auth-migration · auth-plugins
13
- **Frontend** · frontend · scaffolding · i18n
14
- **Advanced** · vector · ai-agents · tasks
15
- **Meta** · skill-contribution · framework-change
11
+ **API** · model · api · puri · upsert
12
+ **Testing** · testing · devrunner · naite · cone · fixture-cli
13
+ **Auth** · auth · auth-migration · auth-plugins
14
+ **Frontend** · frontend · scaffolding · i18n
15
+ **Advanced** · vector · ai-agents · tasks
16
+ **Meta** · skill-contribution · framework-change
16
17
 
17
- 어떤 스킬이나 작업을 도와드릴까요? (하고 싶은 작업을 자유롭게 설명해도 됩니다.)
18
- ---
18
+ ## 어떤 스킬이나 작업을 도와드릴까요? (하고 싶은 작업을 자유롭게 설명해도 됩니다.)
19
19
 
20
20
  If the user provides $ARGUMENTS, skip the greeting and directly help with: $ARGUMENTS
@@ -12,11 +12,13 @@ Claude Code skill for developing projects with the Sonamu framework.
12
12
  **MUST ask questions one at a time. NEVER overwhelm users with multiple questions.**
13
13
 
14
14
  ### MUST DO
15
+
15
16
  - One question → wait for user response → next question
16
17
  - Keep questions concise
17
18
  - Present choices clearly when options are available
18
19
 
19
20
  ### NEVER DO
21
+
20
22
  - List multiple questions at once
21
23
  - Ask questions alongside long explanations
22
24
  - Output a checklist of confirmation items all at once
@@ -41,16 +43,17 @@ PHASE 6: Frontend development (proceed in batches with user confi
41
43
 
42
44
  **Begin from the PHASE that matches the user's instruction.** Do not always start from PHASE 0.
43
45
 
44
- | User instruction | Starting PHASE | Prerequisites to verify |
45
- |-----------------|----------------|------------------------|
46
- | "Create a new project" | PHASE 0 | — |
47
- | "Write contract" / "Analyze domain" | PHASE 1 | Domain list identified |
48
- | "Add entity" / "Create entity" | PHASE 2 | Project exists, dev server running, read contract/**/*.contract.md, PHASE 1 complete |
49
- | "Write tests" / "Implement API" | PHASE 4 | entity.json exists, migration complete, scaffolding complete |
50
- | "Generate fixtures" | PHASE 5 | Tests passing, cone.note exists |
51
- | "Develop frontend" | PHASE 6 | API implementation complete, contract/**/*.contract.md reviewed |
46
+ | User instruction | Starting PHASE | Prerequisites to verify |
47
+ | ----------------------------------- | -------------- | ------------------------------------------------------------------------------------- |
48
+ | "Create a new project" | PHASE 0 | — |
49
+ | "Write contract" / "Analyze domain" | PHASE 1 | Domain list identified |
50
+ | "Add entity" / "Create entity" | PHASE 2 | Project exists, dev server running, read contract/\*_/_.contract.md, PHASE 1 complete |
51
+ | "Write tests" / "Implement API" | PHASE 4 | entity.json exists, migration complete, scaffolding complete |
52
+ | "Generate fixtures" | PHASE 5 | Tests passing, cone.note exists |
53
+ | "Develop frontend" | PHASE 6 | API implementation complete, contract/\*_/_.contract.md reviewed |
52
54
 
53
55
  **Mid-entry rules:**
56
+
54
57
  1. If `contract/**/*.contract.md` and `skills/project/architecture.md` exist, read them first.
55
58
  2. Verify prerequisites for the target PHASE.
56
59
  3. If prerequisites are not met, inform the user and begin from the required step.
@@ -85,18 +88,22 @@ Documents domain rules in a cohesive form and captures decision rationale that c
85
88
  # {Domain} Business Logic
86
89
 
87
90
  ## Rules
91
+
88
92
  - Refunds allowed only within 7 days of payment [Rationale: PG provider policy]
89
93
  - Order status transitions: pending → confirmed → shipped → completed
90
94
 
91
95
  ## Workflow
96
+
92
97
  1. ...
93
98
  ```
94
99
 
95
100
  **Two development paths:**
101
+
96
102
  - **New**: write `*.contract.md` → Claim → AC (test name) → implement (TDD)
97
103
  - **Change**: modify code → register Claim → verify/update `*.contract.md` (record change rationale)
98
104
 
99
105
  **Update rules:**
106
+
100
107
  - When code changes, check affected domain rules and update `*.contract.md` together
101
108
  - Record the reason and decision rationale — this keeps `*.contract.md` alive
102
109
 
@@ -113,79 +120,122 @@ Documents are persisted as files, so project context is preserved even when the
113
120
 
114
121
  ## Skills List
115
122
 
116
- | Skill | File | Purpose |
117
- |-------|------|---------|
118
- | **CDD (AC+Claim-based development)** | `cdd.md` | **`*.contract.md` (domain rules), AC (test names), Claim (work instructions) — 3-artifact system** |
119
- | Project creation | `create-sonamu.md` | create-sonamu CLI options |
120
- | Project initialization | `project-init.md` | Project creation flow and conversation guide |
121
- | Project configuration | `config.md` | .env, sonamu.config.ts settings |
122
- | Database | `database.md` | DB setup, port conflict resolution, 3-Tier structure |
123
- | Entity validation | `entity-validation-checklist.md` | Step-by-step entity creation checklist |
124
- | Entity basics | `entity-basic.md` | Entity JSON structure, field types |
125
- | Entity relations | `entity-relations.md` | BelongsToOne, HasMany, ManyToMany, FK code patterns |
126
- | Subset | `subset.md` | Response field scope definition |
127
- | Model | `model.md` | BaseModelClass, CRUD patterns |
128
- | API | `api.md` | @api decorator |
129
- | Puri | `puri.md` | SQL query builder |
130
- | i18n | `i18n.md` | Internationalization, SD functions |
131
- | Upsert | `upsert.md` | Batch saving of relation data |
132
- | Testing | `testing.md` | Vitest tests (test/testAs), fixture generation tips |
133
- | **DevRunner** | `testing-devrunner.md` | **sonamu test execution, HMR integration, parallel tests, sonamu.config.ts test settings** |
134
- | **Naite** | `naite.md` | **Naite.t()/get() tracing system, chaining filters, trace CLI output** |
135
- | **Cone** | `cone.md` | **Cone metadata generation and management (LLM/template)** |
136
- | **Fixture CLI** | `fixture-cli.md` | **fixture gen/fetch/explore commands, 3-Tier DB usage** |
137
- | Migration | `migration.md` | DB schema migration, PK type changes |
138
- | Auth | `auth.md` | better-auth system (auto entity generation, Guards, Context) |
139
- | Auth Migration | `auth-migration.md` | User.id type changes for external auth (e.g., better-auth) |
140
- | **Auth Plugins** | `auth-plugins.md` | **better-auth plugin wrappers (admin, organization, 2fa, passkey, etc. — 10 types), snake_case mapping** |
141
- | **Vector search** | `vector.md` | **pgvector embeddings (Voyage AI/OpenAI), chunking, hybrid search** |
142
- | Puri query builder | `puri.md` | SELECT, WHERE, JOIN, FTS, pg_trgm fuzzy search, pgvector |
143
- | **AI Agents** | `ai-agents.md` | **BaseAgentClass, @tools decorator, ToolLoopAgent, AsyncLocalStorage state** |
144
- | **Tasks** | `tasks.md` | **Background workflows, cron scheduling, durable steps, retry policies** |
145
- | **Skill contribution** | `skill-contribution.md` | **Troubleshooting → skill contribution workflow (matching, decision, format, approval)** |
146
- | **Framework change** | `framework-change.md` | **Criteria for framework fix vs. project workaround. @upload parameter pattern** |
147
- | Frontend | `frontend.md` | Service, TanStack Query |
148
- | Scaffolding | `scaffolding.md` | Resolving UI scaffolding errors |
123
+ | Skill | File | Purpose |
124
+ | ------------------------------------ | -------------------------------- | -------------------------------------------------------------------------------------------------------- |
125
+ | **CDD (AC+Claim-based development)** | `cdd.md` | **`*.contract.md` (domain rules), AC (test names), Claim (work instructions) — 3-artifact system** |
126
+ | Project creation | `create-sonamu.md` | create-sonamu CLI options |
127
+ | Project initialization | `project-init.md` | Project creation flow and conversation guide |
128
+ | Project configuration | `config.md` | .env, sonamu.config.ts settings |
129
+ | Database | `database.md` | DB setup, port conflict resolution, 3-Tier structure |
130
+ | Entity validation | `entity-validation-checklist.md` | Step-by-step entity creation checklist |
131
+ | Entity basics | `entity-basic.md` | Entity JSON structure, field types |
132
+ | Entity relations | `entity-relations.md` | BelongsToOne, HasMany, ManyToMany, FK code patterns |
133
+ | Subset | `subset.md` | Response field scope definition |
134
+ | Model | `model.md` | BaseModelClass, CRUD patterns |
135
+ | API | `api.md` | @api decorator |
136
+ | Puri | `puri.md` | SQL query builder |
137
+ | i18n | `i18n.md` | Internationalization, SD functions |
138
+ | Upsert | `upsert.md` | Batch saving of relation data |
139
+ | Testing | `testing.md` | Vitest tests (test/testAs), fixture generation tips |
140
+ | **DevRunner** | `testing-devrunner.md` | **sonamu test execution, HMR integration, parallel tests, sonamu.config.ts test settings** |
141
+ | **Naite** | `naite.md` | **Naite.t()/get() tracing system, chaining filters, trace CLI output** |
142
+ | **Cone** | `cone.md` | **Cone metadata generation and management (LLM/template)** |
143
+ | **Fixture CLI** | `fixture-cli.md` | **fixture gen/fetch/explore commands, 3-Tier DB usage** |
144
+ | Migration | `migration.md` | DB schema migration, PK type changes |
145
+ | Auth | `auth.md` | better-auth system (auto entity generation, Guards, Context) |
146
+ | Auth Migration | `auth-migration.md` | User.id type changes for external auth (e.g., better-auth) |
147
+ | **Auth Plugins** | `auth-plugins.md` | **better-auth plugin wrappers (admin, organization, 2fa, passkey, etc. — 10 types), snake_case mapping** |
148
+ | **Vector search** | `vector.md` | **pgvector embeddings (Voyage AI/OpenAI), chunking, hybrid search** |
149
+ | Puri query builder | `puri.md` | SELECT, WHERE, JOIN, FTS, pg_trgm fuzzy search, pgvector |
150
+ | **AI Agents** | `ai-agents.md` | **BaseAgentClass, @tools decorator, ToolLoopAgent, AsyncLocalStorage state** |
151
+ | **Tasks** | `tasks.md` | **Background workflows, cron scheduling, durable steps, retry policies** |
152
+ | **Skill contribution** | `skill-contribution.md` | **Troubleshooting → skill contribution workflow (matching, decision, format, approval)** |
153
+ | **Framework change** | `framework-change.md` | **Criteria for framework fix vs. project workaround. @upload parameter pattern** |
154
+ | Frontend | `frontend.md` | Service, TanStack Query |
155
+ | Scaffolding | `scaffolding.md` | Resolving UI scaffolding errors |
149
156
 
150
157
  ## Task-to-Skill Reference
151
158
 
152
159
  **CRITICAL: When building a new system from scratch, start with `.claude/workflow/project_init.md`!**
153
160
 
154
- | Task | Reference Skill |
155
- |------|----------------|
156
- | **Build an entire system from scratch** | **`.claude/workflow/project_init.md` (7-phase master guide)** |
157
- | **Domain logic documentation / AC+Claim-based development** | **cdd.md** |
158
- | Project creation | create-sonamu, project-init |
159
- | Project configuration | config |
160
- | Sonamu local dev setup | config |
161
- | DB setup / port conflict | database, config |
162
- | **3-Tier DB structure** | **database, fixture-cli** |
163
- | **Cone metadata generation/management** | **cone** |
164
- | Entity / field definition | entity-basic |
165
- | Relationship setup | entity-relations |
166
- | **BelongsToOne FK code usage** | **entity-relations** |
167
- | API response field composition | subset |
168
- | Data query / save logic | model, puri |
169
- | API endpoints | api |
170
- | Batch saving of relation data | upsert |
171
- | Writing tests | testing |
172
- | **Running tests (sonamu test)** | **testing-devrunner** |
173
- | **Naite tracing / debugging** | **naite** |
174
- | **Fixture data generation/management** | **fixture-cli** |
175
- | **Test data generation tips** | **testing (Fixture data generation tips), fixture-cli (practical tips)** |
176
- | DB schema changes | migration |
177
- | **Auth setup (auth generate, Guards, Context)** | **auth** |
178
- | PK type changes (better-auth, etc.) | auth-migration |
179
- | **Adding auth plugins** | **auth-plugins** |
180
- | Frontend development | frontend |
181
- | Internationalization / translation | i18n |
182
- | Scaffolding errors | scaffolding |
183
- | **Vector search / embeddings** | **vector** |
184
- | **pg_trgm Fuzzy Search** | **puri, entity-basic** |
185
- | **AI Agent development** | **ai-agents** |
186
- | **Background jobs / scheduling** | **tasks** |
187
- | **Troubleshooting → skill contribution** | **skill-contribution** |
188
- | **Framework bug / constraint response** | **framework-change** |
161
+ | Task | Reference Skill |
162
+ | ----------------------------------------------------------- | ------------------------------------------------------------------------ |
163
+ | **Build an entire system from scratch** | **`.claude/workflow/project_init.md` (7-phase master guide)** |
164
+ | **Domain logic documentation / AC+Claim-based development** | **cdd.md** |
165
+ | Project creation | create-sonamu, project-init |
166
+ | Project configuration | config |
167
+ | Sonamu local dev setup | config |
168
+ | DB setup / port conflict | database, config |
169
+ | **3-Tier DB structure** | **database, fixture-cli** |
170
+ | **Cone metadata generation/management** | **cone** |
171
+ | Entity / field definition | entity-basic |
172
+ | Relationship setup | entity-relations |
173
+ | **BelongsToOne FK code usage** | **entity-relations** |
174
+ | API response field composition | subset |
175
+ | Data query / save logic | model, puri |
176
+ | API endpoints | api |
177
+ | Batch saving of relation data | upsert |
178
+ | Writing tests | testing |
179
+ | **Running tests (sonamu test)** | **testing-devrunner** |
180
+ | **Naite tracing / debugging** | **naite** |
181
+ | **Fixture data generation/management** | **fixture-cli** |
182
+ | **Test data generation tips** | **testing (Fixture data generation tips), fixture-cli (practical tips)** |
183
+ | DB schema changes | migration |
184
+ | **Auth setup (auth generate, Guards, Context)** | **auth** |
185
+ | PK type changes (better-auth, etc.) | auth-migration |
186
+ | **Adding auth plugins** | **auth-plugins** |
187
+ | Frontend development | frontend |
188
+ | Internationalization / translation | i18n |
189
+ | Scaffolding errors | scaffolding |
190
+ | **Vector search / embeddings** | **vector** |
191
+ | **pg_trgm Fuzzy Search** | **puri, entity-basic** |
192
+ | **AI Agent development** | **ai-agents** |
193
+ | **Background jobs / scheduling** | **tasks** |
194
+ | **Troubleshooting → skill contribution** | **skill-contribution** |
195
+ | **Framework bug / constraint response** | **framework-change** |
196
+
197
+ ## Skill Selection by CDD Claim Type
198
+
199
+ **For Planners:** Use this table to populate `required_skills` in each Claim blueprint.
200
+
201
+ ### `surface` — Entity / Schema / Shared Type Work
202
+
203
+ | Case | Required Skills |
204
+ | --------------------------- | ------------------------------------------------------------------------------ |
205
+ | Add new entity | `entity-basic`, `entity-relations`, `migration`, `cone`, `fixture-cli`, `i18n` |
206
+ | Define subset | `entity-basic`, `subset` |
207
+ | Add auth entity | `auth`, `auth-migration` |
208
+ | Add auth plugin | `auth-plugins` |
209
+ | Add batch save structure | `upsert` |
210
+ | Add vector search structure | `vector`, `entity-basic` |
211
+ | Resolve scaffolding errors | `scaffolding` |
212
+
213
+ ### `test` — Test Writing
214
+
215
+ | Case | Required Skills |
216
+ | ------------------------ | ------------------------------ |
217
+ | Business logic tests | `testing`, `testing-devrunner` |
218
+ | Tests requiring fixtures | `testing`, `fixture-cli` |
219
+ | Debugging / tracing | `naite` |
220
+
221
+ ### `implement` — Business Logic Implementation
222
+
223
+ | Case | Required Skills |
224
+ | ----------------------------- | ------------------------- |
225
+ | Model CRUD implementation | `model`, `puri` |
226
+ | API endpoint implementation | `api`, `model` |
227
+ | File upload implementation | `api`, `framework-change` |
228
+ | SQL query writing | `puri` |
229
+ | Internationalization | `i18n` |
230
+ | Auth guard / session handling | `auth` |
231
+ | Auth plugin implementation | `auth-plugins` |
232
+ | Batch save implementation | `upsert`, `model` |
233
+ | AI Agent implementation | `ai-agents` |
234
+ | Background job / scheduling | `tasks` |
235
+ | Vector search implementation | `vector`, `puri` |
236
+ | Frontend integration | `frontend`, `scaffolding` |
237
+
238
+ ---
189
239
 
190
240
  ## Command Execution Path
191
241
 
@@ -13,9 +13,9 @@ Sonamu provides a framework that wraps Vercel AI SDK's `ToolLoopAgent` to build
13
13
 
14
14
  ## Structure
15
15
 
16
- | File | Role |
17
- |------|------|
18
- | `agent.ts` | `BaseAgentClass`, `tools` decorator |
16
+ | File | Role |
17
+ | ---------- | ----------------------------------------------------------------------- |
18
+ | `agent.ts` | `BaseAgentClass`, `tools` decorator |
19
19
  | `types.ts` | `AgentConfig`, `ToolDecoratorOptions`, `RegisteredToolDefinition`, etc. |
20
20
 
21
21
  ---
@@ -30,7 +30,7 @@ import { z } from "zod/v4";
30
30
 
31
31
  class MyAgentClass extends BaseAgentClass<{ count: number }> {
32
32
  constructor() {
33
- super("MyAgent"); // agentName (used as logger category)
33
+ super("MyAgent"); // agentName (used as logger category)
34
34
  }
35
35
 
36
36
  @tools({
@@ -50,12 +50,12 @@ export const MyAgent = new MyAgentClass();
50
50
 
51
51
  ### Key Features
52
52
 
53
- | Feature | Description |
54
- |------|------|
55
- | `this.logger` | LogTape logger (agent category) |
56
- | `this.store` | AsyncLocalStorage-based state access |
57
- | `this.tools` | Registered toolset (ToolSet) |
58
- | `this.use()` | Run the Agent (ALS context + ToolLoopAgent) |
53
+ | Feature | Description |
54
+ | ------------- | ------------------------------------------- |
55
+ | `this.logger` | LogTape logger (agent category) |
56
+ | `this.store` | AsyncLocalStorage-based state access |
57
+ | `this.tools` | Registered toolset (ToolSet) |
58
+ | `this.use()` | Run the Agent (ALS context + ToolLoopAgent) |
59
59
 
60
60
  ---
61
61
 
@@ -105,7 +105,7 @@ const result = await MyAgent.use(
105
105
  {
106
106
  model: anthropic("claude-sonnet-4-5-20250514"),
107
107
  instructions: "You are a math assistant.",
108
- toolChoice: "auto", // "auto" | "none" | "required"
108
+ toolChoice: "auto", // "auto" | "none" | "required"
109
109
  maxOutputTokens: 1000,
110
110
  temperature: 0.7,
111
111
  },
@@ -122,21 +122,21 @@ const result = await MyAgent.use(
122
122
 
123
123
  ### AgentConfig Options
124
124
 
125
- | Option | Type | Description |
126
- |------|------|------|
127
- | `model` | `LanguageModel` | AI SDK model (required) |
128
- | `instructions` | `string` | System prompt |
129
- | `toolChoice` | `"auto" \| "none" \| "required"` | Tool selection strategy |
130
- | `stopWhen` | `StopCondition` | Stop condition |
131
- | `activeTools` | `string[]` | List of tool names to activate |
132
- | `maxOutputTokens` | `number` | Maximum output tokens |
133
- | `temperature` | `number` | Temperature |
134
- | `topP` / `topK` | `number` | Sampling parameters |
135
- | `presencePenalty` / `frequencyPenalty` | `number` | Penalties |
136
- | `seed` | `number` | Seed for reproducibility |
137
- | `stopSequences` | `string[]` | Generation stop sequences |
138
- | `providerOptions` | `ProviderOptions` | Additional provider-specific options |
139
- | `headers` | `Record<string, string>` | Custom HTTP headers |
125
+ | Option | Type | Description |
126
+ | -------------------------------------- | -------------------------------- | ------------------------------------ |
127
+ | `model` | `LanguageModel` | AI SDK model (required) |
128
+ | `instructions` | `string` | System prompt |
129
+ | `toolChoice` | `"auto" \| "none" \| "required"` | Tool selection strategy |
130
+ | `stopWhen` | `StopCondition` | Stop condition |
131
+ | `activeTools` | `string[]` | List of tool names to activate |
132
+ | `maxOutputTokens` | `number` | Maximum output tokens |
133
+ | `temperature` | `number` | Temperature |
134
+ | `topP` / `topK` | `number` | Sampling parameters |
135
+ | `presencePenalty` / `frequencyPenalty` | `number` | Penalties |
136
+ | `seed` | `number` | Seed for reproducibility |
137
+ | `stopSequences` | `string[]` | Generation stop sequences |
138
+ | `providerOptions` | `ProviderOptions` | Additional provider-specific options |
139
+ | `headers` | `Record<string, string>` | Custom HTTP headers |
140
140
 
141
141
  ---
142
142
 
@@ -182,6 +182,7 @@ class AgentB extends BaseAgentClass<void> {
182
182
  `this.logger` uses LogTape. The category is generated with `convertDomainToCategory(agentName, "agent")`.
183
183
 
184
184
  Debug logs are automatically recorded on tool execution:
185
+
185
186
  ```
186
187
  tools: {model}.{method} with args: {args}
187
188
  ```