@semacode/cli 2.0.1 → 2.1.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 (103) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +125 -121
  3. package/dist/agentEntryPoints.js +499 -499
  4. package/dist/doctorCommand.js +28 -0
  5. package/dist/geracaoCore.js +97 -1
  6. package/dist/iaPrompts.d.ts +1 -1
  7. package/dist/iaPrompts.js +307 -307
  8. package/dist/index.part01.js +4 -3
  9. package/dist/index.part02.js +21 -21
  10. package/dist/index.part04.js +96 -96
  11. package/dist/index.part06.js +1 -1
  12. package/dist/index.part07.js +35 -24
  13. package/dist/init/templates.part01.js +393 -393
  14. package/dist/init/templates.part02.js +189 -189
  15. package/dist/initTemplatesBackend.js +73 -73
  16. package/dist/initTemplatesBase.js +81 -81
  17. package/dist/initTemplatesFlutter.js +137 -137
  18. package/dist/initTemplatesRuntime.js +350 -350
  19. package/dist/initTemplatesWeb.js +309 -309
  20. package/dist/nativeToolchains.d.ts +15 -0
  21. package/dist/nativeToolchains.js +132 -0
  22. package/dist/projetoConfig.js +7 -1
  23. package/dist/projetoResolucao.js +21 -6
  24. package/dist/sync/index.js +35 -35
  25. package/docs/README.md +25 -25
  26. package/docs/ai-onboarding.md +62 -62
  27. package/docs/ai-workflow.md +1 -1
  28. package/docs/auth.md +26 -26
  29. package/docs/cli.md +79 -72
  30. package/docs/commands.md +1 -1
  31. package/docs/database.md +15 -15
  32. package/docs/deploy.md +41 -36
  33. package/docs/documentation.md +39 -39
  34. package/docs/env.md +16 -16
  35. package/docs/frontend.md +41 -41
  36. package/docs/getting-started.md +57 -57
  37. package/docs/i18n.md +15 -15
  38. package/docs/profiles.md +45 -43
  39. package/docs/repositories.md +43 -43
  40. package/docs/rollback.md +31 -31
  41. package/docs/security.md +32 -32
  42. package/docs/support.md +8 -8
  43. package/docs/syntax.md +1 -1
  44. package/docs/testing.md +35 -28
  45. package/docs/vocabulary.md +29 -29
  46. package/exemplos/agendamento.sema +1 -1
  47. package/exemplos/assinatura.sema +1 -1
  48. package/exemplos/auditoria.sema +1 -1
  49. package/exemplos/autenticacao.sema +1 -1
  50. package/exemplos/author_obra_comum.sema +1 -1
  51. package/exemplos/author_tema_sensivel.sema +1 -1
  52. package/exemplos/automacao.sema +1 -1
  53. package/exemplos/cadastro_usuario.sema +1 -1
  54. package/exemplos/calculadora.sema +1 -1
  55. package/exemplos/crud_simples.sema +1 -1
  56. package/exemplos/estoque.sema +1 -1
  57. package/exemplos/exportacao.sema +1 -1
  58. package/exemplos/fila.sema +1 -1
  59. package/exemplos/integracao_externa.sema +1 -1
  60. package/exemplos/multi_tenant.sema +1 -1
  61. package/exemplos/notificacao.sema +1 -1
  62. package/exemplos/operacao_estrategia.sema +132 -132
  63. package/exemplos/operacao_estrategia_discovery.sema +220 -220
  64. package/exemplos/operacao_estrategia_fluxo.sema +114 -114
  65. package/exemplos/operacao_estrategia_gates.sema +106 -106
  66. package/exemplos/operacao_estrategia_quarentena.sema +133 -133
  67. package/exemplos/operacao_estrategia_rollout.sema +124 -124
  68. package/exemplos/pagamento.sema +1 -1
  69. package/exemplos/pagamento_dominio.sema +1 -1
  70. package/exemplos/pedido.sema +1 -1
  71. package/exemplos/permissao.sema +1 -1
  72. package/exemplos/persistencia_vendor_first.sema +1 -1
  73. package/exemplos/profile_conversas.sema +165 -165
  74. package/exemplos/profile_game.sema +1 -1
  75. package/exemplos/profile_legal.sema +1 -1
  76. package/exemplos/profile_ops.sema +1 -1
  77. package/exemplos/profile_research.sema +1 -1
  78. package/exemplos/profile_software.sema +1 -1
  79. package/exemplos/profile_workflow_n8n.sema +1 -1
  80. package/exemplos/relatorio.sema +1 -1
  81. package/exemplos/replica_analitica_erp.sema +1 -1
  82. package/exemplos/testes_embutidos.sema +1 -1
  83. package/exemplos/tratamento_erro.sema +1 -1
  84. package/exemplos/upload_arquivo.sema +1 -1
  85. package/exemplos/webhook.sema +1 -1
  86. package/node_modules/@sema/gerador-cpp/dist/index.d.ts +3 -0
  87. package/node_modules/@sema/gerador-cpp/dist/index.js +859 -0
  88. package/node_modules/@sema/gerador-cpp/dist/index.js.map +1 -0
  89. package/node_modules/@sema/gerador-cpp/package.json +7 -0
  90. package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
  91. package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
  92. package/node_modules/@sema/gerador-dotnet/dist/index.d.ts +3 -0
  93. package/node_modules/@sema/gerador-dotnet/dist/index.js +828 -0
  94. package/node_modules/@sema/gerador-dotnet/dist/index.js.map +1 -0
  95. package/node_modules/@sema/gerador-dotnet/package.json +7 -0
  96. package/node_modules/@sema/gerador-html/dist/index.js +17 -17
  97. package/node_modules/@sema/gerador-lua/dist/index.js +5 -5
  98. package/node_modules/@sema/gerador-php/dist/index.js +113 -113
  99. package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
  100. package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
  101. package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
  102. package/node_modules/@sema/padroes/dist/index.d.ts +1 -1
  103. package/package.json +5 -1
package/LICENSE CHANGED
@@ -1,39 +1,39 @@
1
- Sema Public Non-Commercial License
2
- Version 1.0
3
-
4
- Copyright (c) 2026 Sema
5
-
6
- Official support: suporte@otimitare.online
7
-
8
- Permission is granted, free of charge, to use, copy, study, modify, and
9
- distribute this software and its documentation for personal, educational,
10
- research, internal business, and non-commercial purposes, subject to the terms
11
- below.
12
-
13
- You may:
14
-
15
- 1. Use Sema locally as a CLI in your own projects.
16
- 2. Study and modify the source code.
17
- 3. Share unmodified or modified copies for non-commercial purposes.
18
- 4. Publish patches, examples, documentation, and integrations that do not sell
19
- Sema itself as a product or commercial replacement.
20
-
21
- You may not, without prior written permission from OtimiTare:
22
-
23
- 1. Sell Sema, a modified Sema, or a substantially similar rebranded copy.
24
- 2. Offer Sema, a modified Sema, or a substantially similar implementation as a
25
- commercial replica or paid replacement.
26
- 3. Bundle Sema into a paid product in a way that makes Sema itself a material
27
- commercial feature.
28
- 4. Use Sema's name, marks, documentation, or public repository to imply
29
- endorsement by Sema or OtimiTare.
30
- 5. Remove this license or the copyright notice from distributed copies.
31
-
32
- Commercial licensing, resale permission, or commercial replica permission
33
- requires written approval. Contact suporte@otimitare.online.
34
-
35
- This software is provided "as is", without warranty of any kind, express or
36
- implied, including but not limited to warranties of merchantability, fitness for
37
- a particular purpose, and non-infringement. In no event shall the authors or
38
- copyright holders be liable for any claim, damages, or other liability arising
39
- from the software or its use.
1
+ Sema Public Non-Commercial License
2
+ Version 1.0
3
+
4
+ Copyright (c) 2026 Sema
5
+
6
+ Official support: suporte@otimitare.online
7
+
8
+ Permission is granted, free of charge, to use, copy, study, modify, and
9
+ distribute this software and its documentation for personal, educational,
10
+ research, internal business, and non-commercial purposes, subject to the terms
11
+ below.
12
+
13
+ You may:
14
+
15
+ 1. Use Sema locally as a CLI in your own projects.
16
+ 2. Study and modify the source code.
17
+ 3. Share unmodified or modified copies for non-commercial purposes.
18
+ 4. Publish patches, examples, documentation, and integrations that do not sell
19
+ Sema itself as a product or commercial replacement.
20
+
21
+ You may not, without prior written permission from OtimiTare:
22
+
23
+ 1. Sell Sema, a modified Sema, or a substantially similar rebranded copy.
24
+ 2. Offer Sema, a modified Sema, or a substantially similar implementation as a
25
+ commercial replica or paid replacement.
26
+ 3. Bundle Sema into a paid product in a way that makes Sema itself a material
27
+ commercial feature.
28
+ 4. Use Sema's name, marks, documentation, or public repository to imply
29
+ endorsement by Sema or OtimiTare.
30
+ 5. Remove this license or the copyright notice from distributed copies.
31
+
32
+ Commercial licensing, resale permission, or commercial replica permission
33
+ requires written approval. Contact suporte@otimitare.online.
34
+
35
+ This software is provided "as is", without warranty of any kind, express or
36
+ implied, including but not limited to warranties of merchantability, fitness for
37
+ a particular purpose, and non-infringement. In no event shall the authors or
38
+ copyright holders be liable for any claim, damages, or other liability arising
39
+ from the software or its use.
package/README.md CHANGED
@@ -1,121 +1,125 @@
1
- # @semacode/cli
2
-
3
- `@semacode/cli` is the public Codex-native local CLI for Sema semantic
4
- governance.
5
-
6
- It validates `.sema` contracts, checks semantic drift, maps impact, enforces
7
- documentation gates, generates starter code, and prepares contract-first
8
- context for Codex inside a local project folder.
9
-
10
- Sema is an independent product and is not affiliated with or endorsed by
11
- OpenAI. Codex-native describes Sema's official product direction, not an
12
- official OpenAI program, integration, or submission.
13
-
14
- Official support: [suporte@otimitare.online](mailto:suporte@otimitare.online)
15
-
16
- ## Install
17
-
18
- ```bash
19
- npm install -g @semacode/cli
20
- codex plugin marketplace add gerlanss/Sema
21
- codex plugin add sema@sema
22
- ```
23
-
24
- Open a new Codex task in the target repository after installing the plugin.
25
- Existing tasks do not reload their plugin/skill catalog. Invoke `$sema` in the
26
- new task; after it creates and reads `AGENTS.md`, later tasks load that workspace
27
- protocol automatically.
28
-
29
- ## First Run
30
-
31
- ```bash
32
- sema --version
33
- sema resumo . --curto
34
- ```
35
-
36
- Public Sema is local-only. The CLI runs directly without a Sema login, user
37
- authorization, product-license check, activation key, token, credits, billing
38
- service, control panel, or external service credentials. The license governs
39
- use and redistribution; it is not a runtime activation gate.
40
-
41
- ## Codex Setup
42
-
43
- `AGENTS.md` is the official Sema entrypoint for Codex:
44
-
45
- ```bash
46
- sema sync-codex --json
47
- ```
48
-
49
- Codex automatically loads `AGENTS.md` as durable repository guidance. See the
50
- [Codex `AGENTS.md` documentation](https://learn.chatgpt.com/docs/agent-configuration/agents-md).
51
-
52
- The CLI is the engine and source of truth; `AGENTS.md` is the automatic
53
- workspace protocol. The Sema skill is required for Codex to bootstrap a project
54
- that does not have Sema yet. After initialization, the skill delegates to the
55
- generated `AGENTS.md`. Installing this npm package never writes into
56
- `CODEX_HOME`; skill installation remains an explicit Codex command.
57
-
58
- ## Codex-Native Architecture
59
-
60
- - `AGENTS.md` is the only official entrypoint. `sync-codex` changes only valid
61
- Sema-managed blocks and preserves malformed or manual content for review.
62
- - Agent Context Pack consumers use schema version 6 and the fields
63
- `entrypointCodex`, `codexNativo`, and `cliLocalSemAutorizacao`.
64
- - The Sema Codex skill is required for first contact. It initializes the
65
- workspace and generates `AGENTS.md`; it does not duplicate the governed
66
- workflow after that handoff.
67
-
68
- ## Local Workflow
69
-
70
- ```bash
71
- sema docs-impacto --intencao "describe the change" --arquivo contratos/app.sema --json
72
- sema inspecionar contratos/app.sema --json
73
- sema drift contratos/app.sema --escopo modulo --json
74
- sema impacto contratos/app.sema --alvo app.modulo --mudanca "describe the change" --json
75
- sema finalizar-mudanca --intencao "describe the change" --doc-lida README.md --json
76
- ```
77
-
78
- If the project has no `.sema` contract, create one before implementing behavior:
79
-
80
- ```bash
81
- sema iniciar --template base
82
- ```
83
-
84
- Initialization preserves existing files and rejects symlink or junction
85
- escapes. Use `--force` only when overwriting the template destinations is an
86
- explicit human decision; the Codex bootstrap skill never adds it.
87
-
88
- ## Code Generation
89
-
90
- ```bash
91
- sema compilar contratos/app.sema --alvo typescript --saida .tmp/app-ts --estrutura modulos
92
- sema compilar contratos/app.sema --alvo python --saida .tmp/app-py --estrutura modulos
93
- sema compilar contratos/app.sema --alvo php --saida .tmp/app-php --estrutura modulos
94
- ```
95
-
96
- Generated artifacts include `SEMA-GOVERNED` headers and must stay aligned with
97
- the source contract.
98
-
99
- ## Validation
100
-
101
- ```bash
102
- sema validar contratos/app.sema --json
103
- sema diagnosticos contratos/app.sema --json
104
- sema testar contratos/app.sema --alvo typescript --saida .tmp/app-tests
105
- sema verificar contratos/app.sema --saida .tmp/app-check --json
106
- ```
107
-
108
- ## Public Boundary
109
-
110
- The npm package is for local CLI usage only. It must not contain private or
111
- sensitive operational material.
112
-
113
- ## Commercial Use
114
-
115
- Sema is public source for local semantic governance, but commercial resale,
116
- white-label redistribution, or commercial replicas require written permission
117
- from OtimiTare.
118
-
119
- ## Support
120
-
121
- Use [suporte@otimitare.online](mailto:suporte@otimitare.online) for support.
1
+ # @semacode/cli
2
+
3
+ `@semacode/cli` is the public Codex-native local CLI for Sema semantic
4
+ governance.
5
+
6
+ It validates `.sema` contracts, checks semantic drift, maps impact, enforces
7
+ documentation gates, generates starter code, and prepares contract-first
8
+ context for Codex inside a local project folder.
9
+
10
+ Sema is an independent product and is not affiliated with or endorsed by
11
+ OpenAI. Codex-native describes Sema's official product direction, not an
12
+ official OpenAI program, integration, or submission.
13
+
14
+ Official support: [suporte@otimitare.online](mailto:suporte@otimitare.online)
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ npm install -g @semacode/cli
20
+ codex plugin marketplace add gerlanss/Sema
21
+ codex plugin add sema@sema
22
+ ```
23
+
24
+ Open a new Codex task in the target repository after installing the plugin.
25
+ Existing tasks do not reload their plugin/skill catalog. Invoke `$sema` in the
26
+ new task; after it creates and reads `AGENTS.md`, later tasks load that workspace
27
+ protocol automatically.
28
+
29
+ ## First Run
30
+
31
+ ```bash
32
+ sema --version
33
+ sema resumo . --curto
34
+ ```
35
+
36
+ Public Sema is local-only. The CLI runs directly without a Sema login, user
37
+ authorization, product-license check, activation key, token, credits, billing
38
+ service, control panel, or external service credentials. The license governs
39
+ use and redistribution; it is not a runtime activation gate.
40
+
41
+ ## Codex Setup
42
+
43
+ `AGENTS.md` is the official Sema entrypoint for Codex:
44
+
45
+ ```bash
46
+ sema sync-codex --json
47
+ ```
48
+
49
+ Codex automatically loads `AGENTS.md` as durable repository guidance. See the
50
+ [Codex `AGENTS.md` documentation](https://learn.chatgpt.com/docs/agent-configuration/agents-md).
51
+
52
+ The CLI is the engine and source of truth; `AGENTS.md` is the automatic
53
+ workspace protocol. The Sema skill is required for Codex to bootstrap a project
54
+ that does not have Sema yet. After initialization, the skill delegates to the
55
+ generated `AGENTS.md`. Installing this npm package never writes into
56
+ `CODEX_HOME`; skill installation remains an explicit Codex command.
57
+
58
+ ## Codex-Native Architecture
59
+
60
+ - `AGENTS.md` is the only official entrypoint. `sync-codex` changes only valid
61
+ Sema-managed blocks and preserves malformed or manual content for review.
62
+ - Agent Context Pack consumers use schema version 6 and the fields
63
+ `entrypointCodex`, `codexNativo`, and `cliLocalSemAutorizacao`.
64
+ - The Sema Codex skill is required for first contact. It initializes the
65
+ workspace and generates `AGENTS.md`; it does not duplicate the governed
66
+ workflow after that handoff.
67
+
68
+ ## Local Workflow
69
+
70
+ ```bash
71
+ sema docs-impacto --intencao "describe the change" --arquivo contratos/app.sema --json
72
+ sema inspecionar contratos/app.sema --json
73
+ sema drift contratos/app.sema --escopo modulo --json
74
+ sema impacto contratos/app.sema --alvo app.modulo --mudanca "describe the change" --json
75
+ sema finalizar-mudanca --intencao "describe the change" --doc-lida README.md --json
76
+ ```
77
+
78
+ If the project has no `.sema` contract, create one before implementing behavior:
79
+
80
+ ```bash
81
+ sema iniciar --template base
82
+ ```
83
+
84
+ Initialization preserves existing files and rejects symlink or junction
85
+ escapes. Use `--force` only when overwriting the template destinations is an
86
+ explicit human decision; the Codex bootstrap skill never adds it.
87
+
88
+ ## Code Generation
89
+
90
+ ```bash
91
+ sema compilar contratos/app.sema --alvo typescript --saida .tmp/app-ts --estrutura modulos
92
+ sema compilar contratos/app.sema --alvo python --saida .tmp/app-py --estrutura modulos
93
+ sema compilar contratos/app.sema --alvo php --saida .tmp/app-php --estrutura modulos
94
+ sema compilar contratos/app.sema --alvo dotnet --saida .tmp/app-dotnet --estrutura modulos
95
+ sema compilar contratos/app.sema --alvo cpp --saida .tmp/app-cpp --estrutura modulos
96
+ ```
97
+
98
+ Generated artifacts include `SEMA-GOVERNED` headers and must stay aligned with
99
+ the source contract.
100
+
101
+ ## Validation
102
+
103
+ ```bash
104
+ sema validar contratos/app.sema --json
105
+ sema diagnosticos contratos/app.sema --json
106
+ sema testar contratos/app.sema --alvo typescript --saida .tmp/app-tests
107
+ sema testar contratos/app.sema --alvo dotnet --saida .tmp/app-dotnet-tests
108
+ sema testar contratos/app.sema --alvo cpp --saida .tmp/app-cpp-tests
109
+ sema verificar contratos/app.sema --saida .tmp/app-check --json
110
+ ```
111
+
112
+ ## Public Boundary
113
+
114
+ The npm package is for local CLI usage only. It must not contain private or
115
+ sensitive operational material.
116
+
117
+ ## Commercial Use
118
+
119
+ Sema is public source for local semantic governance, but commercial resale,
120
+ white-label redistribution, or commercial replicas require written permission
121
+ from OtimiTare.
122
+
123
+ ## Support
124
+
125
+ Use [suporte@otimitare.online](mailto:suporte@otimitare.online) for support.