@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.
- package/LICENSE +39 -39
- package/README.md +251 -141
- package/dist/agentContext.d.ts +1 -1
- package/dist/agentContextPack.js +6 -1
- package/dist/agentContextTipos.d.ts +4 -2
- package/dist/agentContextTipos.js +7 -0
- package/dist/agentEntryPoints.js +551 -499
- package/dist/angular-consumer-standalone.d.ts +3 -1
- package/dist/angular-consumer-standalone.js +12 -8
- package/dist/comandos.js +4 -0
- package/dist/discovery/catalog.d.ts +11 -0
- package/dist/discovery/catalog.js +521 -0
- package/dist/discovery/command.d.ts +11 -0
- package/dist/discovery/command.js +226 -0
- package/dist/discovery/index.d.ts +5 -0
- package/dist/discovery/index.js +8 -0
- package/dist/discovery/ranker.d.ts +3 -0
- package/dist/discovery/ranker.js +310 -0
- package/dist/discovery/redaction.d.ts +2 -0
- package/dist/discovery/redaction.js +21 -0
- package/dist/discovery/render.d.ts +2 -0
- package/dist/discovery/render.js +100 -0
- package/dist/discovery/types.d.ts +119 -0
- package/dist/discovery/types.js +13 -0
- package/dist/drift.part01.d.ts +32 -2
- package/dist/drift.part01.js +2 -0
- package/dist/drift.part04.d.ts +3 -2
- package/dist/drift.part04.js +6 -3
- package/dist/drift.part05.d.ts +2 -1
- package/dist/drift.part05.js +4 -3
- package/dist/drift.part06.d.ts +2 -1
- package/dist/drift.part06.js +9 -5
- package/dist/drift.part07.d.ts +11 -10
- package/dist/drift.part07.js +40 -30
- package/dist/drift.part08.d.ts +2 -1
- package/dist/drift.part08.js +4 -3
- package/dist/drift.part11.js +71 -6
- package/dist/drift.part12.js +14 -1
- package/dist/drift.part13.d.ts +42 -7
- package/dist/drift.part13.js +660 -36
- package/dist/driftCache.d.ts +49 -0
- package/dist/driftCache.js +311 -0
- package/dist/driftCacheIncremental.d.ts +98 -0
- package/dist/driftCacheIncremental.js +596 -0
- package/dist/driftCatalogo.d.ts +91 -0
- package/dist/driftCatalogo.js +657 -0
- package/dist/driftCatalogoPersistente.d.ts +8 -0
- package/dist/driftCatalogoPersistente.js +77 -0
- package/dist/driftEscopo.d.ts +23 -0
- package/dist/driftEscopo.js +563 -0
- package/dist/driftEscopoReferencias.d.ts +4 -0
- package/dist/driftEscopoReferencias.js +265 -0
- package/dist/driftOrcamento.d.ts +12 -0
- package/dist/driftOrcamento.js +19 -3
- package/dist/execucoesExternas.js +5 -19
- package/dist/exemplosOficiais.js +29 -8
- package/dist/iaPrompts.d.ts +1 -1
- package/dist/iaPrompts.js +310 -307
- package/dist/index.d.ts +2 -0
- package/dist/index.js +23 -5
- package/dist/index.part01.d.ts +17 -2
- package/dist/index.part01.js +119 -8
- package/dist/index.part02.js +21 -21
- package/dist/index.part03.d.ts +2 -2
- package/dist/index.part03.js +14 -3
- package/dist/index.part04.d.ts +2 -2
- package/dist/index.part04.js +113 -101
- package/dist/index.part05.d.ts +1 -1
- package/dist/index.part05.js +99 -22
- package/dist/index.part06.js +6 -2
- package/dist/index.part07.js +24 -24
- package/dist/index.part08.js +1 -1
- package/dist/init/templates.part01.js +393 -393
- package/dist/init/templates.part02.js +189 -189
- package/dist/initTemplatesBackend.js +73 -73
- package/dist/initTemplatesBase.js +81 -80
- package/dist/initTemplatesFlutter.js +137 -137
- package/dist/initTemplatesRuntime.js +350 -350
- package/dist/initTemplatesWeb.js +309 -309
- package/dist/pipelineConteudo/command.js +1 -36
- package/dist/profileArtefatoValidadores.d.ts +3 -2
- package/dist/profileArtefatoValidadores.js +81 -0
- package/dist/profileAuthorTipos.d.ts +4 -3
- package/dist/profileCatalogo.d.ts +5 -5
- package/dist/profileCatalogo.js +30 -0
- package/dist/profileCommand.d.ts +8 -2
- package/dist/profileCommand.js +15 -5
- package/dist/profileRegras.d.ts +5 -5
- package/dist/profileRegras.js +13 -1
- package/dist/profileRulePacks.js +68 -0
- package/dist/projeto.d.ts +1 -1
- package/dist/projetoCarregar.d.ts +2 -2
- package/dist/projetoCarregar.js +47 -24
- package/dist/projetoCatalogo.d.ts +7 -0
- package/dist/projetoCatalogo.js +125 -0
- package/dist/projetoTipos.d.ts +14 -5
- package/dist/sistemasInterativos/adapterProtocol.d.ts +3 -0
- package/dist/sistemasInterativos/adapterProtocol.js +240 -0
- package/dist/sistemasInterativos/advancedCatalog.d.ts +5 -0
- package/dist/sistemasInterativos/advancedCatalog.js +442 -0
- package/dist/sistemasInterativos/autonomy.d.ts +230 -0
- package/dist/sistemasInterativos/autonomy.js +753 -0
- package/dist/sistemasInterativos/canonical.d.ts +3 -0
- package/dist/sistemasInterativos/canonical.js +43 -0
- package/dist/sistemasInterativos/catalog.d.ts +116 -0
- package/dist/sistemasInterativos/catalog.js +543 -0
- package/dist/sistemasInterativos/command.d.ts +7 -0
- package/dist/sistemasInterativos/command.js +311 -0
- package/dist/sistemasInterativos/controlRun.d.ts +56 -0
- package/dist/sistemasInterativos/controlRun.js +391 -0
- package/dist/sistemasInterativos/evidence.d.ts +5 -0
- package/dist/sistemasInterativos/evidence.js +306 -0
- package/dist/sistemasInterativos/experienceIr.d.ts +12 -0
- package/dist/sistemasInterativos/experienceIr.js +895 -0
- package/dist/sistemasInterativos/experienceIrSemantics.d.ts +30 -0
- package/dist/sistemasInterativos/experienceIrSemantics.js +368 -0
- package/dist/sistemasInterativos/experienceIrTypes.d.ts +370 -0
- package/dist/sistemasInterativos/experienceIrTypes.js +5 -0
- package/dist/sistemasInterativos/extensionCommand.d.ts +391 -0
- package/dist/sistemasInterativos/extensionCommand.js +383 -0
- package/dist/sistemasInterativos/index.d.ts +19 -0
- package/dist/sistemasInterativos/index.js +22 -0
- package/dist/sistemasInterativos/operations.d.ts +40 -0
- package/dist/sistemasInterativos/operations.js +1167 -0
- package/dist/sistemasInterativos/operationsTypes.d.ts +297 -0
- package/dist/sistemasInterativos/operationsTypes.js +11 -0
- package/dist/sistemasInterativos/planner.d.ts +2 -0
- package/dist/sistemasInterativos/planner.js +159 -0
- package/dist/sistemasInterativos/portability.d.ts +164 -0
- package/dist/sistemasInterativos/portability.js +539 -0
- package/dist/sistemasInterativos/render.d.ts +3 -0
- package/dist/sistemasInterativos/render.js +179 -0
- package/dist/sistemasInterativos/temporal.d.ts +183 -0
- package/dist/sistemasInterativos/temporal.js +543 -0
- package/dist/sistemasInterativos/types.d.ts +215 -0
- package/dist/sistemasInterativos/types.js +4 -0
- package/dist/sistemasInterativos/validator.d.ts +2 -0
- package/dist/sistemasInterativos/validator.js +305 -0
- package/dist/sync/index.js +35 -35
- package/docs/README.md +34 -28
- package/docs/ai-onboarding.md +62 -62
- package/docs/ai-workflow.md +9 -4
- package/docs/auth.md +26 -26
- package/docs/cli.md +79 -79
- package/docs/commands.md +47 -2
- package/docs/database.md +15 -15
- package/docs/deploy.md +41 -41
- package/docs/descoberta-capacidades.md +106 -0
- package/docs/documentation.md +39 -39
- package/docs/env.md +16 -16
- package/docs/frontend.md +41 -41
- package/docs/getting-started.md +57 -57
- package/docs/i18n.md +15 -15
- package/docs/pipeline-conteudo.md +246 -246
- package/docs/profiles.md +54 -45
- package/docs/repositories.md +43 -43
- package/docs/rollback.md +31 -31
- package/docs/security.md +32 -32
- package/docs/sistemas-interativos.md +376 -0
- package/docs/support.md +8 -8
- package/docs/testing.md +51 -35
- 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/pipeline-conteudo/README.md +44 -44
- package/exemplos/pipeline-conteudo/alvos.json +23 -23
- package/exemplos/pipeline-conteudo/definicao.json +136 -136
- 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_simulation.sema +211 -0
- 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/sistemas-interativos/README.md +100 -0
- package/exemplos/sistemas-interativos/advanced/acceptance-context-evaluate-valid.json +5 -0
- package/exemplos/sistemas-interativos/advanced/acceptance-lock-valid.json +16 -0
- package/exemplos/sistemas-interativos/advanced/asset-provenance-valid.json +32 -0
- package/exemplos/sistemas-interativos/advanced/autonomy-repair-valid.json +93 -0
- package/exemplos/sistemas-interativos/advanced/control-run-definition-valid.json +78 -0
- package/exemplos/sistemas-interativos/advanced/control-run-valid.json +27 -0
- package/exemplos/sistemas-interativos/advanced/distributed-workers-valid.json +79 -0
- package/exemplos/sistemas-interativos/advanced/editor-state-valid.json +42 -0
- package/exemplos/sistemas-interativos/advanced/engine-snapshot-after-valid.json +32 -0
- package/exemplos/sistemas-interativos/advanced/engine-snapshot-before-valid.json +23 -0
- package/exemplos/sistemas-interativos/advanced/job-orchestration-valid.json +39 -0
- package/exemplos/sistemas-interativos/advanced/multimodal-evidence-valid.json +46 -0
- package/exemplos/sistemas-interativos/advanced/multiplayer-authority-valid.json +39 -0
- package/exemplos/sistemas-interativos/advanced/playtest-fuzz-valid.json +37 -0
- package/exemplos/sistemas-interativos/advanced/portability-valid.json +104 -0
- package/exemplos/sistemas-interativos/advanced/temporal-evidence-valid.json +27 -0
- package/exemplos/sistemas-interativos/advanced/temporal-valid.json +118 -0
- package/exemplos/sistemas-interativos/experience-ir-valid.json +459 -0
- package/exemplos/sistemas-interativos/game-2d.json +83 -0
- package/exemplos/sistemas-interativos/game-3d-human.json +81 -0
- package/exemplos/sistemas-interativos/game-pixel-16-bit.json +97 -0
- package/exemplos/sistemas-interativos/game-pixel-8-bit.json +94 -0
- package/exemplos/sistemas-interativos/game-xr-human.json +80 -0
- package/exemplos/sistemas-interativos/hybrid-2-5d.json +108 -0
- package/exemplos/sistemas-interativos/protocol-mutating-rollback-valid.json +75 -0
- package/exemplos/sistemas-interativos/protocol-read-only-valid.json +58 -0
- package/exemplos/sistemas-interativos/simulation-2d-controlled.json +97 -0
- package/exemplos/sistemas-interativos/simulation-3d-calibrated-autonomous.json +141 -0
- package/exemplos/sistemas-interativos/simulation-headless-autonomous-batch.json +112 -0
- package/exemplos/sistemas-interativos/simulation-pixel-16-bit.json +103 -0
- package/exemplos/sistemas-interativos/simulation-text-controlled.json +95 -0
- 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-cpp/package.json +1 -1
- 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-dotnet/package.json +1 -1
- package/node_modules/@sema/gerador-html/dist/index.js +17 -17
- package/node_modules/@sema/gerador-lua/dist/index.js +76 -47
- package/node_modules/@sema/gerador-lua/dist/index.js.map +1 -1
- package/node_modules/@sema/gerador-php/dist/index.js +113 -113
- 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/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// SEMA-GOVERNED: sema.governanca_ia_contexto
|
|
3
3
|
// Descricao: CLI particionada; consulte contratos/sema/governanca_ia_contexto.sema antes de editar.
|
|
4
|
+
import { realpathSync } from "node:fs";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
4
7
|
import { principal } from "./index.part08.js";
|
|
5
8
|
export * from "./index.part01.js";
|
|
6
9
|
export * from "./index.part08.js";
|
|
@@ -9,9 +12,24 @@ export { validarProfileSemantico } from "./profileCommand.js";
|
|
|
9
12
|
export { materializarExemplosOficiais } from "./exemplosOficiais.js";
|
|
10
13
|
export { expandirIntencaoSemanticaProfile, sugerirStarterPresetProfile, validarPipelineProfiles, exigirQaCriativoQuandoPublicavel, catalogoDropdownOnboarding } from "./profileOrquestracao.js";
|
|
11
14
|
export * from "./pipelineConteudo/index.js";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
process.
|
|
16
|
-
|
|
15
|
+
export * from "./sistemasInterativos/index.js";
|
|
16
|
+
export * from "./discovery/index.js";
|
|
17
|
+
function moduloExecutadoDiretamente() {
|
|
18
|
+
if (!process.argv[1]) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
return path.resolve(process.argv[1]) === path.resolve(fileURLToPath(import.meta.url));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (moduloExecutadoDiretamente()) {
|
|
29
|
+
principal().catch((erro) => {
|
|
30
|
+
console.error("Falha ao executar a CLI da Sema.");
|
|
31
|
+
console.error(erro instanceof Error ? erro.stack ?? erro.message : erro);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
17
35
|
//# sourceMappingURL=index.js.map
|
package/dist/index.part01.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { compilarCodigo, type IrModulo } from "@sema/nucleo";
|
|
2
|
+
import { type ContextoProjetoCarregado } from "./projeto.js";
|
|
2
3
|
import { analisarDriftLegado, type OpcoesDriftLegado } from "./drift.js";
|
|
3
4
|
import { type GuiaCapacidadeIaMap } from './agentContextTipos.js';
|
|
4
5
|
import { criarBriefingAgente, resumirDriftPorModulo } from "./index.part03.js";
|
|
5
|
-
export type Comando = "iniciar" | "init" | "dev" | "sync" | "author" | "profile" | "conteudo" | "validar" | "ast" | "ir" | "compilar" | "gerar" | "testar" | "diagnosticos" | "verificar" | "inspecionar" | "drift" | "impacto" | "renomear-semantico" | "importar" | "doctor" | "formatar" | "ajuda-ia" | "starter-ia" | "sync-codex" | "instalar-exemplos" | "rule-packs" | "docs-impacto" | "finalizar-mudanca" | "resumo" | "prompt-curto" | "prompt-ia" | "prompt-ia-ui" | "prompt-ia-react" | "prompt-ia-sema-primeiro" | "exemplos-prompt-ia" | "contexto-ia";
|
|
6
|
+
export type Comando = "iniciar" | "init" | "dev" | "sync" | "author" | "profile" | "conteudo" | "interativo" | "descobrir" | "pipeline" | "capabilities" | "validar" | "ast" | "ir" | "compilar" | "gerar" | "testar" | "diagnosticos" | "verificar" | "inspecionar" | "drift" | "impacto" | "renomear-semantico" | "importar" | "doctor" | "formatar" | "ajuda-ia" | "starter-ia" | "sync-codex" | "instalar-exemplos" | "rule-packs" | "docs-impacto" | "finalizar-mudanca" | "resumo" | "prompt-curto" | "prompt-ia" | "prompt-ia-ui" | "prompt-ia-react" | "prompt-ia-sema-primeiro" | "exemplos-prompt-ia" | "contexto-ia";
|
|
6
7
|
export interface ResultadoFormatacaoArquivo {
|
|
7
8
|
caminho: string;
|
|
8
9
|
alterado: boolean;
|
|
@@ -29,6 +30,8 @@ export interface DescobertaDocsIa {
|
|
|
29
30
|
}
|
|
30
31
|
export type TamanhoResumoIa = "micro" | "curto" | "medio";
|
|
31
32
|
export type ModoResumoIa = "resumo" | "onboarding" | "review" | "mudanca" | "bug" | "arquitetura";
|
|
33
|
+
export type ModoAnaliseDriftCli = "fresh" | "cache" | "none";
|
|
34
|
+
export type PoliticaCacheDriftCli = "auto" | "refresh" | "off";
|
|
32
35
|
export type ResultadoDriftIa = Awaited<ReturnType<typeof analisarDriftLegado>>;
|
|
33
36
|
export type ResumoModuloDrift = ReturnType<typeof resumirDriftPorModulo>;
|
|
34
37
|
export interface PacoteContextoModuloIa {
|
|
@@ -75,10 +78,15 @@ export interface PacoteContextoModuloIa {
|
|
|
75
78
|
caminho: string;
|
|
76
79
|
modulo: string | null;
|
|
77
80
|
sucesso: boolean;
|
|
81
|
+
modoAnalise?: ModoAnaliseDriftCli;
|
|
82
|
+
executado?: boolean;
|
|
83
|
+
aviso?: string | null;
|
|
78
84
|
resumo: ResumoModuloDrift;
|
|
79
85
|
drift: ResultadoDriftIa;
|
|
80
86
|
};
|
|
81
87
|
briefing: ReturnType<typeof criarBriefingAgente>;
|
|
88
|
+
modoVerificacaoCodigo?: ResumoSemanticoModuloIa["modoVerificacaoCodigo"];
|
|
89
|
+
fontesConclusao?: string[];
|
|
82
90
|
}
|
|
83
91
|
export interface ResumoSemanticoModuloIa {
|
|
84
92
|
geradoEm: string;
|
|
@@ -123,7 +131,14 @@ export declare function obterArgumentos(): {
|
|
|
123
131
|
export declare function renderizarCaixaAscii(linhas: string[]): string;
|
|
124
132
|
export declare function renderizarSecaoAscii(titulo: string, linhas: string[]): string;
|
|
125
133
|
export declare function ajuda(): string;
|
|
126
|
-
export declare function
|
|
134
|
+
export declare function normalizarModoAnaliseDriftCli(args: string[], padrao?: ModoAnaliseDriftCli): ModoAnaliseDriftCli;
|
|
135
|
+
export declare function normalizarPoliticaCacheDriftCli(args: string[]): PoliticaCacheDriftCli | undefined;
|
|
136
|
+
export declare function resolverOpcoesDriftCli(args: string[], cacheForcado?: PoliticaCacheDriftCli): OpcoesDriftLegado;
|
|
137
|
+
export declare function resolverAnaliseDriftCli(args: string[], padrao?: ModoAnaliseDriftCli): {
|
|
138
|
+
modo: ModoAnaliseDriftCli;
|
|
139
|
+
opcoes: OpcoesDriftLegado;
|
|
140
|
+
};
|
|
141
|
+
export declare function criarResultadoDriftNaoExecutado(contextoProjeto: ContextoProjetoCarregado, opcoes?: OpcoesDriftLegado): ResultadoDriftIa;
|
|
127
142
|
export declare function normalizarTamanhoResumo(args: string[]): TamanhoResumoIa;
|
|
128
143
|
export declare function normalizarModoResumo(valor?: string): ModoResumoIa;
|
|
129
144
|
export declare function descobrirDocsIa(): Promise<DescobertaDocsIa>;
|
package/dist/index.part01.js
CHANGED
|
@@ -60,20 +60,47 @@ export function ajuda() {
|
|
|
60
60
|
"sema profile validar workflow contratos/sema/workflow_ops.sema --maturidade production --preset webhook --artefato-arquivo workflow.md --json",
|
|
61
61
|
"sema profile validar ops contratos/sema/workflow_ops.sema --maturidade critical --preset deploy --artefato-arquivo runbook.md --json",
|
|
62
62
|
"sema profile validar game contratos/sema/game.sema --maturidade prototype --preset playtest --artefato-arquivo playtest.md --json",
|
|
63
|
+
"sema profile validar simulation contratos/sema/simulation.sema --maturidade production --preset calibration --artefato-arquivo calibration.md --json",
|
|
63
64
|
"sema profile validar redacao contratos/sema/redator.sema --maturidade production --preset seo --artefato-arquivo materia.md --json",
|
|
64
65
|
"sema profile validar propostas contratos/sema/propostas_comerciais.sema --maturidade production --preset score90 --artefato-arquivo proposta.md --json",
|
|
65
66
|
"sema profile validar conversas contratos/sema/conversas.sema --maturidade production --preset vendas --artefato-arquivo conversa.md --json",
|
|
66
67
|
"sema profile capabilities --json",
|
|
67
68
|
"sema rule-packs --profile legal --json",
|
|
68
69
|
"",
|
|
69
|
-
"[5]
|
|
70
|
+
"[5] Descobrir a capacidade ou pipeline certo",
|
|
71
|
+
"sema descobrir catalogo --json",
|
|
72
|
+
"sema descobrir recomendar --intencao \"validar simulador 3D autonomo calibrado\" --json",
|
|
73
|
+
"sema descobrir explicar simulation.calibrate --json",
|
|
74
|
+
"sema pipeline listar --json",
|
|
75
|
+
"sema capabilities --json",
|
|
76
|
+
"",
|
|
77
|
+
"[6] Modelar jogos e simulações em qualquer combinação espacial, visual e de render",
|
|
78
|
+
"sema interativo capabilities --json",
|
|
79
|
+
"sema interativo schema --json",
|
|
80
|
+
"sema interativo pipelines --json",
|
|
81
|
+
"sema interativo adapters --spatial-model THREE_D --render-mode VISUAL --json",
|
|
82
|
+
"sema interativo validar <definition.json> --json",
|
|
83
|
+
"sema interativo planejar <definition.json> --json",
|
|
84
|
+
"sema interativo validar-evidencias <definition.json> [--plano-arquivo <plan.json>] --bundle-arquivo <bundle.json> --json",
|
|
85
|
+
"sema interativo validar-protocolo <adapter-run.json> --json",
|
|
86
|
+
"sema interativo validar-ir <experience-ir.json> --json",
|
|
87
|
+
"sema interativo consultar-ir <experience-ir.json> --semantic-id <id> --json",
|
|
88
|
+
"sema interativo validar-engine-snapshot <snapshot.json> --json",
|
|
89
|
+
"sema interativo validar-temporal <temporal.json> --json",
|
|
90
|
+
"sema interativo validar-autonomia <cycle.json> --json",
|
|
91
|
+
"sema interativo validar-playtest-fuzz <plan.json> --json",
|
|
92
|
+
"sema interativo validar-multiplayer <model.json> --json",
|
|
93
|
+
"sema interativo analisar-portabilidade <plan.json> --json",
|
|
94
|
+
"sema interativo validar-workers <plan.json> --json",
|
|
95
|
+
"",
|
|
96
|
+
"[7] Orquestrar criação de conteúdo por IA",
|
|
70
97
|
"sema conteudo capabilities --json",
|
|
71
98
|
"sema conteudo validar <definition.json> --json",
|
|
72
99
|
"sema conteudo planejar <definition.json> --alvos-arquivo <targets.json> --json",
|
|
73
100
|
"sema conteudo registrar <ledger.ndjson> --envelope-arquivo <envelope.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-id <id> --expected-head <sha256:...> --json",
|
|
74
101
|
"sema conteudo status <definition.json> --politica-arquivo <policy-envelope.json> --confianca-arquivo <trust.json> --trust-root-digest <sha256:...> --revocation-digest <sha256:...> --ledger-arquivo <ledger.ndjson> --expected-head <sha256:...> --json",
|
|
75
102
|
"",
|
|
76
|
-
"[
|
|
103
|
+
"[8] Adotar Sema em projeto que ainda não usa",
|
|
77
104
|
"sema importar <fonte> <diretorio> --saida <diretorio> --json",
|
|
78
105
|
"sema formatar <arquivo-ou-pasta>",
|
|
79
106
|
"sema validar <arquivo-ou-pasta> --json",
|
|
@@ -87,8 +114,11 @@ export function ajuda() {
|
|
|
87
114
|
]),
|
|
88
115
|
"",
|
|
89
116
|
renderizarSecaoAscii("Comandos principais", [
|
|
90
|
-
"descoberta: sema inspecionar [arquivo-ou-pasta] [--json]",
|
|
91
|
-
"
|
|
117
|
+
"descoberta: sema inspecionar [arquivo-ou-pasta] [--drift <fresh|cache|none>|--com-drift] [--json] (padrão: none)",
|
|
118
|
+
"catálogo: sema descobrir <catalogo|recomendar|explicar> [id] [--intencao <objetivo>] [--json]",
|
|
119
|
+
"pipelines: sema pipeline <listar|descrever> [id] [--json]",
|
|
120
|
+
"todas as capacidades: sema capabilities [--json]",
|
|
121
|
+
"auditoria: sema drift <arquivo-ou-pasta> [--escopo <arquivo|modulo|projeto>] [--cache <auto|refresh|off>] [--incluir-worktrees] [--incluir-consumidores-laterais] [--json]",
|
|
92
122
|
"impacto: sema impacto <arquivo-ou-pasta> --alvo <token> [--mudanca <descricao>] [--escopo <arquivo|modulo|projeto>] [--json]",
|
|
93
123
|
"renomeação: sema renomear-semantico <arquivo-ou-pasta> --de <nome-atual> --para <nome-novo> [--escopo <arquivo|modulo|projeto>] [--json]",
|
|
94
124
|
"importação: sema importar <nestjs|fastapi|flask|nextjs|nextjs-consumer|react-vite-consumer|angular-consumer|flutter-consumer|firebase|dotnet|java|go|rust|cpp|php|typescript|python|dart> <diretorio> [--saida <diretorio>] [--namespace <base>] [--json]",
|
|
@@ -100,16 +130,17 @@ export function ajuda() {
|
|
|
100
130
|
"verificação final: sema verificar <arquivo-ou-pasta> [--saida <diretorio-base>] [--json]",
|
|
101
131
|
"formatação: sema formatar <arquivo-ou-pasta> [--check] [--json]",
|
|
102
132
|
"author: sema author <iniciar|validar|briefing|revisar-cliches|validar-narrativa|validar-proibicoes> [arquivo] [--tema-sensivel] [--preset conto|romance|roteiro|lore|campanha] [--saida <arquivo>] [--texto <texto>] [--json]",
|
|
103
|
-
"profile: sema profile validar <software|workflow|ops|game|legal|research|redacao|propostas|conversas> <arquivo-ou-pasta> [--maturidade draft|prototype|production|critical] [--preset <preset>] [--artefato <texto>|--artefato-arquivo <arquivo>] [--json]",
|
|
133
|
+
"profile: sema profile validar <software|workflow|ops|game|simulation|legal|research|redacao|propostas|conversas> <arquivo-ou-pasta> [--maturidade draft|prototype|production|critical] [--preset <preset>] [--artefato <texto>|--artefato-arquivo <arquivo>] [--json]",
|
|
104
134
|
"capabilities: sema profile capabilities [--json]",
|
|
105
135
|
"conteúdo: sema conteudo <capabilities|validar|planejar|validar-envelope|registrar|status|projetar> [--trust-root-digest <sha256:...>] [--revocation-digest <sha256:...>] [--expected-head <sha256:...>] [opções] [--json]",
|
|
106
|
-
"
|
|
136
|
+
"interativo: sema interativo <capabilities|schema|pipelines|adapters|validar|planejar|validar-evidencias|status|validar-protocolo|extensões-P0-P2> [opções] [--json]",
|
|
137
|
+
"rule packs: sema rule-packs [--profile <author|software|workflow|ops|game|simulation|legal|research|redacao|propostas|conversas>] [--json]",
|
|
107
138
|
]),
|
|
108
139
|
"",
|
|
109
140
|
renderizarSecaoAscii("Ajuda IA-first", [
|
|
110
141
|
"sema ajuda-ia",
|
|
111
142
|
"sema starter-ia",
|
|
112
|
-
"sema resumo <arquivo-ou-pasta> [--micro|--curto|--medio] [--para <resumo|onboarding|review|mudanca|bug|arquitetura>] [--saida <diretorio>] [--raiz] [--json]",
|
|
143
|
+
"sema resumo <arquivo-ou-pasta> [--micro|--curto|--medio] [--para <resumo|onboarding|review|mudanca|bug|arquitetura>] [--drift <fresh|cache|none>] [--saida <diretorio>] [--raiz] [--json]",
|
|
113
144
|
"sema prompt-curto <arquivo-ou-pasta> [--micro|--curto|--medio] [--para <resumo|onboarding|review|mudanca|bug|arquitetura>] [--json]",
|
|
114
145
|
"sema prompt-ia",
|
|
115
146
|
"sema prompt-ia-ui",
|
|
@@ -127,6 +158,10 @@ export function ajuda() {
|
|
|
127
158
|
"sema author validar-proibicoes <arquivo.sema> [--texto <texto>|--texto-arquivo <arquivo>] [--json]",
|
|
128
159
|
"sema profile validar <profile> <arquivo.sema> [--maturidade draft|prototype|production|critical] [--preset <preset>] [--artefato <texto>|--artefato-arquivo <arquivo>] [--json]",
|
|
129
160
|
"sema profile capabilities [--json]",
|
|
161
|
+
"sema descobrir <catalogo|recomendar|explicar> [id] [--intencao <objetivo>] [--json]",
|
|
162
|
+
"sema pipeline <listar|descrever> [id] [--json]",
|
|
163
|
+
"sema capabilities [--json]",
|
|
164
|
+
"sema interativo <capabilities|schema|pipelines|adapters|validar|planejar|validar-evidencias|status|validar-protocolo|extensões-P0-P2> [opções] [--json]",
|
|
130
165
|
"sema conteudo <capabilities|validar|planejar|validar-envelope|registrar|status|projetar> [--trust-root-digest <sha256:...>] [--revocation-digest <sha256:...>] [--expected-head <sha256:...>] [opções] [--json]",
|
|
131
166
|
"sema rule-packs [--profile <profile>] [--json]",
|
|
132
167
|
]),
|
|
@@ -137,12 +172,88 @@ export function ajuda() {
|
|
|
137
172
|
]),
|
|
138
173
|
].join("\n");
|
|
139
174
|
}
|
|
140
|
-
export function
|
|
175
|
+
export function normalizarModoAnaliseDriftCli(args, padrao = "fresh") {
|
|
176
|
+
const valor = obterOpcao(args, "--drift");
|
|
177
|
+
if (valor === undefined)
|
|
178
|
+
return possuiFlag(args, "--com-drift") ? "fresh" : padrao;
|
|
179
|
+
if (valor === "fresh" || valor === "cache" || valor === "none")
|
|
180
|
+
return valor;
|
|
181
|
+
throw new Error("Use --drift fresh, --drift cache ou --drift none.");
|
|
182
|
+
}
|
|
183
|
+
export function normalizarPoliticaCacheDriftCli(args) {
|
|
184
|
+
const valor = obterOpcao(args, "--cache");
|
|
185
|
+
if (valor === undefined)
|
|
186
|
+
return undefined;
|
|
187
|
+
if (valor === "auto" || valor === "refresh" || valor === "off")
|
|
188
|
+
return valor;
|
|
189
|
+
throw new Error("Use --cache auto, --cache refresh ou --cache off.");
|
|
190
|
+
}
|
|
191
|
+
export function resolverOpcoesDriftCli(args, cacheForcado) {
|
|
141
192
|
const escopo = obterOpcao(args, "--escopo");
|
|
193
|
+
const cache = cacheForcado ?? normalizarPoliticaCacheDriftCli(args);
|
|
142
194
|
return {
|
|
143
195
|
escopo: escopo === "arquivo" || escopo === "modulo" || escopo === "projeto" ? escopo : undefined,
|
|
144
196
|
ignorarWorktrees: !possuiFlag(args, "--incluir-worktrees"),
|
|
145
197
|
ignorarConsumidoresLaterais: !possuiFlag(args, "--incluir-consumidores-laterais"),
|
|
198
|
+
...(cache ? { cache } : {}),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
export function resolverAnaliseDriftCli(args, padrao = "fresh") {
|
|
202
|
+
const modo = normalizarModoAnaliseDriftCli(args, padrao);
|
|
203
|
+
const cache = modo === "fresh" ? "refresh" : modo === "cache" ? "auto" : undefined;
|
|
204
|
+
return {
|
|
205
|
+
modo,
|
|
206
|
+
opcoes: resolverOpcoesDriftCli(args, cache),
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
export function criarResultadoDriftNaoExecutado(contextoProjeto, opcoes) {
|
|
210
|
+
const escopo = opcoes?.escopo === "arquivo" || opcoes?.escopo === "projeto" ? opcoes.escopo : "modulo";
|
|
211
|
+
return {
|
|
212
|
+
comando: "drift",
|
|
213
|
+
sucesso: false,
|
|
214
|
+
escopo_aplicado: {
|
|
215
|
+
escopo,
|
|
216
|
+
ignorarWorktrees: opcoes?.ignorarWorktrees !== false,
|
|
217
|
+
ignorarConsumidoresLaterais: opcoes?.ignorarConsumidoresLaterais !== false,
|
|
218
|
+
termosEscopo: [],
|
|
219
|
+
},
|
|
220
|
+
consumerFramework: null,
|
|
221
|
+
appRoutes: [],
|
|
222
|
+
consumerSurfaces: [],
|
|
223
|
+
consumerBridges: [],
|
|
224
|
+
modulos: contextoProjeto.modulosSelecionados.map((item) => ({
|
|
225
|
+
caminho: item.caminho,
|
|
226
|
+
modulo: item.resultado.modulo?.nome ?? null,
|
|
227
|
+
tasks: item.resultado.ir?.tasks.length ?? 0,
|
|
228
|
+
routes: item.resultado.ir?.routes.length ?? 0,
|
|
229
|
+
})),
|
|
230
|
+
tasks: [],
|
|
231
|
+
impls_validos: [],
|
|
232
|
+
impls_quebrados: [],
|
|
233
|
+
vinculos_validos: [],
|
|
234
|
+
vinculos_quebrados: [],
|
|
235
|
+
rotas_divergentes: [],
|
|
236
|
+
recursos_validos: [],
|
|
237
|
+
recursos_divergentes: [],
|
|
238
|
+
persistencia_real: [],
|
|
239
|
+
resumo_operacional: {
|
|
240
|
+
scoreMedio: 0,
|
|
241
|
+
confiancaGeral: "baixa",
|
|
242
|
+
pontuacaoMinimaOperacional: 80,
|
|
243
|
+
pontuacaoAlvoAtual: 80,
|
|
244
|
+
pontuacaoAlvoFinal: 100,
|
|
245
|
+
passoEvolucaoPontuacao: 0.5,
|
|
246
|
+
proximaPontuacaoAlvo: 80,
|
|
247
|
+
pontuacaoAbaixoDoPiso: false,
|
|
248
|
+
pontuacaoAbaixoDoAlvo: false,
|
|
249
|
+
travasPontuacao: [],
|
|
250
|
+
riscosPrincipais: ["analise_drift_nao_executada"],
|
|
251
|
+
oQueTocar: [],
|
|
252
|
+
oQueValidar: ["executar sema drift antes de concluir sobre a implementação"],
|
|
253
|
+
oQueEstaFrouxo: ["codigo_nao_verificado_neste_modo"],
|
|
254
|
+
oQueFoiInferido: ["modo_contratos_apenas"],
|
|
255
|
+
},
|
|
256
|
+
diagnosticos: [],
|
|
146
257
|
};
|
|
147
258
|
}
|
|
148
259
|
export function normalizarTamanhoResumo(args) {
|
package/dist/index.part02.js
CHANGED
|
@@ -320,27 +320,27 @@ export function criarBriefingMinimo(resumo, modo, tamanho) {
|
|
|
320
320
|
}
|
|
321
321
|
export function criarPromptCurtoModulo(resumo, modo, tamanho, capacidade) {
|
|
322
322
|
const resumoTexto = renderizarResumoModuloTexto(resumo, tamanho, modo).trim();
|
|
323
|
-
return `Você está operando Sema em modo IA-first.
|
|
324
|
-
|
|
325
|
-
Esta linguagem existe para traduzir intenção operacional em contrato consumível por IA. Humanos aprovam; agentes operam.
|
|
326
|
-
|
|
327
|
-
Capacidade alvo: ${capacidade}
|
|
328
|
-
Modo da tarefa: ${modo}
|
|
329
|
-
|
|
330
|
-
Regras:
|
|
331
|
-
- não invente sintaxe nem bloco fora da gramática oficial
|
|
332
|
-
- preserve a intenção do contrato
|
|
333
|
-
- use este resumo como fonte compacta inicial
|
|
334
|
-
- se a tarefa pedir mais contexto, rode \`sema contexto-ia <arquivo.sema> --saida <diretorio> --json\` e então abra \`briefing.min.json\`, \`drift.json\` e \`ir.json\` nessa saída
|
|
335
|
-
- não saia editando software vivo sem olhar risco, lacuna e checks sugeridos
|
|
336
|
-
- se abrir código com \`SEMA-GOVERNED\`, volte ao contrato e chame Sema antes de editar
|
|
337
|
-
- não crie nem conclua código governado acima de ${LIMITE_BLOQUEIO_LINHAS_CODIGO_GOVERNADO} linhas; acima de ${LIMITE_AVISO_LINHAS_CODIGO_GOVERNADO}, planeje divisão; documentação Markdown não entra nesse limite de código
|
|
338
|
-
- não crie nem edite contrato .sema acima de ${LIMITE_BLOQUEIO_LINHAS_CONTRATO_SEMA} linhas; acima de ${LIMITE_AVISO_LINHAS_CONTRATO_SEMA}, planeje split por domínio/capacidade, nunca parte_1/parte_2
|
|
339
|
-
- vários contratos .sema podem governar o mesmo arquivo por vinculos; Sema Código deve preservar essa rastreabilidade
|
|
340
|
-
${resumo.consumerFramework ? "- se for tarefa visual consumer, priorize `appRoutes`, `consumerSurfaces` e `consumerBridges` antes de abrir arquivos aleatórios" : ""}
|
|
341
|
-
|
|
342
|
-
Contexto compacto:
|
|
343
|
-
${resumoTexto}
|
|
323
|
+
return `Você está operando Sema em modo IA-first.
|
|
324
|
+
|
|
325
|
+
Esta linguagem existe para traduzir intenção operacional em contrato consumível por IA. Humanos aprovam; agentes operam.
|
|
326
|
+
|
|
327
|
+
Capacidade alvo: ${capacidade}
|
|
328
|
+
Modo da tarefa: ${modo}
|
|
329
|
+
|
|
330
|
+
Regras:
|
|
331
|
+
- não invente sintaxe nem bloco fora da gramática oficial
|
|
332
|
+
- preserve a intenção do contrato
|
|
333
|
+
- use este resumo como fonte compacta inicial
|
|
334
|
+
- se a tarefa pedir mais contexto, rode \`sema contexto-ia <arquivo.sema> --saida <diretorio> --json\` e então abra \`briefing.min.json\`, \`drift.json\` e \`ir.json\` nessa saída
|
|
335
|
+
- não saia editando software vivo sem olhar risco, lacuna e checks sugeridos
|
|
336
|
+
- se abrir código com \`SEMA-GOVERNED\`, volte ao contrato e chame Sema antes de editar
|
|
337
|
+
- não crie nem conclua código governado acima de ${LIMITE_BLOQUEIO_LINHAS_CODIGO_GOVERNADO} linhas; acima de ${LIMITE_AVISO_LINHAS_CODIGO_GOVERNADO}, planeje divisão; documentação Markdown não entra nesse limite de código
|
|
338
|
+
- não crie nem edite contrato .sema acima de ${LIMITE_BLOQUEIO_LINHAS_CONTRATO_SEMA} linhas; acima de ${LIMITE_AVISO_LINHAS_CONTRATO_SEMA}, planeje split por domínio/capacidade, nunca parte_1/parte_2
|
|
339
|
+
- vários contratos .sema podem governar o mesmo arquivo por vinculos; Sema Código deve preservar essa rastreabilidade
|
|
340
|
+
${resumo.consumerFramework ? "- se for tarefa visual consumer, priorize `appRoutes`, `consumerSurfaces` e `consumerBridges` antes de abrir arquivos aleatórios" : ""}
|
|
341
|
+
|
|
342
|
+
Contexto compacto:
|
|
343
|
+
${resumoTexto}
|
|
344
344
|
`;
|
|
345
345
|
}
|
|
346
346
|
//# sourceMappingURL=index.part02.js.map
|
package/dist/index.part03.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type IrModulo } from "@sema/nucleo";
|
|
2
2
|
import { analisarDriftLegado } from "./drift.js";
|
|
3
3
|
import { type GuiaCapacidadeIaMap } from './agentContextTipos.js';
|
|
4
|
-
import { PacoteContextoModuloIa, ResumoSemanticoModuloIa } from "./index.part01.js";
|
|
4
|
+
import { PacoteContextoModuloIa, ResumoSemanticoModuloIa, type ModoAnaliseDriftCli } from "./index.part01.js";
|
|
5
5
|
export declare function renderizarResumoProjetoMarkdown(geradoEm: string, modulos: ResumoSemanticoModuloIa[], guiaPorCapacidade: GuiaCapacidadeIaMap): string;
|
|
6
6
|
export declare function falharContextoIa(mensagem: string): never;
|
|
7
7
|
export declare function garantirArquivoSema(caminhoArquivo: string): void;
|
|
@@ -52,7 +52,7 @@ export declare function criarBriefingAgente(arquivo: string, modulo: string, ir:
|
|
|
52
52
|
ancoragensVinculo: string[];
|
|
53
53
|
testesMinimos: string[];
|
|
54
54
|
};
|
|
55
|
-
export declare function carregarContextoModuloIa(arquivoEntrada: string): Promise<PacoteContextoModuloIa>;
|
|
55
|
+
export declare function carregarContextoModuloIa(arquivoEntrada: string, args?: string[], modoDriftPadrao?: ModoAnaliseDriftCli): Promise<PacoteContextoModuloIa>;
|
|
56
56
|
export declare const ARQUIVOS_RESUMO_MODULO_IA: readonly ["SEMA_BOOT.md", "SEMA_SMALL_MODEL.md", "agent-context-pack.json", "resumo.micro.txt", "resumo.curto.txt", "resumo.md", "briefing.min.json", "prompt-curto.txt"];
|
|
57
57
|
export declare function gerarArquivosResumoModuloIa(contexto: PacoteContextoModuloIa, pastaBase: string): Promise<{
|
|
58
58
|
artefatosCompactos: string[];
|
package/dist/index.part03.js
CHANGED
|
@@ -8,6 +8,7 @@ import { criarEntradaCanonicaProjeto } from './agentContext.js';
|
|
|
8
8
|
import { renderizarSemaBoot, renderizarSemaSmallModel, } from './agentEntryPoints.js';
|
|
9
9
|
import { escreverArquivoWorkspaceSeguro, validarDestinosEscritaWorkspace } from './workspaceWrite.js';
|
|
10
10
|
import { resumirListaTexto } from './textoListas.js';
|
|
11
|
+
import { criarResultadoDriftNaoExecutado, resolverAnaliseDriftCli, } from "./index.part01.js";
|
|
11
12
|
import { coletarResumoSemanticoModulo, criarBriefingMinimo, criarPromptCurtoModulo, renderizarResumoModuloMarkdown, renderizarResumoModuloTexto } from "./index.part02.js";
|
|
12
13
|
export function renderizarResumoProjetoMarkdown(geradoEm, modulos, guiaPorCapacidade) {
|
|
13
14
|
const entradaCanonica = criarEntradaCanonicaProjeto(guiaPorCapacidade);
|
|
@@ -253,10 +254,11 @@ export function criarBriefingAgente(arquivo, modulo, ir, resumoDrift, resultadoD
|
|
|
253
254
|
],
|
|
254
255
|
};
|
|
255
256
|
}
|
|
256
|
-
export async function carregarContextoModuloIa(arquivoEntrada) {
|
|
257
|
+
export async function carregarContextoModuloIa(arquivoEntrada, args = [], modoDriftPadrao = "fresh") {
|
|
257
258
|
const arquivo = path.resolve(arquivoEntrada);
|
|
258
259
|
garantirArquivoSema(arquivo);
|
|
259
|
-
const
|
|
260
|
+
const analiseDrift = resolverAnaliseDriftCli(args, modoDriftPadrao);
|
|
261
|
+
const contextoProjeto = await carregarProjeto(arquivo, process.cwd(), { escopo: analiseDrift.opcoes.escopo });
|
|
260
262
|
const resultadoModulo = contextoProjeto.modulosSelecionados.find((item) => path.resolve(item.caminho) === arquivo)?.resultado;
|
|
261
263
|
if (!resultadoModulo) {
|
|
262
264
|
falharContextoIa(`Nao foi possivel encontrar o modulo correspondente ao arquivo ${arquivo}.`);
|
|
@@ -264,12 +266,19 @@ export async function carregarContextoModuloIa(arquivoEntrada) {
|
|
|
264
266
|
const sucesso = !temErros(resultadoModulo.diagnosticos);
|
|
265
267
|
const modulo = resultadoModulo.modulo?.nome ?? path.basename(arquivo, ".sema");
|
|
266
268
|
const geradoEm = new Date().toISOString();
|
|
267
|
-
const resultadoDrift =
|
|
269
|
+
const resultadoDrift = analiseDrift.modo === "none"
|
|
270
|
+
? criarResultadoDriftNaoExecutado(contextoProjeto, analiseDrift.opcoes)
|
|
271
|
+
: await analisarDriftLegado(contextoProjeto, analiseDrift.opcoes);
|
|
268
272
|
const drift = {
|
|
269
273
|
comando: "drift",
|
|
270
274
|
caminho: arquivo,
|
|
271
275
|
modulo: resultadoModulo.modulo?.nome ?? null,
|
|
272
276
|
sucesso: resultadoDrift.sucesso,
|
|
277
|
+
modoAnalise: analiseDrift.modo,
|
|
278
|
+
executado: analiseDrift.modo !== "none",
|
|
279
|
+
aviso: analiseDrift.modo === "none"
|
|
280
|
+
? "Análise de drift não executada; nenhuma conclusão sobre o código foi produzida."
|
|
281
|
+
: null,
|
|
273
282
|
resumo: resumirDriftPorModulo(resultadoModulo.modulo?.nome ?? null, arquivo, resultadoDrift),
|
|
274
283
|
drift: resultadoDrift,
|
|
275
284
|
};
|
|
@@ -321,6 +330,8 @@ export async function carregarContextoModuloIa(arquivoEntrada) {
|
|
|
321
330
|
irJson: ir,
|
|
322
331
|
drift,
|
|
323
332
|
briefing,
|
|
333
|
+
modoVerificacaoCodigo: analiseDrift.modo === "none" ? "contratos_apenas" : undefined,
|
|
334
|
+
fontesConclusao: analiseDrift.modo === "none" ? ["contrato"] : undefined,
|
|
324
335
|
};
|
|
325
336
|
}
|
|
326
337
|
export const ARQUIVOS_RESUMO_MODULO_IA = [
|
package/dist/index.part04.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type GuiaCapacidadeIaMap } from './agentContextTipos.js';
|
|
2
|
-
import { ContextoIaGerado, ResumoSemanticoModuloIa } from "./index.part01.js";
|
|
2
|
+
import { ContextoIaGerado, ResumoSemanticoModuloIa, type ModoAnaliseDriftCli } from "./index.part01.js";
|
|
3
3
|
export declare const ARQUIVOS_RESUMO_PROJETO_IA: readonly ["SEMA_BOOT.md", "SEMA_SMALL_MODEL.md", "SEMA_BRIEF.md", "SEMA_BRIEF.micro.txt", "SEMA_BRIEF.curto.txt", "SEMA_INDEX.json", "AGENT_CONTEXT_PACK.json", "docs/ai-integration.md"];
|
|
4
|
-
export declare function gerarResumoProjetoIa(entrada: string | undefined, pastaSaidaOpcional?: string, escreverNaRaiz?: boolean): Promise<{
|
|
4
|
+
export declare function gerarResumoProjetoIa(entrada: string | undefined, pastaSaidaOpcional?: string, escreverNaRaiz?: boolean, args?: string[], modoDriftPadrao?: ModoAnaliseDriftCli): Promise<{
|
|
5
5
|
geradoEm: string;
|
|
6
6
|
baseProjeto: string;
|
|
7
7
|
pastaSaida: string;
|