@semacode/cli 2.3.0 → 3.0.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.
- package/LICENSE +39 -39
- package/README.md +112 -41
- package/dist/agentContextPack.js +14 -10
- package/dist/agentEntryPoints.d.ts +5 -0
- package/dist/agentEntryPoints.js +102 -91
- package/dist/angular-consumer-standalone.d.ts +3 -1
- package/dist/angular-consumer-standalone.js +12 -8
- package/dist/bin.d.ts +6 -0
- package/dist/bin.js +130 -0
- package/dist/cliArgs.js +4 -4
- package/dist/cliControlError.d.ts +12 -0
- package/dist/cliControlError.js +47 -0
- package/dist/cliGrammar.d.ts +11 -0
- package/dist/cliGrammar.js +551 -0
- package/dist/cliHelp.d.ts +13 -0
- package/dist/cliHelp.js +19 -0
- package/dist/cliHelpTexto.d.ts +3 -0
- package/dist/cliHelpTexto.js +168 -0
- package/dist/cliRuntime.d.ts +2 -0
- package/dist/cliRuntime.js +31 -0
- package/dist/comandos.js +9 -22
- package/dist/contexto.js +5 -5
- package/dist/dev/index.d.ts +1 -0
- package/dist/dev/index.js +51 -9
- package/dist/discovery/catalog.js +3 -3
- package/dist/distribuicao/filesystemGlobal.d.ts +63 -0
- package/dist/distribuicao/filesystemGlobal.js +701 -0
- package/dist/distribuicao/index.d.ts +7 -0
- package/dist/distribuicao/index.js +227 -0
- package/dist/distribuicao/launcherGlobal.d.ts +53 -0
- package/dist/distribuicao/launcherGlobal.js +643 -0
- package/dist/distribuicao/launcherWindows.d.ts +28 -0
- package/dist/distribuicao/launcherWindows.js +326 -0
- package/dist/distribuicao/lockContextGlobal.d.ts +10 -0
- package/dist/distribuicao/lockContextGlobal.js +17 -0
- package/dist/distribuicao/lockGlobal.d.ts +6 -0
- package/dist/distribuicao/lockGlobal.js +520 -0
- package/dist/distribuicao/skillGlobal.d.ts +48 -0
- package/dist/distribuicao/skillGlobal.js +652 -0
- package/dist/distribuicao/skillIntentPolicy.d.ts +21 -0
- package/dist/distribuicao/skillIntentPolicy.js +115 -0
- package/dist/distribuicao/tipos.d.ts +50 -0
- package/dist/distribuicao/tipos.js +10 -0
- package/dist/distribuicao/versaoSemantica.d.ts +3 -0
- package/dist/distribuicao/versaoSemantica.js +62 -0
- package/dist/drift.part01.d.ts +34 -2
- package/dist/drift.part01.js +3 -0
- package/dist/drift.part04.d.ts +12 -2
- package/dist/drift.part04.js +89 -15
- package/dist/drift.part05.d.ts +2 -1
- package/dist/drift.part05.js +9 -6
- package/dist/drift.part06.d.ts +2 -1
- package/dist/drift.part06.js +115 -24
- package/dist/drift.part07.d.ts +11 -10
- package/dist/drift.part07.js +261 -255
- package/dist/drift.part08.d.ts +2 -1
- package/dist/drift.part08.js +35 -25
- package/dist/drift.part11.js +279 -32
- package/dist/drift.part12.d.ts +1 -1
- package/dist/drift.part12.js +196 -11
- package/dist/drift.part13.d.ts +18 -2
- package/dist/drift.part13.js +654 -76
- package/dist/drift.part14.js +21 -7
- package/dist/driftCacheCas.d.ts +43 -0
- package/dist/driftCacheCas.js +351 -0
- package/dist/driftCacheFilesystem.d.ts +64 -0
- package/dist/driftCacheFilesystem.js +313 -0
- package/dist/driftCacheModes.d.ts +38 -0
- package/dist/driftCacheModes.js +147 -0
- package/dist/driftCacheStore.d.ts +80 -0
- package/dist/driftCacheStore.js +603 -0
- package/dist/driftCatalogo.d.ts +65 -0
- package/dist/driftCatalogo.js +516 -0
- package/dist/driftEscopo.d.ts +21 -0
- package/dist/driftEscopo.js +647 -0
- package/dist/driftEscopoReferencias.d.ts +8 -0
- package/dist/driftEscopoReferencias.js +612 -0
- package/dist/driftOrcamento.d.ts +6 -0
- package/dist/driftOrcamento.js +20 -3
- package/dist/geracaoCore.js +4 -6
- package/dist/iaPrompts.d.ts +3 -3
- package/dist/iaPrompts.js +13 -14
- package/dist/index.d.ts +4 -1
- package/dist/index.js +6 -25
- package/dist/index.part01.d.ts +21 -14
- package/dist/index.part01.js +20 -165
- package/dist/index.part02.js +57 -43
- package/dist/index.part03.d.ts +23 -1
- package/dist/index.part03.js +83 -8
- package/dist/index.part04.d.ts +10 -2
- package/dist/index.part04.js +48 -14
- package/dist/index.part05.d.ts +1 -1
- package/dist/index.part05.js +109 -30
- package/dist/index.part06.js +34 -16
- package/dist/index.part07.js +31 -27
- package/dist/index.part08.d.ts +1 -1
- package/dist/index.part08.js +23 -28
- package/dist/init/templates.part01.js +393 -393
- package/dist/init/templates.part02.js +189 -189
- package/dist/initCommand.js +5 -1
- package/dist/initTemplatesBackend.js +73 -73
- package/dist/initTemplatesBase.js +7 -5
- package/dist/initTemplatesFlutter.js +137 -137
- package/dist/initTemplatesRuntime.js +350 -350
- package/dist/initTemplatesWeb.js +309 -309
- package/dist/pipelineConteudo/command.d.ts +1 -0
- package/dist/pipelineConteudo/command.js +4 -32
- package/dist/pipelineConteudo/help.d.ts +2 -0
- package/dist/pipelineConteudo/help.js +33 -0
- package/dist/profileAuthorCommand.js +3 -7
- package/dist/profileCommand.js +3 -7
- package/dist/projeto.d.ts +1 -1
- package/dist/projetoCarregar.d.ts +2 -2
- package/dist/projetoCarregar.js +69 -28
- package/dist/projetoCatalogo.d.ts +8 -0
- package/dist/projetoCatalogo.js +164 -0
- package/dist/projetoOrigens.d.ts +2 -0
- package/dist/projetoOrigens.js +65 -9
- package/dist/projetoTipos.d.ts +15 -5
- package/dist/resultadoCli.d.ts +20 -0
- package/dist/resultadoCli.js +57 -0
- package/dist/saidaCli.d.ts +35 -0
- package/dist/saidaCli.js +118 -0
- package/dist/sistemasInterativos/acceptanceEvidence.d.ts +22 -0
- package/dist/sistemasInterativos/acceptanceEvidence.js +345 -0
- package/dist/sistemasInterativos/engineObservation.d.ts +12 -0
- package/dist/sistemasInterativos/engineObservation.js +438 -0
- package/dist/sistemasInterativos/jobOrchestration.d.ts +2 -0
- package/dist/sistemasInterativos/jobOrchestration.js +204 -0
- package/dist/sistemasInterativos/operationPrimitives.d.ts +21 -0
- package/dist/sistemasInterativos/operationPrimitives.js +194 -0
- package/dist/sistemasInterativos/operations.d.ts +4 -39
- package/dist/sistemasInterativos/operations.js +5 -1164
- package/dist/skillCommand.d.ts +5 -0
- package/dist/skillCommand.js +88 -0
- package/dist/sync/index.js +35 -35
- package/docs/README.md +11 -7
- package/docs/ai-integration.md +18 -11
- package/docs/ai-onboarding.md +81 -62
- package/docs/ai-workflow.md +10 -4
- package/docs/auth.md +26 -26
- package/docs/cli.md +197 -79
- package/docs/commands.md +30 -6
- package/docs/database.md +15 -15
- package/docs/deploy.md +54 -41
- package/docs/documentation.md +11 -10
- package/docs/drift-cache.md +108 -0
- package/docs/env.md +16 -16
- package/docs/frontend.md +41 -41
- package/docs/getting-started.md +82 -57
- package/docs/i18n.md +15 -15
- package/docs/repositories.md +60 -43
- package/docs/rollback.md +38 -31
- package/docs/security.md +54 -32
- package/docs/sistemas-interativos.md +27 -27
- package/docs/support.md +8 -8
- package/docs/testing.md +123 -17
- package/docs/vocabulary.md +29 -29
- package/exemplos/agendamento.sema +1 -1
- package/exemplos/assinatura.sema +1 -1
- package/exemplos/auditoria.sema +1 -1
- package/exemplos/autenticacao.sema +1 -1
- package/exemplos/author_obra_comum.sema +1 -1
- package/exemplos/author_tema_sensivel.sema +1 -1
- package/exemplos/automacao.sema +1 -1
- package/exemplos/cadastro_usuario.sema +1 -1
- package/exemplos/calculadora.sema +1 -1
- package/exemplos/crud_simples.sema +1 -1
- package/exemplos/estoque.sema +1 -1
- package/exemplos/exportacao.sema +1 -1
- package/exemplos/fila.sema +1 -1
- package/exemplos/integracao_externa.sema +1 -1
- package/exemplos/multi_tenant.sema +1 -1
- package/exemplos/notificacao.sema +1 -1
- package/exemplos/operacao_estrategia.sema +132 -132
- package/exemplos/operacao_estrategia_discovery.sema +220 -220
- package/exemplos/operacao_estrategia_fluxo.sema +114 -114
- package/exemplos/operacao_estrategia_gates.sema +106 -106
- package/exemplos/operacao_estrategia_quarentena.sema +133 -133
- package/exemplos/operacao_estrategia_rollout.sema +124 -124
- package/exemplos/pagamento.sema +1 -1
- package/exemplos/pagamento_dominio.sema +1 -1
- package/exemplos/pedido.sema +1 -1
- package/exemplos/permissao.sema +1 -1
- package/exemplos/persistencia_vendor_first.sema +1 -1
- package/exemplos/profile_conversas.sema +165 -165
- package/exemplos/profile_game.sema +1 -1
- package/exemplos/profile_legal.sema +1 -1
- package/exemplos/profile_ops.sema +1 -1
- package/exemplos/profile_research.sema +1 -1
- package/exemplos/profile_software.sema +1 -1
- package/exemplos/profile_workflow_n8n.sema +1 -1
- package/exemplos/relatorio.sema +1 -1
- package/exemplos/replica_analitica_erp.sema +1 -1
- package/exemplos/testes_embutidos.sema +1 -1
- package/exemplos/tratamento_erro.sema +1 -1
- package/exemplos/upload_arquivo.sema +1 -1
- package/exemplos/webhook.sema +1 -1
- package/node_modules/@sema/gerador-cpp/dist/index.js +176 -176
- package/node_modules/@sema/gerador-css/dist/index.part01.js +10 -10
- package/node_modules/@sema/gerador-css/dist/index.part02.js +460 -460
- package/node_modules/@sema/gerador-dotnet/dist/index.js +169 -169
- package/node_modules/@sema/gerador-html/dist/index.js +17 -17
- package/node_modules/@sema/gerador-python/dist/index.part02.js +3 -3
- package/node_modules/@sema/gerador-typescript/dist/index.part02.js +11 -11
- package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js +42 -42
- package/node_modules/@sema/nucleo/dist/semantico/analisador.d.ts +1 -0
- package/node_modules/@sema/nucleo/dist/semantico/analisador.js +1 -0
- package/package.json +7 -2
- package/scripts/postinstall.mjs +148 -0
- package/skills/sema/SKILL.md +199 -0
- package/skills/sema/agents/openai.yaml +4 -0
- package/node_modules/@sema/gerador-cpp/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-css/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-css/dist/index.part01.js.map +0 -1
- package/node_modules/@sema/gerador-css/dist/index.part02.js.map +0 -1
- package/node_modules/@sema/gerador-dart/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-dotnet/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-html/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-javascript/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-lua/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-php/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-python/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-python/dist/index.part01.js.map +0 -1
- package/node_modules/@sema/gerador-python/dist/index.part02.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.part01.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.part02.js.map +0 -1
- package/node_modules/@sema/gerador-typescript/dist/index.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ast/tipos.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/diagnosticos/index.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/diagnosticos/melhorador.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/diagnosticos/snippets.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/formatador/index.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/formatador/index.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/formatador/index.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/index.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/conversor.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/ir/modelos.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/lexer/lexer.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/lexer/tokens.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.declaracoes.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.modulo.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/parser/parser.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/persistencia/contratos.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part03.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part04.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part05.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part06.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part07.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/analisador.part08.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/estruturas.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/estruturas.part01.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/estruturas.part02.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/orcamentoSemantico.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/semantico/seguranca.js.map +0 -1
- package/node_modules/@sema/nucleo/dist/util/arquivos.js.map +0 -1
- package/node_modules/@sema/padroes/dist/index.js.map +0 -1
package/docs/testing.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Public Sema tests should run locally.
|
|
4
4
|
|
|
5
|
-
Recommended checks:
|
|
5
|
+
Recommended checks:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm run build
|
|
@@ -11,15 +11,31 @@ npm run repo:verificar-publico
|
|
|
11
11
|
npm run plugin:testar-codex
|
|
12
12
|
npm run cli:empacotar-publica
|
|
13
13
|
npm run cli:testar-pacote-publico
|
|
14
|
-
node pacotes/cli/dist/
|
|
15
|
-
node pacotes/cli/dist/
|
|
16
|
-
node pacotes/cli/dist/
|
|
17
|
-
node pacotes/cli/dist/
|
|
18
|
-
node pacotes/cli/dist/
|
|
19
|
-
node pacotes/cli/dist/
|
|
14
|
+
node pacotes/cli/dist/bin.js --help
|
|
15
|
+
node pacotes/cli/dist/bin.js --version
|
|
16
|
+
node pacotes/cli/dist/bin.js resumo exemplos/calculadora.sema --micro --json
|
|
17
|
+
node pacotes/cli/dist/bin.js validar exemplos/calculadora.sema --json
|
|
18
|
+
node pacotes/cli/dist/bin.js testar exemplos/calculadora.sema --alvo dotnet --saida .tmp/testing-dotnet
|
|
19
|
+
node pacotes/cli/dist/bin.js testar exemplos/calculadora.sema --alvo cpp --saida .tmp/testing-cpp
|
|
20
20
|
npm run release:preparar-publica
|
|
21
|
-
npm run release:verificar-drift
|
|
22
|
-
```
|
|
21
|
+
npm run release:verificar-drift
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
`npm run cli:empacotar-publica` is the only supported package factory. It
|
|
25
|
+
builds a private, per-run stage outside `pacotes/cli`, invokes npm there with
|
|
26
|
+
lifecycle scripts disabled, validates the complete tarball, and publishes the
|
|
27
|
+
final `.tgz` without replacing a different concurrent winner. Running `npm
|
|
28
|
+
pack` directly in the source workspace must fail closed and leave the source
|
|
29
|
+
tree byte-for-byte unchanged.
|
|
30
|
+
|
|
31
|
+
Packaging regressions must prove rejection of pre-existing source or output
|
|
32
|
+
junctions, zero external writes in those cases, cross-volume publication,
|
|
33
|
+
cleanup after injected faults, concurrent no-replace publication, and a full
|
|
34
|
+
stage sweep for source maps, credentials, environment files, and billing
|
|
35
|
+
artifacts. Post-operation identity checks detect ordinary path swaps, but tests
|
|
36
|
+
must not claim containment against a hostile same-user process racing path
|
|
37
|
+
operations; that stronger guarantee requires native directory-handle-relative
|
|
38
|
+
filesystem primitives that Node.js does not provide cross-platform.
|
|
23
39
|
|
|
24
40
|
Do not require private or sensitive operational material for public test
|
|
25
41
|
evidence. The public-package smoke must also reject the removed authorization
|
|
@@ -31,14 +47,104 @@ repeat that installation from the remote `gerlanss/Sema` marketplace and prove
|
|
|
31
47
|
that GitHub HEAD, the installed skill, and the manifest-declared npm version
|
|
32
48
|
all describe the same release.
|
|
33
49
|
|
|
34
|
-
The local public-package smoke installs the generated tarball in an isolated
|
|
35
|
-
sandbox. It must import the root API without executing the CLI, materialize
|
|
36
|
-
nested interactive examples, and execute discovery, interactive schema,
|
|
37
|
-
definition validation, planning, and adapter-protocol validation through the
|
|
38
|
-
installed binary.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
50
|
+
The local public-package smoke installs the generated tarball in an isolated
|
|
51
|
+
sandbox. It must import the root API without executing the CLI, materialize
|
|
52
|
+
nested interactive examples, and execute discovery, interactive schema,
|
|
53
|
+
definition validation, planning, and adapter-protocol validation through the
|
|
54
|
+
installed binary. Its global-install phase uses an isolated home, prefix, npm
|
|
55
|
+
cache, and user cache; it verifies the absolute launcher with Node.js/npm absent
|
|
56
|
+
from `PATH`, exact skill digests, read-only status, idempotent repair, and zero
|
|
57
|
+
changes to the real home or workspace. On Windows it must resolve `sema.ps1`
|
|
58
|
+
from a restricted `PATH`, invoke `sema-managed.ps1` with the absolute system
|
|
59
|
+
`powershell.exe`, and exercise `sema.cmd` with conventional `cmd.exe` arguments.
|
|
60
|
+
Byte-exact arbitrary argv is proved through the PowerShell entrypoints. Passing this smoke proves
|
|
61
|
+
the local tarball only; it does not mean that npm or a GitHub release was
|
|
62
|
+
published.
|
|
63
|
+
|
|
64
|
+
The same installed-package smoke must execute root help plus `iniciar --help`,
|
|
65
|
+
`dev --help`, `formatar --help`, `sync-codex --help`, `skill sync --help`, short
|
|
66
|
+
`-h`, and help after unknown arguments. Each text and `--json` invocation runs
|
|
67
|
+
from an empty isolated workspace with an isolated HOME, user cache, plugin
|
|
68
|
+
cache, and npm cache. A recursive content fingerprint before and after every
|
|
69
|
+
invocation must remain identical, and every help path must finish within the
|
|
70
|
+
smoke timeout with exit code `0` and empty stderr.
|
|
71
|
+
|
|
72
|
+
The purity preload also fails on reads under the isolated workspace, HOME, or
|
|
73
|
+
cache roots, subprocess creation, and network primitives. Module reads from the
|
|
74
|
+
installed package itself remain allowed. The smoke invokes the real installed
|
|
75
|
+
launcher with PATH emptied, so a passing direct `node dist/bin.js` probe alone
|
|
76
|
+
is not accepted as launcher evidence.
|
|
77
|
+
|
|
78
|
+
JSON help must be one parseable `sema.cli.control/v1` document containing
|
|
79
|
+
exactly `schemaVersion`, `ok`, `kind`, `code`, `message`, and `exitCode`. The
|
|
80
|
+
smoke must also prove a non-zero `UNKNOWN_COMMAND` control response whose
|
|
81
|
+
process status equals `exitCode`, with no stack, absolute path, raw argv, or
|
|
82
|
+
second JSON document. Every syntactically valid command using `--json` must be
|
|
83
|
+
one parseable `sema.cli.result/v1` document containing exactly
|
|
84
|
+
`schemaVersion`, `ok`, `kind`, `command`, `code`, `message`, `exitCode`, and
|
|
85
|
+
`payload`. Smoke assertions must unwrap `payload` before checking
|
|
86
|
+
command-specific fields, and recorded fixtures must contain that payload rather
|
|
87
|
+
than either public CLI envelope. Coverage must include object, array, scalar,
|
|
88
|
+
and `null` payloads, coherent `SUCCESS` and `DOMAIN_ERROR` results, process
|
|
89
|
+
status equality, empty stderr, no `data` alias, and rejection of missing,
|
|
90
|
+
extra, nested, or mismatched envelope fields. `--version` remains a plain exact
|
|
91
|
+
SemVer text check.
|
|
92
|
+
|
|
93
|
+
Focused distribution tests live in
|
|
94
|
+
`testes/unidade/distribuicao-launcher-global.test.ts`,
|
|
95
|
+
`testes/unidade/distribuicao-skill-global.test.ts`, and
|
|
96
|
+
`testes/unidade/distribuicao-global.test.ts`. They must cover spaces, Unicode,
|
|
97
|
+
argument forwarding, stale targets, ownership conflicts, symlink/junction
|
|
98
|
+
escapes, atomic replacement, idempotent upgrades, the PowerShell fallback with
|
|
99
|
+
an absolute system executable, a detected Claude mirror, and a local lifecycle
|
|
100
|
+
no-op. No test may write to the real user home or a plugin cache.
|
|
101
|
+
|
|
102
|
+
The public-package smoke has one orchestrator and named helpers under
|
|
103
|
+
`scripts/cli-publico/`. All helpers share the same temporary sandbox and the
|
|
104
|
+
same installed tarball; splitting the checks must never multiply installations
|
|
105
|
+
or weaken the single `try/finally` cleanup boundary.
|
|
106
|
+
|
|
107
|
+
Focused drift regressions live in
|
|
108
|
+
`testes/unidade/drift-escopo-dependencias.test.ts`,
|
|
109
|
+
`testes/unidade/drift-escopo-referencias.test.ts`,
|
|
110
|
+
`testes/unidade/drift-catalogo.test.ts`,
|
|
111
|
+
`testes/unidade/drift-leitura-compartilhada.test.ts`, and
|
|
112
|
+
`testes/integracao/drift-escopo-io.test.ts`, plus the external-path attack
|
|
113
|
+
regressions in `testes/integracao/drift-caminhos-externos.test.ts`. They must prove planning before
|
|
114
|
+
cataloging, path confinement, dependency closure, one physical read and one AST
|
|
115
|
+
per canonical file, no homonymous last-write-wins resolution, and no
|
|
116
|
+
project-wide walk for `arquivo` or `modulo` scope. Project-loading regressions
|
|
117
|
+
also prove deferred code discovery and rejection of external configured roots
|
|
118
|
+
or contract origins before enumeration. In project scope, physical file
|
|
119
|
+
bindings outside code roots must enter the safe catalog individually, including
|
|
120
|
+
non-indexable assets, without causing a walk of their parent directories.
|
|
121
|
+
Drift, impact, and semantic rename must not expose an external path or read its
|
|
122
|
+
contents.
|
|
123
|
+
Persistent-cache regressions live in
|
|
124
|
+
`testes/unidade/drift-cache-modes.test.ts`,
|
|
125
|
+
`testes/unidade/drift-cache-store.test.ts`,
|
|
126
|
+
`testes/integracao/drift-cache-persistente.test.ts`, and
|
|
127
|
+
`testes/integracao/drift-cli-modes.test.ts`. They must prove all three modes,
|
|
128
|
+
query defaults, nullable non-evidence, zero cache I/O for `none`, storage outside
|
|
129
|
+
the workspace, opaque paths, strong-content invalidation even with restored
|
|
130
|
+
metadata, corruption recovery, immutable concurrent publication, and semantic
|
|
131
|
+
equivalence between fresh and warm results. Shape-valid semantic tampering with
|
|
132
|
+
only the envelope `payloadDigest` recalculated must fail the cross-index
|
|
133
|
+
invariants, become a corrupt miss, recalculate, and match the fresh result. The
|
|
134
|
+
payload must derive symbol, route, resource, and known-file aggregates from its
|
|
135
|
+
canonical per-extractor indices instead of trusting redundant aggregate lists.
|
|
136
|
+
A warm hit may skip AST/extractor work, but it never reuses the final score,
|
|
137
|
+
links, diagnostics, or success decision. Junctions, symlinks, hardlinks, path
|
|
138
|
+
traversal, drive-relative paths,
|
|
139
|
+
intermediate-directory swaps, and cache unavailability must fail closed or
|
|
140
|
+
degrade to an in-memory calculation without mutating the workspace.
|
|
141
|
+
|
|
142
|
+
Cache digests are corruption checks, not authentication against a hostile
|
|
143
|
+
process running as the same operating-system user. Tests must not present a
|
|
144
|
+
warm cache hit as a protected trust boundary; final closure evidence uses
|
|
145
|
+
`--cache fresh`.
|
|
146
|
+
|
|
147
|
+
Native generator evidence is mandatory when changing C#/.NET or C++ support.
|
|
42
148
|
The `dotnet` smoke must compile and execute through the local .NET SDK. The
|
|
43
149
|
`cpp` smoke must compile and execute through GCC, Clang, or MSVC; checking only
|
|
44
150
|
for generated files is not sufficient.
|
package/docs/vocabulary.md
CHANGED
|
@@ -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.
|
package/exemplos/assinatura.sema
CHANGED
package/exemplos/auditoria.sema
CHANGED
package/exemplos/automacao.sema
CHANGED
package/exemplos/estoque.sema
CHANGED
package/exemplos/exportacao.sema
CHANGED
package/exemplos/fila.sema
CHANGED
|
@@ -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
|
+
}
|