@semacode/cli 2.2.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +251 -141
  3. package/dist/agentContext.d.ts +1 -1
  4. package/dist/agentContextPack.js +6 -1
  5. package/dist/agentContextTipos.d.ts +4 -2
  6. package/dist/agentContextTipos.js +7 -0
  7. package/dist/agentEntryPoints.js +551 -499
  8. package/dist/angular-consumer-standalone.d.ts +3 -1
  9. package/dist/angular-consumer-standalone.js +12 -8
  10. package/dist/comandos.js +4 -0
  11. package/dist/discovery/catalog.d.ts +11 -0
  12. package/dist/discovery/catalog.js +521 -0
  13. package/dist/discovery/command.d.ts +11 -0
  14. package/dist/discovery/command.js +226 -0
  15. package/dist/discovery/index.d.ts +5 -0
  16. package/dist/discovery/index.js +8 -0
  17. package/dist/discovery/ranker.d.ts +3 -0
  18. package/dist/discovery/ranker.js +310 -0
  19. package/dist/discovery/redaction.d.ts +2 -0
  20. package/dist/discovery/redaction.js +21 -0
  21. package/dist/discovery/render.d.ts +2 -0
  22. package/dist/discovery/render.js +100 -0
  23. package/dist/discovery/types.d.ts +119 -0
  24. package/dist/discovery/types.js +13 -0
  25. package/dist/drift.part01.d.ts +32 -2
  26. package/dist/drift.part01.js +2 -0
  27. package/dist/drift.part04.d.ts +3 -2
  28. package/dist/drift.part04.js +6 -3
  29. package/dist/drift.part05.d.ts +2 -1
  30. package/dist/drift.part05.js +4 -3
  31. package/dist/drift.part06.d.ts +2 -1
  32. package/dist/drift.part06.js +9 -5
  33. package/dist/drift.part07.d.ts +11 -10
  34. package/dist/drift.part07.js +40 -30
  35. package/dist/drift.part08.d.ts +2 -1
  36. package/dist/drift.part08.js +4 -3
  37. package/dist/drift.part11.js +71 -6
  38. package/dist/drift.part12.js +14 -1
  39. package/dist/drift.part13.d.ts +42 -7
  40. package/dist/drift.part13.js +660 -36
  41. package/dist/driftCache.d.ts +49 -0
  42. package/dist/driftCache.js +311 -0
  43. package/dist/driftCacheIncremental.d.ts +98 -0
  44. package/dist/driftCacheIncremental.js +596 -0
  45. package/dist/driftCatalogo.d.ts +91 -0
  46. package/dist/driftCatalogo.js +657 -0
  47. package/dist/driftCatalogoPersistente.d.ts +8 -0
  48. package/dist/driftCatalogoPersistente.js +77 -0
  49. package/dist/driftEscopo.d.ts +23 -0
  50. package/dist/driftEscopo.js +563 -0
  51. package/dist/driftEscopoReferencias.d.ts +4 -0
  52. package/dist/driftEscopoReferencias.js +265 -0
  53. package/dist/driftOrcamento.d.ts +12 -0
  54. package/dist/driftOrcamento.js +19 -3
  55. package/dist/execucoesExternas.js +5 -19
  56. package/dist/exemplosOficiais.js +29 -8
  57. package/dist/iaPrompts.d.ts +1 -1
  58. package/dist/iaPrompts.js +310 -307
  59. package/dist/index.d.ts +2 -0
  60. package/dist/index.js +23 -5
  61. package/dist/index.part01.d.ts +17 -2
  62. package/dist/index.part01.js +119 -8
  63. package/dist/index.part02.js +21 -21
  64. package/dist/index.part03.d.ts +2 -2
  65. package/dist/index.part03.js +14 -3
  66. package/dist/index.part04.d.ts +2 -2
  67. package/dist/index.part04.js +113 -101
  68. package/dist/index.part05.d.ts +1 -1
  69. package/dist/index.part05.js +99 -22
  70. package/dist/index.part06.js +6 -2
  71. package/dist/index.part07.js +24 -24
  72. package/dist/index.part08.js +1 -1
  73. package/dist/init/templates.part01.js +393 -393
  74. package/dist/init/templates.part02.js +189 -189
  75. package/dist/initTemplatesBackend.js +73 -73
  76. package/dist/initTemplatesBase.js +81 -80
  77. package/dist/initTemplatesFlutter.js +137 -137
  78. package/dist/initTemplatesRuntime.js +350 -350
  79. package/dist/initTemplatesWeb.js +309 -309
  80. package/dist/pipelineConteudo/command.js +1 -36
  81. package/dist/profileArtefatoValidadores.d.ts +3 -2
  82. package/dist/profileArtefatoValidadores.js +81 -0
  83. package/dist/profileAuthorTipos.d.ts +4 -3
  84. package/dist/profileCatalogo.d.ts +5 -5
  85. package/dist/profileCatalogo.js +30 -0
  86. package/dist/profileCommand.d.ts +8 -2
  87. package/dist/profileCommand.js +15 -5
  88. package/dist/profileRegras.d.ts +5 -5
  89. package/dist/profileRegras.js +13 -1
  90. package/dist/profileRulePacks.js +68 -0
  91. package/dist/projeto.d.ts +1 -1
  92. package/dist/projetoCarregar.d.ts +2 -2
  93. package/dist/projetoCarregar.js +47 -24
  94. package/dist/projetoCatalogo.d.ts +7 -0
  95. package/dist/projetoCatalogo.js +125 -0
  96. package/dist/projetoTipos.d.ts +14 -5
  97. package/dist/sistemasInterativos/adapterProtocol.d.ts +3 -0
  98. package/dist/sistemasInterativos/adapterProtocol.js +240 -0
  99. package/dist/sistemasInterativos/advancedCatalog.d.ts +5 -0
  100. package/dist/sistemasInterativos/advancedCatalog.js +442 -0
  101. package/dist/sistemasInterativos/autonomy.d.ts +230 -0
  102. package/dist/sistemasInterativos/autonomy.js +753 -0
  103. package/dist/sistemasInterativos/canonical.d.ts +3 -0
  104. package/dist/sistemasInterativos/canonical.js +43 -0
  105. package/dist/sistemasInterativos/catalog.d.ts +116 -0
  106. package/dist/sistemasInterativos/catalog.js +543 -0
  107. package/dist/sistemasInterativos/command.d.ts +7 -0
  108. package/dist/sistemasInterativos/command.js +311 -0
  109. package/dist/sistemasInterativos/controlRun.d.ts +56 -0
  110. package/dist/sistemasInterativos/controlRun.js +391 -0
  111. package/dist/sistemasInterativos/evidence.d.ts +5 -0
  112. package/dist/sistemasInterativos/evidence.js +306 -0
  113. package/dist/sistemasInterativos/experienceIr.d.ts +12 -0
  114. package/dist/sistemasInterativos/experienceIr.js +895 -0
  115. package/dist/sistemasInterativos/experienceIrSemantics.d.ts +30 -0
  116. package/dist/sistemasInterativos/experienceIrSemantics.js +368 -0
  117. package/dist/sistemasInterativos/experienceIrTypes.d.ts +370 -0
  118. package/dist/sistemasInterativos/experienceIrTypes.js +5 -0
  119. package/dist/sistemasInterativos/extensionCommand.d.ts +391 -0
  120. package/dist/sistemasInterativos/extensionCommand.js +383 -0
  121. package/dist/sistemasInterativos/index.d.ts +19 -0
  122. package/dist/sistemasInterativos/index.js +22 -0
  123. package/dist/sistemasInterativos/operations.d.ts +40 -0
  124. package/dist/sistemasInterativos/operations.js +1167 -0
  125. package/dist/sistemasInterativos/operationsTypes.d.ts +297 -0
  126. package/dist/sistemasInterativos/operationsTypes.js +11 -0
  127. package/dist/sistemasInterativos/planner.d.ts +2 -0
  128. package/dist/sistemasInterativos/planner.js +159 -0
  129. package/dist/sistemasInterativos/portability.d.ts +164 -0
  130. package/dist/sistemasInterativos/portability.js +539 -0
  131. package/dist/sistemasInterativos/render.d.ts +3 -0
  132. package/dist/sistemasInterativos/render.js +179 -0
  133. package/dist/sistemasInterativos/temporal.d.ts +183 -0
  134. package/dist/sistemasInterativos/temporal.js +543 -0
  135. package/dist/sistemasInterativos/types.d.ts +215 -0
  136. package/dist/sistemasInterativos/types.js +4 -0
  137. package/dist/sistemasInterativos/validator.d.ts +2 -0
  138. package/dist/sistemasInterativos/validator.js +305 -0
  139. package/dist/sync/index.js +35 -35
  140. package/docs/README.md +34 -28
  141. package/docs/ai-onboarding.md +62 -62
  142. package/docs/ai-workflow.md +9 -4
  143. package/docs/auth.md +26 -26
  144. package/docs/cli.md +79 -79
  145. package/docs/commands.md +47 -2
  146. package/docs/database.md +15 -15
  147. package/docs/deploy.md +41 -41
  148. package/docs/descoberta-capacidades.md +106 -0
  149. package/docs/documentation.md +39 -39
  150. package/docs/env.md +16 -16
  151. package/docs/frontend.md +41 -41
  152. package/docs/getting-started.md +57 -57
  153. package/docs/i18n.md +15 -15
  154. package/docs/pipeline-conteudo.md +246 -246
  155. package/docs/profiles.md +54 -45
  156. package/docs/repositories.md +43 -43
  157. package/docs/rollback.md +31 -31
  158. package/docs/security.md +32 -32
  159. package/docs/sistemas-interativos.md +376 -0
  160. package/docs/support.md +8 -8
  161. package/docs/testing.md +51 -35
  162. package/docs/vocabulary.md +29 -29
  163. package/exemplos/agendamento.sema +1 -1
  164. package/exemplos/assinatura.sema +1 -1
  165. package/exemplos/auditoria.sema +1 -1
  166. package/exemplos/autenticacao.sema +1 -1
  167. package/exemplos/author_obra_comum.sema +1 -1
  168. package/exemplos/author_tema_sensivel.sema +1 -1
  169. package/exemplos/automacao.sema +1 -1
  170. package/exemplos/cadastro_usuario.sema +1 -1
  171. package/exemplos/calculadora.sema +1 -1
  172. package/exemplos/crud_simples.sema +1 -1
  173. package/exemplos/estoque.sema +1 -1
  174. package/exemplos/exportacao.sema +1 -1
  175. package/exemplos/fila.sema +1 -1
  176. package/exemplos/integracao_externa.sema +1 -1
  177. package/exemplos/multi_tenant.sema +1 -1
  178. package/exemplos/notificacao.sema +1 -1
  179. package/exemplos/operacao_estrategia.sema +132 -132
  180. package/exemplos/operacao_estrategia_discovery.sema +220 -220
  181. package/exemplos/operacao_estrategia_fluxo.sema +114 -114
  182. package/exemplos/operacao_estrategia_gates.sema +106 -106
  183. package/exemplos/operacao_estrategia_quarentena.sema +133 -133
  184. package/exemplos/operacao_estrategia_rollout.sema +124 -124
  185. package/exemplos/pagamento.sema +1 -1
  186. package/exemplos/pagamento_dominio.sema +1 -1
  187. package/exemplos/pedido.sema +1 -1
  188. package/exemplos/permissao.sema +1 -1
  189. package/exemplos/persistencia_vendor_first.sema +1 -1
  190. package/exemplos/pipeline-conteudo/README.md +44 -44
  191. package/exemplos/pipeline-conteudo/alvos.json +23 -23
  192. package/exemplos/pipeline-conteudo/definicao.json +136 -136
  193. package/exemplos/profile_conversas.sema +165 -165
  194. package/exemplos/profile_game.sema +1 -1
  195. package/exemplos/profile_legal.sema +1 -1
  196. package/exemplos/profile_ops.sema +1 -1
  197. package/exemplos/profile_research.sema +1 -1
  198. package/exemplos/profile_simulation.sema +211 -0
  199. package/exemplos/profile_software.sema +1 -1
  200. package/exemplos/profile_workflow_n8n.sema +1 -1
  201. package/exemplos/relatorio.sema +1 -1
  202. package/exemplos/replica_analitica_erp.sema +1 -1
  203. package/exemplos/sistemas-interativos/README.md +100 -0
  204. package/exemplos/sistemas-interativos/advanced/acceptance-context-evaluate-valid.json +5 -0
  205. package/exemplos/sistemas-interativos/advanced/acceptance-lock-valid.json +16 -0
  206. package/exemplos/sistemas-interativos/advanced/asset-provenance-valid.json +32 -0
  207. package/exemplos/sistemas-interativos/advanced/autonomy-repair-valid.json +93 -0
  208. package/exemplos/sistemas-interativos/advanced/control-run-definition-valid.json +78 -0
  209. package/exemplos/sistemas-interativos/advanced/control-run-valid.json +27 -0
  210. package/exemplos/sistemas-interativos/advanced/distributed-workers-valid.json +79 -0
  211. package/exemplos/sistemas-interativos/advanced/editor-state-valid.json +42 -0
  212. package/exemplos/sistemas-interativos/advanced/engine-snapshot-after-valid.json +32 -0
  213. package/exemplos/sistemas-interativos/advanced/engine-snapshot-before-valid.json +23 -0
  214. package/exemplos/sistemas-interativos/advanced/job-orchestration-valid.json +39 -0
  215. package/exemplos/sistemas-interativos/advanced/multimodal-evidence-valid.json +46 -0
  216. package/exemplos/sistemas-interativos/advanced/multiplayer-authority-valid.json +39 -0
  217. package/exemplos/sistemas-interativos/advanced/playtest-fuzz-valid.json +37 -0
  218. package/exemplos/sistemas-interativos/advanced/portability-valid.json +104 -0
  219. package/exemplos/sistemas-interativos/advanced/temporal-evidence-valid.json +27 -0
  220. package/exemplos/sistemas-interativos/advanced/temporal-valid.json +118 -0
  221. package/exemplos/sistemas-interativos/experience-ir-valid.json +459 -0
  222. package/exemplos/sistemas-interativos/game-2d.json +83 -0
  223. package/exemplos/sistemas-interativos/game-3d-human.json +81 -0
  224. package/exemplos/sistemas-interativos/game-pixel-16-bit.json +97 -0
  225. package/exemplos/sistemas-interativos/game-pixel-8-bit.json +94 -0
  226. package/exemplos/sistemas-interativos/game-xr-human.json +80 -0
  227. package/exemplos/sistemas-interativos/hybrid-2-5d.json +108 -0
  228. package/exemplos/sistemas-interativos/protocol-mutating-rollback-valid.json +75 -0
  229. package/exemplos/sistemas-interativos/protocol-read-only-valid.json +58 -0
  230. package/exemplos/sistemas-interativos/simulation-2d-controlled.json +97 -0
  231. package/exemplos/sistemas-interativos/simulation-3d-calibrated-autonomous.json +141 -0
  232. package/exemplos/sistemas-interativos/simulation-headless-autonomous-batch.json +112 -0
  233. package/exemplos/sistemas-interativos/simulation-pixel-16-bit.json +103 -0
  234. package/exemplos/sistemas-interativos/simulation-text-controlled.json +95 -0
  235. package/exemplos/testes_embutidos.sema +1 -1
  236. package/exemplos/tratamento_erro.sema +1 -1
  237. package/exemplos/upload_arquivo.sema +1 -1
  238. package/exemplos/webhook.sema +1 -1
  239. package/node_modules/@sema/gerador-cpp/dist/index.js +176 -176
  240. package/node_modules/@sema/gerador-cpp/package.json +1 -1
  241. package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
  242. package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
  243. package/node_modules/@sema/gerador-dotnet/dist/index.js +169 -169
  244. package/node_modules/@sema/gerador-dotnet/package.json +1 -1
  245. package/node_modules/@sema/gerador-html/dist/index.js +17 -17
  246. package/node_modules/@sema/gerador-lua/dist/index.js +76 -47
  247. package/node_modules/@sema/gerador-lua/dist/index.js.map +1 -1
  248. package/node_modules/@sema/gerador-php/dist/index.js +113 -113
  249. package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
  250. package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
  251. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
  252. package/package.json +3 -3
@@ -8,126 +8,126 @@ export function arquivosInitTemplatesRuntime(template, arquivosBase) {
8
8
  arquivos = [
9
9
  {
10
10
  caminhoRelativo: "sema.config.json",
11
- conteudo: `{
12
- "origens": ["./contratos"],
13
- "saida": "./generated",
14
- "alvos": ["typescript"],
15
- "alvoPadrao": "typescript",
16
- "estruturaSaida": "modulos",
17
- "framework": "base",
18
- "modoEstrito": true,
19
- "diretoriosCodigo": ["./src"],
20
- "fontesLegado": ["firebase", "typescript"],
21
- "diretoriosSaidaPorAlvo": {
22
- "typescript": "./generated/typescript"
23
- },
24
- "convencoesGeracaoPorProjeto": "base"
25
- }
11
+ conteudo: `{
12
+ "origens": ["./contratos"],
13
+ "saida": "./generated",
14
+ "alvos": ["typescript"],
15
+ "alvoPadrao": "typescript",
16
+ "estruturaSaida": "modulos",
17
+ "framework": "base",
18
+ "modoEstrito": true,
19
+ "diretoriosCodigo": ["./src"],
20
+ "fontesLegado": ["firebase", "typescript"],
21
+ "diretoriosSaidaPorAlvo": {
22
+ "typescript": "./generated/typescript"
23
+ },
24
+ "convencoesGeracaoPorProjeto": "base"
25
+ }
26
26
  `,
27
27
  },
28
28
  {
29
29
  caminhoRelativo: "contratos/worker_runtime.sema",
30
- conteudo: `module worker.runtime {
31
- task publicar_payload_health {
32
- output {
33
- status: Texto
34
- timestamp: Texto
35
- }
36
- effects {
37
- evento payload_health criticidade = alta
38
- }
39
- impl {
40
- ts: src.sema_contract_bridge.semaWorkerHealthPayload
41
- }
42
- guarantees {
43
- status existe
44
- timestamp existe
45
- }
46
- }
47
-
48
- task inventariar_colecoes {
49
- output {
50
- collections: Json
51
- }
52
- effects {
53
- consulta runtime criticidade = baixa
54
- }
55
- impl {
56
- ts: src.sema_contract_bridge.semaCollectionNames
57
- }
58
- guarantees {
59
- collections existe
60
- }
61
- }
62
-
63
- route get_health_worker {
64
- metodo: GET
65
- caminho: /health
66
- task: publicar_payload_health
67
- }
68
- }
30
+ conteudo: `module worker.runtime {
31
+ task publicar_payload_health {
32
+ output {
33
+ status: Texto
34
+ timestamp: Texto
35
+ }
36
+ effects {
37
+ evento payload_health criticidade = alta
38
+ }
39
+ impl {
40
+ ts: src.sema_contract_bridge.semaWorkerHealthPayload
41
+ }
42
+ guarantees {
43
+ status existe
44
+ timestamp existe
45
+ }
46
+ }
47
+
48
+ task inventariar_colecoes {
49
+ output {
50
+ collections: Json
51
+ }
52
+ effects {
53
+ consulta runtime criticidade = baixa
54
+ }
55
+ impl {
56
+ ts: src.sema_contract_bridge.semaCollectionNames
57
+ }
58
+ guarantees {
59
+ collections existe
60
+ }
61
+ }
62
+
63
+ route get_health_worker {
64
+ metodo: GET
65
+ caminho: /health
66
+ task: publicar_payload_health
67
+ }
68
+ }
69
69
  `,
70
70
  },
71
71
  {
72
72
  caminhoRelativo: "src/config/collections.ts",
73
- conteudo: `export const COLLECTIONS = {
74
- worker_status: "worker_status",
75
- audit_log: "audit_log",
76
- } as const;
73
+ conteudo: `export const COLLECTIONS = {
74
+ worker_status: "worker_status",
75
+ audit_log: "audit_log",
76
+ } as const;
77
77
  `,
78
78
  },
79
79
  {
80
80
  caminhoRelativo: "src/services/health-check.ts",
81
- conteudo: `import http from "node:http";
82
-
83
- export type HealthStatus = {
84
- status: "healthy" | "degraded" | "unhealthy" | "initializing";
85
- timestamp: string;
86
- };
87
-
88
- export type HealthProvider = () => HealthStatus;
89
-
90
- export function startHealthCheckServer(port: number, provider: HealthProvider) {
91
- const server = http.createServer((req, res) => {
92
- if (req.url === "/health" && req.method === "GET") {
93
- res.writeHead(200, { "Content-Type": "application/json" });
94
- res.end(JSON.stringify(provider()));
95
- return;
96
- }
97
- res.writeHead(404);
98
- res.end();
99
- });
100
-
101
- server.listen(port);
102
- return server;
103
- }
81
+ conteudo: `import http from "node:http";
82
+
83
+ export type HealthStatus = {
84
+ status: "healthy" | "degraded" | "unhealthy" | "initializing";
85
+ timestamp: string;
86
+ };
87
+
88
+ export type HealthProvider = () => HealthStatus;
89
+
90
+ export function startHealthCheckServer(port: number, provider: HealthProvider) {
91
+ const server = http.createServer((req, res) => {
92
+ if (req.url === "/health" && req.method === "GET") {
93
+ res.writeHead(200, { "Content-Type": "application/json" });
94
+ res.end(JSON.stringify(provider()));
95
+ return;
96
+ }
97
+ res.writeHead(404);
98
+ res.end();
99
+ });
100
+
101
+ server.listen(port);
102
+ return server;
103
+ }
104
104
  `,
105
105
  },
106
106
  {
107
107
  caminhoRelativo: "src/sema_contract_bridge.ts",
108
- conteudo: `import { COLLECTIONS } from "./config/collections";
109
- import { startHealthCheckServer, type HealthProvider, type HealthStatus } from "./services/health-check";
110
-
111
- export function semaStartWorkerHealthServer(port: number, provider: HealthProvider) {
112
- return startHealthCheckServer(port, provider);
113
- }
114
-
115
- export function semaWorkerHealthPayload(payload: HealthStatus): HealthStatus {
116
- return payload;
117
- }
118
-
119
- export function semaCollectionNames() {
120
- return COLLECTIONS;
121
- }
108
+ conteudo: `import { COLLECTIONS } from "./config/collections";
109
+ import { startHealthCheckServer, type HealthProvider, type HealthStatus } from "./services/health-check";
110
+
111
+ export function semaStartWorkerHealthServer(port: number, provider: HealthProvider) {
112
+ return startHealthCheckServer(port, provider);
113
+ }
114
+
115
+ export function semaWorkerHealthPayload(payload: HealthStatus): HealthStatus {
116
+ return payload;
117
+ }
118
+
119
+ export function semaCollectionNames() {
120
+ return COLLECTIONS;
121
+ }
122
122
  `,
123
123
  },
124
124
  {
125
125
  caminhoRelativo: "README.md",
126
- conteudo: `# Starter Node Firebase Worker + Sema
127
-
128
- - Contratos em \`contratos/\`
129
- - Worker e bridges em \`src/\`
130
- - \`drift\` valida impl, endpoint de health e recursos Firestore declarados
126
+ conteudo: `# Starter Node Firebase Worker + Sema
127
+
128
+ - Contratos em \`contratos/\`
129
+ - Worker e bridges em \`src/\`
130
+ - \`drift\` valida impl, endpoint de health e recursos Firestore declarados
131
131
  `,
132
132
  },
133
133
  ];
@@ -136,71 +136,71 @@ export function arquivosInitTemplatesRuntime(template, arquivosBase) {
136
136
  arquivos = [
137
137
  {
138
138
  caminhoRelativo: "sema.config.json",
139
- conteudo: `{
140
- "origens": ["./contratos"],
141
- "saida": "./generated",
142
- "alvos": ["typescript"],
143
- "alvoPadrao": "typescript",
144
- "estruturaSaida": "modulos",
145
- "framework": "base",
146
- "modoEstrito": true,
147
- "diretoriosCodigo": ["./src"],
148
- "fontesLegado": ["dotnet"],
149
- "diretoriosSaidaPorAlvo": {
150
- "typescript": "./generated/typescript"
151
- },
152
- "convencoesGeracaoPorProjeto": "base"
153
- }
139
+ conteudo: `{
140
+ "origens": ["./contratos"],
141
+ "saida": "./generated",
142
+ "alvos": ["typescript"],
143
+ "alvoPadrao": "typescript",
144
+ "estruturaSaida": "modulos",
145
+ "framework": "base",
146
+ "modoEstrito": true,
147
+ "diretoriosCodigo": ["./src"],
148
+ "fontesLegado": ["dotnet"],
149
+ "diretoriosSaidaPorAlvo": {
150
+ "typescript": "./generated/typescript"
151
+ },
152
+ "convencoesGeracaoPorProjeto": "base"
153
+ }
154
154
  `,
155
155
  },
156
156
  {
157
157
  caminhoRelativo: "contratos/health.sema",
158
- conteudo: `module app.health {
159
- task get_health {
160
- output {
161
- status: Texto
162
- runtime: Texto
163
- }
164
- impl {
165
- cs: src.Controllers.HealthController.Get
166
- }
167
- guarantees {
168
- status existe
169
- runtime existe
170
- }
171
- }
172
-
173
- route get_health_publico {
174
- metodo: GET
175
- caminho: /api/health
176
- task: get_health
177
- }
178
- }
158
+ conteudo: `module app.health {
159
+ task get_health {
160
+ output {
161
+ status: Texto
162
+ runtime: Texto
163
+ }
164
+ impl {
165
+ cs: src.Controllers.HealthController.Get
166
+ }
167
+ guarantees {
168
+ status existe
169
+ runtime existe
170
+ }
171
+ }
172
+
173
+ route get_health_publico {
174
+ metodo: GET
175
+ caminho: /api/health
176
+ task: get_health
177
+ }
178
+ }
179
179
  `,
180
180
  },
181
181
  {
182
182
  caminhoRelativo: "src/Controllers/HealthController.cs",
183
- conteudo: `using Microsoft.AspNetCore.Mvc;
184
-
185
- [ApiController]
186
- [Route("api/health")]
187
- public class HealthController : ControllerBase
188
- {
189
- [HttpGet]
190
- public object Get()
191
- {
192
- return new { status = "ok", runtime = "aspnet" };
193
- }
194
- }
183
+ conteudo: `using Microsoft.AspNetCore.Mvc;
184
+
185
+ [ApiController]
186
+ [Route("api/health")]
187
+ public class HealthController : ControllerBase
188
+ {
189
+ [HttpGet]
190
+ public object Get()
191
+ {
192
+ return new { status = "ok", runtime = "aspnet" };
193
+ }
194
+ }
195
195
  `,
196
196
  },
197
197
  {
198
198
  caminhoRelativo: "README.md",
199
- conteudo: `# Starter ASP.NET Core API + Sema
200
-
201
- - Contratos em \`contratos/\`
202
- - Controllers/Minimal API em \`src/\`
203
- - \`drift\` valida impl e rota publica
199
+ conteudo: `# Starter ASP.NET Core API + Sema
200
+
201
+ - Contratos em \`contratos/\`
202
+ - Controllers/Minimal API em \`src/\`
203
+ - \`drift\` valida impl e rota publica
204
204
  `,
205
205
  },
206
206
  ];
@@ -209,74 +209,74 @@ export function arquivosInitTemplatesRuntime(template, arquivosBase) {
209
209
  arquivos = [
210
210
  {
211
211
  caminhoRelativo: "sema.config.json",
212
- conteudo: `{
213
- "origens": ["./contratos"],
214
- "saida": "./generated",
215
- "alvos": ["typescript"],
216
- "alvoPadrao": "typescript",
217
- "estruturaSaida": "modulos",
218
- "framework": "base",
219
- "modoEstrito": true,
220
- "diretoriosCodigo": ["./src"],
221
- "fontesLegado": ["java"],
222
- "diretoriosSaidaPorAlvo": {
223
- "typescript": "./generated/typescript"
224
- },
225
- "convencoesGeracaoPorProjeto": "base"
226
- }
212
+ conteudo: `{
213
+ "origens": ["./contratos"],
214
+ "saida": "./generated",
215
+ "alvos": ["typescript"],
216
+ "alvoPadrao": "typescript",
217
+ "estruturaSaida": "modulos",
218
+ "framework": "base",
219
+ "modoEstrito": true,
220
+ "diretoriosCodigo": ["./src"],
221
+ "fontesLegado": ["java"],
222
+ "diretoriosSaidaPorAlvo": {
223
+ "typescript": "./generated/typescript"
224
+ },
225
+ "convencoesGeracaoPorProjeto": "base"
226
+ }
227
227
  `,
228
228
  },
229
229
  {
230
230
  caminhoRelativo: "contratos/health.sema",
231
- conteudo: `module app.health {
232
- task get_health {
233
- output {
234
- status: Texto
235
- runtime: Texto
236
- }
237
- impl {
238
- java: src.main.java.com.acme.health.HealthController.health
239
- }
240
- guarantees {
241
- status existe
242
- runtime existe
243
- }
244
- }
245
-
246
- route get_health_publico {
247
- metodo: GET
248
- caminho: /api/health
249
- task: get_health
250
- }
251
- }
231
+ conteudo: `module app.health {
232
+ task get_health {
233
+ output {
234
+ status: Texto
235
+ runtime: Texto
236
+ }
237
+ impl {
238
+ java: src.main.java.com.acme.health.HealthController.health
239
+ }
240
+ guarantees {
241
+ status existe
242
+ runtime existe
243
+ }
244
+ }
245
+
246
+ route get_health_publico {
247
+ metodo: GET
248
+ caminho: /api/health
249
+ task: get_health
250
+ }
251
+ }
252
252
  `,
253
253
  },
254
254
  {
255
255
  caminhoRelativo: "src/main/java/com/acme/health/HealthController.java",
256
- conteudo: `package com.acme.health;
257
-
258
- import java.util.Map;
259
- import org.springframework.web.bind.annotation.GetMapping;
260
- import org.springframework.web.bind.annotation.RequestMapping;
261
- import org.springframework.web.bind.annotation.RestController;
262
-
263
- @RestController
264
- @RequestMapping("/api/health")
265
- public class HealthController {
266
- @GetMapping
267
- public Map<String, String> health() {
268
- return Map.of("status", "ok", "runtime", "spring");
269
- }
270
- }
256
+ conteudo: `package com.acme.health;
257
+
258
+ import java.util.Map;
259
+ import org.springframework.web.bind.annotation.GetMapping;
260
+ import org.springframework.web.bind.annotation.RequestMapping;
261
+ import org.springframework.web.bind.annotation.RestController;
262
+
263
+ @RestController
264
+ @RequestMapping("/api/health")
265
+ public class HealthController {
266
+ @GetMapping
267
+ public Map<String, String> health() {
268
+ return Map.of("status", "ok", "runtime", "spring");
269
+ }
270
+ }
271
271
  `,
272
272
  },
273
273
  {
274
274
  caminhoRelativo: "README.md",
275
- conteudo: `# Starter Spring Boot API + Sema
276
-
277
- - Contratos em \`contratos/\`
278
- - Controllers REST em \`src/main/java/\`
279
- - \`drift\` valida impl e rota publica
275
+ conteudo: `# Starter Spring Boot API + Sema
276
+
277
+ - Contratos em \`contratos/\`
278
+ - Controllers REST em \`src/main/java/\`
279
+ - \`drift\` valida impl e rota publica
280
280
  `,
281
281
  },
282
282
  ];
@@ -285,68 +285,68 @@ export function arquivosInitTemplatesRuntime(template, arquivosBase) {
285
285
  arquivos = [
286
286
  {
287
287
  caminhoRelativo: "sema.config.json",
288
- conteudo: `{
289
- "origens": ["./contratos"],
290
- "saida": "./generated",
291
- "alvos": ["typescript"],
292
- "alvoPadrao": "typescript",
293
- "estruturaSaida": "modulos",
294
- "framework": "base",
295
- "modoEstrito": true,
296
- "diretoriosCodigo": ["./internal"],
297
- "fontesLegado": ["go"],
298
- "diretoriosSaidaPorAlvo": {
299
- "typescript": "./generated/typescript"
300
- },
301
- "convencoesGeracaoPorProjeto": "base"
302
- }
288
+ conteudo: `{
289
+ "origens": ["./contratos"],
290
+ "saida": "./generated",
291
+ "alvos": ["typescript"],
292
+ "alvoPadrao": "typescript",
293
+ "estruturaSaida": "modulos",
294
+ "framework": "base",
295
+ "modoEstrito": true,
296
+ "diretoriosCodigo": ["./internal"],
297
+ "fontesLegado": ["go"],
298
+ "diretoriosSaidaPorAlvo": {
299
+ "typescript": "./generated/typescript"
300
+ },
301
+ "convencoesGeracaoPorProjeto": "base"
302
+ }
303
303
  `,
304
304
  },
305
305
  {
306
306
  caminhoRelativo: "contratos/health.sema",
307
- conteudo: `module app.health {
308
- task get_health {
309
- output {
310
- resultado: Json
311
- }
312
- impl {
313
- go: internal.health.getHealth
314
- }
315
- guarantees {
316
- resultado existe
317
- }
318
- }
319
-
320
- route get_health_publico {
321
- metodo: GET
322
- caminho: /health
323
- task: get_health
324
- }
325
- }
307
+ conteudo: `module app.health {
308
+ task get_health {
309
+ output {
310
+ resultado: Json
311
+ }
312
+ impl {
313
+ go: internal.health.getHealth
314
+ }
315
+ guarantees {
316
+ resultado existe
317
+ }
318
+ }
319
+
320
+ route get_health_publico {
321
+ metodo: GET
322
+ caminho: /health
323
+ task: get_health
324
+ }
325
+ }
326
326
  `,
327
327
  },
328
328
  {
329
329
  caminhoRelativo: "internal/health.go",
330
- conteudo: `package internal
331
-
332
- import "github.com/gin-gonic/gin"
333
-
334
- func registerRoutes(router *gin.Engine) {
335
- router.GET("/health", getHealth)
336
- }
337
-
338
- func getHealth(ctx *gin.Context) {
339
- ctx.JSON(200, gin.H{"status": "ok", "runtime": "go"})
340
- }
330
+ conteudo: `package internal
331
+
332
+ import "github.com/gin-gonic/gin"
333
+
334
+ func registerRoutes(router *gin.Engine) {
335
+ router.GET("/health", getHealth)
336
+ }
337
+
338
+ func getHealth(ctx *gin.Context) {
339
+ ctx.JSON(200, gin.H{"status": "ok", "runtime": "go"})
340
+ }
341
341
  `,
342
342
  },
343
343
  {
344
344
  caminhoRelativo: "README.md",
345
- conteudo: `# Starter Go HTTP API + Sema
346
-
347
- - Contratos em \`contratos/\`
348
- - Handlers em \`internal/\`
349
- - \`drift\` valida impl e rota publica
345
+ conteudo: `# Starter Go HTTP API + Sema
346
+
347
+ - Contratos em \`contratos/\`
348
+ - Handlers em \`internal/\`
349
+ - \`drift\` valida impl e rota publica
350
350
  `,
351
351
  },
352
352
  ];
@@ -355,71 +355,71 @@ export function arquivosInitTemplatesRuntime(template, arquivosBase) {
355
355
  arquivos = [
356
356
  {
357
357
  caminhoRelativo: "sema.config.json",
358
- conteudo: `{
359
- "origens": ["./contratos"],
360
- "saida": "./generated",
361
- "alvos": ["typescript"],
362
- "alvoPadrao": "typescript",
363
- "estruturaSaida": "modulos",
364
- "framework": "base",
365
- "modoEstrito": true,
366
- "diretoriosCodigo": ["./src"],
367
- "fontesLegado": ["rust"],
368
- "diretoriosSaidaPorAlvo": {
369
- "typescript": "./generated/typescript"
370
- },
371
- "convencoesGeracaoPorProjeto": "base"
372
- }
358
+ conteudo: `{
359
+ "origens": ["./contratos"],
360
+ "saida": "./generated",
361
+ "alvos": ["typescript"],
362
+ "alvoPadrao": "typescript",
363
+ "estruturaSaida": "modulos",
364
+ "framework": "base",
365
+ "modoEstrito": true,
366
+ "diretoriosCodigo": ["./src"],
367
+ "fontesLegado": ["rust"],
368
+ "diretoriosSaidaPorAlvo": {
369
+ "typescript": "./generated/typescript"
370
+ },
371
+ "convencoesGeracaoPorProjeto": "base"
372
+ }
373
373
  `,
374
374
  },
375
375
  {
376
376
  caminhoRelativo: "contratos/health.sema",
377
- conteudo: `module app.health {
378
- task get_health {
379
- output {
380
- resultado: Json
381
- }
382
- impl {
383
- rust: src.handlers.health
384
- }
385
- guarantees {
386
- resultado existe
387
- }
388
- }
389
-
390
- route get_health_publico {
391
- metodo: GET
392
- caminho: /health
393
- task: get_health
394
- }
395
- }
377
+ conteudo: `module app.health {
378
+ task get_health {
379
+ output {
380
+ resultado: Json
381
+ }
382
+ impl {
383
+ rust: src.handlers.health
384
+ }
385
+ guarantees {
386
+ resultado existe
387
+ }
388
+ }
389
+
390
+ route get_health_publico {
391
+ metodo: GET
392
+ caminho: /health
393
+ task: get_health
394
+ }
395
+ }
396
396
  `,
397
397
  },
398
398
  {
399
399
  caminhoRelativo: "src/main.rs",
400
- conteudo: `use axum::{routing::get, Router};
401
-
402
- mod handlers;
403
-
404
- fn app() -> Router {
405
- Router::new().route("/health", get(handlers::health))
406
- }
400
+ conteudo: `use axum::{routing::get, Router};
401
+
402
+ mod handlers;
403
+
404
+ fn app() -> Router {
405
+ Router::new().route("/health", get(handlers::health))
406
+ }
407
407
  `,
408
408
  },
409
409
  {
410
410
  caminhoRelativo: "src/handlers.rs",
411
- conteudo: `pub async fn health() -> &'static str {
412
- "ok"
413
- }
411
+ conteudo: `pub async fn health() -> &'static str {
412
+ "ok"
413
+ }
414
414
  `,
415
415
  },
416
416
  {
417
417
  caminhoRelativo: "README.md",
418
- conteudo: `# Starter Rust Axum API + Sema
419
-
420
- - Contratos em \`contratos/\`
421
- - Handlers em \`src/\`
422
- - \`drift\` valida impl e rota publica
418
+ conteudo: `# Starter Rust Axum API + Sema
419
+
420
+ - Contratos em \`contratos/\`
421
+ - Handlers em \`src/\`
422
+ - \`drift\` valida impl e rota publica
423
423
  `,
424
424
  },
425
425
  ];
@@ -428,60 +428,60 @@ export function arquivosInitTemplatesRuntime(template, arquivosBase) {
428
428
  arquivos = [
429
429
  {
430
430
  caminhoRelativo: "sema.config.json",
431
- conteudo: `{
432
- "origens": ["./contratos"],
433
- "saida": "./generated",
434
- "alvos": ["typescript"],
435
- "alvoPadrao": "typescript",
436
- "estruturaSaida": "modulos",
437
- "framework": "base",
438
- "modoEstrito": true,
439
- "diretoriosCodigo": ["./src"],
440
- "fontesLegado": ["cpp"],
441
- "diretoriosSaidaPorAlvo": {
442
- "typescript": "./generated/typescript"
443
- },
444
- "convencoesGeracaoPorProjeto": "base"
445
- }
431
+ conteudo: `{
432
+ "origens": ["./contratos"],
433
+ "saida": "./generated",
434
+ "alvos": ["typescript"],
435
+ "alvoPadrao": "typescript",
436
+ "estruturaSaida": "modulos",
437
+ "framework": "base",
438
+ "modoEstrito": true,
439
+ "diretoriosCodigo": ["./src"],
440
+ "fontesLegado": ["cpp"],
441
+ "diretoriosSaidaPorAlvo": {
442
+ "typescript": "./generated/typescript"
443
+ },
444
+ "convencoesGeracaoPorProjeto": "base"
445
+ }
446
446
  `,
447
447
  },
448
448
  {
449
449
  caminhoRelativo: "contratos/runtime_bridge.sema",
450
- conteudo: `module app.runtime_bridge {
451
- task processar_snapshot {
452
- input {
453
- payload: Json required
454
- }
455
- output {
456
- resultado: Json
457
- }
458
- impl {
459
- cpp: src.runtime.RuntimeBridge.processSnapshot
460
- }
461
- guarantees {
462
- resultado existe
463
- }
464
- }
465
- }
450
+ conteudo: `module app.runtime_bridge {
451
+ task processar_snapshot {
452
+ input {
453
+ payload: Json required
454
+ }
455
+ output {
456
+ resultado: Json
457
+ }
458
+ impl {
459
+ cpp: src.runtime.RuntimeBridge.processSnapshot
460
+ }
461
+ guarantees {
462
+ resultado existe
463
+ }
464
+ }
465
+ }
466
466
  `,
467
467
  },
468
468
  {
469
469
  caminhoRelativo: "src/runtime.cpp",
470
- conteudo: `class RuntimeBridge {
471
- public:
472
- int processSnapshot(int payload) {
473
- return payload;
474
- }
475
- };
470
+ conteudo: `class RuntimeBridge {
471
+ public:
472
+ int processSnapshot(int payload) {
473
+ return payload;
474
+ }
475
+ };
476
476
  `,
477
477
  },
478
478
  {
479
479
  caminhoRelativo: "README.md",
480
- conteudo: `# Starter C++ Service Bridge + Sema
481
-
482
- - Contratos em \`contratos/\`
483
- - Symbols e bridges em \`src/\`
484
- - \`drift\` valida impl de simbolos, sem prometer rota HTTP
480
+ conteudo: `# Starter C++ Service Bridge + Sema
481
+
482
+ - Contratos em \`contratos/\`
483
+ - Symbols e bridges em \`src/\`
484
+ - \`drift\` valida impl de simbolos, sem prometer rota HTTP
485
485
  `,
486
486
  },
487
487
  ];