@semacode/cli 2.0.1 → 2.2.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 (134) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +141 -121
  3. package/dist/agentEntryPoints.js +499 -499
  4. package/dist/comandos.js +2 -0
  5. package/dist/doctorCommand.js +28 -0
  6. package/dist/execucoesExternas.js +19 -5
  7. package/dist/geracaoCore.js +97 -1
  8. package/dist/iaPrompts.d.ts +1 -1
  9. package/dist/iaPrompts.js +307 -307
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.js +1 -0
  12. package/dist/index.part01.d.ts +1 -1
  13. package/dist/index.part01.js +14 -4
  14. package/dist/index.part02.js +21 -21
  15. package/dist/index.part04.js +96 -96
  16. package/dist/index.part06.js +1 -1
  17. package/dist/index.part07.js +35 -24
  18. package/dist/init/templates.part01.js +393 -393
  19. package/dist/init/templates.part02.js +189 -189
  20. package/dist/initTemplatesBackend.js +73 -73
  21. package/dist/initTemplatesBase.js +81 -81
  22. package/dist/initTemplatesFlutter.js +137 -137
  23. package/dist/initTemplatesRuntime.js +350 -350
  24. package/dist/initTemplatesWeb.js +309 -309
  25. package/dist/nativeToolchains.d.ts +15 -0
  26. package/dist/nativeToolchains.js +132 -0
  27. package/dist/pipelineConteudo/adapters.d.ts +84 -0
  28. package/dist/pipelineConteudo/adapters.js +449 -0
  29. package/dist/pipelineConteudo/canonical.d.ts +18 -0
  30. package/dist/pipelineConteudo/canonical.js +107 -0
  31. package/dist/pipelineConteudo/command.d.ts +3 -0
  32. package/dist/pipelineConteudo/command.js +572 -0
  33. package/dist/pipelineConteudo/index.d.ts +9 -0
  34. package/dist/pipelineConteudo/index.js +12 -0
  35. package/dist/pipelineConteudo/ledger.d.ts +68 -0
  36. package/dist/pipelineConteudo/ledger.js +732 -0
  37. package/dist/pipelineConteudo/planner.d.ts +12 -0
  38. package/dist/pipelineConteudo/planner.js +366 -0
  39. package/dist/pipelineConteudo/projection.d.ts +16 -0
  40. package/dist/pipelineConteudo/projection.js +57 -0
  41. package/dist/pipelineConteudo/state.d.ts +23 -0
  42. package/dist/pipelineConteudo/state.js +615 -0
  43. package/dist/pipelineConteudo/trust.d.ts +17 -0
  44. package/dist/pipelineConteudo/trust.js +750 -0
  45. package/dist/pipelineConteudo/types.d.ts +331 -0
  46. package/dist/pipelineConteudo/types.js +4 -0
  47. package/dist/projetoConfig.js +7 -1
  48. package/dist/projetoResolucao.js +21 -6
  49. package/dist/sync/index.js +35 -35
  50. package/docs/README.md +28 -25
  51. package/docs/ai-onboarding.md +62 -62
  52. package/docs/ai-workflow.md +1 -1
  53. package/docs/auth.md +26 -26
  54. package/docs/cli.md +79 -72
  55. package/docs/commands.md +1 -1
  56. package/docs/database.md +15 -15
  57. package/docs/deploy.md +41 -36
  58. package/docs/documentation.md +39 -39
  59. package/docs/env.md +16 -16
  60. package/docs/frontend.md +41 -41
  61. package/docs/getting-started.md +57 -57
  62. package/docs/i18n.md +15 -15
  63. package/docs/pipeline-conteudo.md +246 -0
  64. package/docs/profiles.md +45 -43
  65. package/docs/repositories.md +43 -43
  66. package/docs/rollback.md +31 -31
  67. package/docs/security.md +32 -32
  68. package/docs/support.md +8 -8
  69. package/docs/syntax.md +1 -1
  70. package/docs/testing.md +35 -28
  71. package/docs/vocabulary.md +29 -29
  72. package/exemplos/agendamento.sema +1 -1
  73. package/exemplos/assinatura.sema +1 -1
  74. package/exemplos/auditoria.sema +1 -1
  75. package/exemplos/autenticacao.sema +1 -1
  76. package/exemplos/author_obra_comum.sema +1 -1
  77. package/exemplos/author_tema_sensivel.sema +1 -1
  78. package/exemplos/automacao.sema +1 -1
  79. package/exemplos/cadastro_usuario.sema +1 -1
  80. package/exemplos/calculadora.sema +1 -1
  81. package/exemplos/crud_simples.sema +1 -1
  82. package/exemplos/estoque.sema +1 -1
  83. package/exemplos/exportacao.sema +1 -1
  84. package/exemplos/fila.sema +1 -1
  85. package/exemplos/integracao_externa.sema +1 -1
  86. package/exemplos/multi_tenant.sema +1 -1
  87. package/exemplos/notificacao.sema +1 -1
  88. package/exemplos/operacao_estrategia.sema +132 -132
  89. package/exemplos/operacao_estrategia_discovery.sema +220 -220
  90. package/exemplos/operacao_estrategia_fluxo.sema +114 -114
  91. package/exemplos/operacao_estrategia_gates.sema +106 -106
  92. package/exemplos/operacao_estrategia_quarentena.sema +133 -133
  93. package/exemplos/operacao_estrategia_rollout.sema +124 -124
  94. package/exemplos/pagamento.sema +1 -1
  95. package/exemplos/pagamento_dominio.sema +1 -1
  96. package/exemplos/pedido.sema +1 -1
  97. package/exemplos/permissao.sema +1 -1
  98. package/exemplos/persistencia_vendor_first.sema +1 -1
  99. package/exemplos/pipeline-conteudo/README.md +44 -0
  100. package/exemplos/pipeline-conteudo/alvos.json +23 -0
  101. package/exemplos/pipeline-conteudo/definicao.json +136 -0
  102. package/exemplos/profile_conversas.sema +165 -165
  103. package/exemplos/profile_game.sema +1 -1
  104. package/exemplos/profile_legal.sema +1 -1
  105. package/exemplos/profile_ops.sema +1 -1
  106. package/exemplos/profile_research.sema +1 -1
  107. package/exemplos/profile_software.sema +1 -1
  108. package/exemplos/profile_workflow_n8n.sema +1 -1
  109. package/exemplos/relatorio.sema +1 -1
  110. package/exemplos/replica_analitica_erp.sema +1 -1
  111. package/exemplos/testes_embutidos.sema +1 -1
  112. package/exemplos/tratamento_erro.sema +1 -1
  113. package/exemplos/upload_arquivo.sema +1 -1
  114. package/exemplos/webhook.sema +1 -1
  115. package/node_modules/@sema/gerador-cpp/dist/index.d.ts +3 -0
  116. package/node_modules/@sema/gerador-cpp/dist/index.js +859 -0
  117. package/node_modules/@sema/gerador-cpp/dist/index.js.map +1 -0
  118. package/node_modules/@sema/gerador-cpp/package.json +7 -0
  119. package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
  120. package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
  121. package/node_modules/@sema/gerador-dotnet/dist/index.d.ts +3 -0
  122. package/node_modules/@sema/gerador-dotnet/dist/index.js +828 -0
  123. package/node_modules/@sema/gerador-dotnet/dist/index.js.map +1 -0
  124. package/node_modules/@sema/gerador-dotnet/package.json +7 -0
  125. package/node_modules/@sema/gerador-html/dist/index.js +17 -17
  126. package/node_modules/@sema/gerador-lua/dist/index.js +53 -8
  127. package/node_modules/@sema/gerador-lua/dist/index.js.map +1 -1
  128. package/node_modules/@sema/gerador-php/dist/index.js +121 -113
  129. package/node_modules/@sema/gerador-php/dist/index.js.map +1 -1
  130. package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
  131. package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
  132. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
  133. package/node_modules/@sema/padroes/dist/index.d.ts +1 -1
  134. package/package.json +12 -1
package/docs/testing.md CHANGED
@@ -1,28 +1,35 @@
1
- # Testing
2
-
3
- Public Sema tests should run locally.
4
-
5
- Recommended checks:
6
-
7
- ```bash
8
- npm run build
9
- npm run status:check
10
- npm run repo:verificar-publico
11
- npm run plugin:testar-codex
12
- node pacotes/cli/dist/index.js --help
13
- node pacotes/cli/dist/index.js --version
14
- node pacotes/cli/dist/index.js resumo exemplos/calculadora.sema --micro --json
15
- node pacotes/cli/dist/index.js validar exemplos/calculadora.sema --json
16
- npm run release:preparar-publica
17
- npm run release:verificar-drift
18
- ```
19
-
20
- Do not require private or sensitive operational material for public test
21
- evidence. The public-package smoke must also reject the removed authorization
22
- command, legacy gate markers, any stale billing artifact, secrets, and broken
23
- encoding in every published document. The plugin smoke must validate the repo
24
- marketplace, manifest version, installed skill copy, and absence of Sema MCP.
25
- After push and npm publication, `npm run release:verificar-distribuicao` must
26
- repeat that installation from the remote `gerlanss/Sema` marketplace and prove
27
- that GitHub HEAD, the installed skill, and npm 2.0.1 all describe the same
28
- release.
1
+ # Testing
2
+
3
+ Public Sema tests should run locally.
4
+
5
+ Recommended checks:
6
+
7
+ ```bash
8
+ npm run build
9
+ npm run status:check
10
+ npm run repo:verificar-publico
11
+ npm run plugin:testar-codex
12
+ node pacotes/cli/dist/index.js --help
13
+ node pacotes/cli/dist/index.js --version
14
+ node pacotes/cli/dist/index.js resumo exemplos/calculadora.sema --micro --json
15
+ node pacotes/cli/dist/index.js validar exemplos/calculadora.sema --json
16
+ node pacotes/cli/dist/index.js testar exemplos/calculadora.sema --alvo dotnet --saida .tmp/testing-dotnet
17
+ node pacotes/cli/dist/index.js testar exemplos/calculadora.sema --alvo cpp --saida .tmp/testing-cpp
18
+ npm run release:preparar-publica
19
+ npm run release:verificar-drift
20
+ ```
21
+
22
+ Do not require private or sensitive operational material for public test
23
+ evidence. The public-package smoke must also reject the removed authorization
24
+ command, legacy gate markers, any stale billing artifact, secrets, and broken
25
+ encoding in every published document. The plugin smoke must validate the repo
26
+ marketplace, manifest version, installed skill copy, and absence of Sema MCP.
27
+ After push and npm publication, `npm run release:verificar-distribuicao` must
28
+ repeat that installation from the remote `gerlanss/Sema` marketplace and prove
29
+ that GitHub HEAD, the installed skill, and npm 2.2.0 all describe the same
30
+ release.
31
+
32
+ Native generator evidence is mandatory when changing C#/.NET or C++ support.
33
+ The `dotnet` smoke must compile and execute through the local .NET SDK. The
34
+ `cpp` smoke must compile and execute through GCC, Clang, or MSVC; checking only
35
+ for generated files is not sufficient.
@@ -1,29 +1,29 @@
1
- # Sema Vocabulary
2
-
3
- Use consistent English prose in public docs while preserving technical
4
- identifiers.
5
-
6
- ## Canonical Concepts
7
-
8
- - semantic contract
9
- - drift
10
- - impact map
11
- - governed code
12
- - traceability
13
- - Codex-native
14
- - local runtime
15
- - finalization
16
- - evidence
17
- - local CLI
18
-
19
- ## Do Not Translate
20
-
21
- - commands: `sema validar`, `sema drift`, `sema impacto`
22
- - files: `AGENTS.md`, `SEMA_BOOT.md`, `SEMA_INDEX.json`
23
- - DSL keywords: `task`, `input`, `output`, `rules`, `effects`, `guarantees`
24
- - package names: `@semacode/cli`
25
- - code symbols and environment variable names
26
-
27
- ## Public Support
28
-
29
- Use suporte@otimitare.online for support references.
1
+ # Sema Vocabulary
2
+
3
+ Use consistent English prose in public docs while preserving technical
4
+ identifiers.
5
+
6
+ ## Canonical Concepts
7
+
8
+ - semantic contract
9
+ - drift
10
+ - impact map
11
+ - governed code
12
+ - traceability
13
+ - Codex-native
14
+ - local runtime
15
+ - finalization
16
+ - evidence
17
+ - local CLI
18
+
19
+ ## Do Not Translate
20
+
21
+ - commands: `sema validar`, `sema drift`, `sema impacto`
22
+ - files: `AGENTS.md`, `SEMA_BOOT.md`, `SEMA_INDEX.json`
23
+ - DSL keywords: `task`, `input`, `output`, `rules`, `effects`, `guarantees`
24
+ - package names: `@semacode/cli`
25
+ - code symbols and environment variable names
26
+
27
+ ## Public Support
28
+
29
+ Use suporte@otimitare.online for support references.
@@ -102,4 +102,4 @@ module exemplos.agendamento {
102
102
  }
103
103
  }
104
104
  }
105
- }
105
+ }
@@ -130,4 +130,4 @@ module exemplos.assinatura {
130
130
  }
131
131
  }
132
132
  }
133
- }
133
+ }
@@ -86,4 +86,4 @@ module exemplos.auditoria {
86
86
  }
87
87
  }
88
88
  }
89
- }
89
+ }
@@ -122,4 +122,4 @@ module exemplos.autenticacao {
122
122
  }
123
123
  }
124
124
  }
125
- }
125
+ }
@@ -291,4 +291,4 @@ module exemplos.author.obra_comum {
291
291
  auditoria author_flow criticidade = media
292
292
  }
293
293
  }
294
- }
294
+ }
@@ -261,4 +261,4 @@ module exemplos.author.tema_sensivel {
261
261
  auditoria author_flow_sensivel criticidade = alta
262
262
  }
263
263
  }
264
- }
264
+ }
@@ -104,4 +104,4 @@ module exemplos.automacao {
104
104
  etapa auditar usa registrar_auditoria com protocolo = receber.protocolo depende_de receber
105
105
  etapa registrar_falha usa registrar_falha_onboarding com lead_id = lead_id depende_de receber
106
106
  }
107
- }
107
+ }
@@ -51,4 +51,4 @@ module exemplos.cadastro.usuario {
51
51
  }
52
52
  }
53
53
  }
54
- }
54
+ }
@@ -75,4 +75,4 @@ module exemplos.calculadora {
75
75
  }
76
76
  }
77
77
  }
78
- }
78
+ }
@@ -86,4 +86,4 @@ module exemplos.crud.simples {
86
86
  produto: Produto
87
87
  }
88
88
  }
89
- }
89
+ }
@@ -124,4 +124,4 @@ module exemplos.estoque {
124
124
  }
125
125
  }
126
126
  }
127
- }
127
+ }
@@ -91,4 +91,4 @@ module exemplos.exportacao {
91
91
  }
92
92
  }
93
93
  }
94
- }
94
+ }
@@ -127,4 +127,4 @@ module exemplos.fila {
127
127
  }
128
128
  }
129
129
  }
130
- }
130
+ }
@@ -91,4 +91,4 @@ module exemplos.integracao.externa {
91
91
  }
92
92
  }
93
93
  }
94
- }
94
+ }
@@ -137,4 +137,4 @@ module exemplos.multi.tenant {
137
137
  }
138
138
  }
139
139
  }
140
- }
140
+ }
@@ -146,4 +146,4 @@ module exemplos.notificacao {
146
146
  etapa registrar_falha_push usa registrar_falha_notificacao com canal = canal_push depende_de push
147
147
  etapa concluir usa confirmar_notificacao com destinatario_id = destinatario_id depende_de email
148
148
  }
149
- }
149
+ }
@@ -1,132 +1,132 @@
1
- module exemplos.operacao_estrategia {
2
- docs {
3
- resumo: "Referencia oficial de governanca operacional para strategy,slice,gate,discovery semanal e rollout. Este indice fino mantem modelos compartilhados e flow; as tasks ficam em arquivos filhos por responsabilidade."
4
- }
5
-
6
- type JanelaDiscovery {
7
- fields {
8
- semana_referencia: Data
9
- strategy_id: Id
10
- versao_modelo_candidata: Texto
11
- status_discovery: StatusDiscovery
12
- }
13
- invariants {
14
- semana_referencia existe
15
- strategy_id existe
16
- versao_modelo_candidata existe
17
- status_discovery em [ABERTA, EM_AVALIACAO, APROVADA, REJEITADA]
18
- }
19
- }
20
-
21
- type ContextoQuarentena {
22
- fields {
23
- motivo: Texto
24
- origem: Texto
25
- desde: Data
26
- }
27
- invariants {
28
- motivo existe
29
- origem existe
30
- desde existe
31
- }
32
- }
33
-
34
- entity Strategy {
35
- fields {
36
- id: Id
37
- versao_modelo_ativa: Texto
38
- versao_modelo_candidata: Texto
39
- status: StatusStrategy
40
- gate_global: StatusGate
41
- discovery_atual: JanelaDiscovery
42
- ultima_quarentena: ContextoQuarentena
43
- }
44
- invariants {
45
- id existe
46
- versao_modelo_ativa existe
47
- versao_modelo_candidata existe
48
- status em [RASCUNHO, ATIVA, QUARENTENA, DESATIVADA]
49
- gate_global em [ABERTO, FECHADO]
50
- discovery_atual existe
51
- ultima_quarentena existe
52
- }
53
- }
54
-
55
- entity Slice {
56
- fields {
57
- id: Id
58
- strategy_id: Id
59
- status: StatusSlice
60
- gate: StatusGate
61
- versao_modelo_ativa: Texto
62
- versao_modelo_candidata: Texto
63
- motivo_quarentena: Texto
64
- precision_observada: Decimal
65
- }
66
- invariants {
67
- id existe
68
- strategy_id existe
69
- status em [ATIVO, QUARENTENA, DESLIGADO]
70
- gate em [ABERTO, FECHADO]
71
- versao_modelo_ativa existe
72
- versao_modelo_candidata existe
73
- motivo_quarentena existe
74
- precision_observada existe
75
- }
76
- }
77
-
78
- enum StatusStrategy {
79
- RASCUNHO,
80
- ATIVA,
81
- QUARENTENA,
82
- DESATIVADA
83
- }
84
-
85
- enum StatusSlice {
86
- ATIVO,
87
- QUARENTENA,
88
- DESLIGADO
89
- }
90
-
91
- enum StatusGate {
92
- ABERTO,
93
- FECHADO
94
- }
95
-
96
- enum StatusDiscovery {
97
- ABERTA,
98
- EM_AVALIACAO,
99
- APROVADA,
100
- REJEITADA
101
- }
102
-
103
- state governanca_estrategia {
104
- fields {
105
- status: StatusStrategy
106
- slice_status: StatusSlice
107
- gate_global: StatusGate
108
- gate_slice: StatusGate
109
- discovery_status: StatusDiscovery
110
- versao_modelo_ativa: Texto
111
- versao_modelo_candidata: Texto
112
- motivo_operacional: Texto
113
- }
114
- invariants {
115
- status em [RASCUNHO, ATIVA, QUARENTENA, DESATIVADA]
116
- slice_status em [ATIVO, QUARENTENA, DESLIGADO]
117
- gate_global em [ABERTO, FECHADO]
118
- gate_slice em [ABERTO, FECHADO]
119
- discovery_status em [ABERTA, EM_AVALIACAO, APROVADA, REJEITADA]
120
- versao_modelo_ativa existe
121
- versao_modelo_candidata existe
122
- motivo_operacional existe
123
- }
124
- transitions {
125
- RASCUNHO -> ATIVA
126
- ATIVA -> QUARENTENA
127
- QUARENTENA -> ATIVA
128
- ATIVA -> DESATIVADA
129
- }
130
- }
131
-
132
- }
1
+ module exemplos.operacao_estrategia {
2
+ docs {
3
+ resumo: "Referencia oficial de governanca operacional para strategy,slice,gate,discovery semanal e rollout. Este indice fino mantem modelos compartilhados e flow; as tasks ficam em arquivos filhos por responsabilidade."
4
+ }
5
+
6
+ type JanelaDiscovery {
7
+ fields {
8
+ semana_referencia: Data
9
+ strategy_id: Id
10
+ versao_modelo_candidata: Texto
11
+ status_discovery: StatusDiscovery
12
+ }
13
+ invariants {
14
+ semana_referencia existe
15
+ strategy_id existe
16
+ versao_modelo_candidata existe
17
+ status_discovery em [ABERTA, EM_AVALIACAO, APROVADA, REJEITADA]
18
+ }
19
+ }
20
+
21
+ type ContextoQuarentena {
22
+ fields {
23
+ motivo: Texto
24
+ origem: Texto
25
+ desde: Data
26
+ }
27
+ invariants {
28
+ motivo existe
29
+ origem existe
30
+ desde existe
31
+ }
32
+ }
33
+
34
+ entity Strategy {
35
+ fields {
36
+ id: Id
37
+ versao_modelo_ativa: Texto
38
+ versao_modelo_candidata: Texto
39
+ status: StatusStrategy
40
+ gate_global: StatusGate
41
+ discovery_atual: JanelaDiscovery
42
+ ultima_quarentena: ContextoQuarentena
43
+ }
44
+ invariants {
45
+ id existe
46
+ versao_modelo_ativa existe
47
+ versao_modelo_candidata existe
48
+ status em [RASCUNHO, ATIVA, QUARENTENA, DESATIVADA]
49
+ gate_global em [ABERTO, FECHADO]
50
+ discovery_atual existe
51
+ ultima_quarentena existe
52
+ }
53
+ }
54
+
55
+ entity Slice {
56
+ fields {
57
+ id: Id
58
+ strategy_id: Id
59
+ status: StatusSlice
60
+ gate: StatusGate
61
+ versao_modelo_ativa: Texto
62
+ versao_modelo_candidata: Texto
63
+ motivo_quarentena: Texto
64
+ precision_observada: Decimal
65
+ }
66
+ invariants {
67
+ id existe
68
+ strategy_id existe
69
+ status em [ATIVO, QUARENTENA, DESLIGADO]
70
+ gate em [ABERTO, FECHADO]
71
+ versao_modelo_ativa existe
72
+ versao_modelo_candidata existe
73
+ motivo_quarentena existe
74
+ precision_observada existe
75
+ }
76
+ }
77
+
78
+ enum StatusStrategy {
79
+ RASCUNHO,
80
+ ATIVA,
81
+ QUARENTENA,
82
+ DESATIVADA
83
+ }
84
+
85
+ enum StatusSlice {
86
+ ATIVO,
87
+ QUARENTENA,
88
+ DESLIGADO
89
+ }
90
+
91
+ enum StatusGate {
92
+ ABERTO,
93
+ FECHADO
94
+ }
95
+
96
+ enum StatusDiscovery {
97
+ ABERTA,
98
+ EM_AVALIACAO,
99
+ APROVADA,
100
+ REJEITADA
101
+ }
102
+
103
+ state governanca_estrategia {
104
+ fields {
105
+ status: StatusStrategy
106
+ slice_status: StatusSlice
107
+ gate_global: StatusGate
108
+ gate_slice: StatusGate
109
+ discovery_status: StatusDiscovery
110
+ versao_modelo_ativa: Texto
111
+ versao_modelo_candidata: Texto
112
+ motivo_operacional: Texto
113
+ }
114
+ invariants {
115
+ status em [RASCUNHO, ATIVA, QUARENTENA, DESATIVADA]
116
+ slice_status em [ATIVO, QUARENTENA, DESLIGADO]
117
+ gate_global em [ABERTO, FECHADO]
118
+ gate_slice em [ABERTO, FECHADO]
119
+ discovery_status em [ABERTA, EM_AVALIACAO, APROVADA, REJEITADA]
120
+ versao_modelo_ativa existe
121
+ versao_modelo_candidata existe
122
+ motivo_operacional existe
123
+ }
124
+ transitions {
125
+ RASCUNHO -> ATIVA
126
+ ATIVA -> QUARENTENA
127
+ QUARENTENA -> ATIVA
128
+ ATIVA -> DESATIVADA
129
+ }
130
+ }
131
+
132
+ }