@zaip-ai/cli 5.3.0 → 5.5.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 (64) hide show
  1. package/dist/services/adapters.d.ts +1 -1
  2. package/dist/services/adapters.js +1 -1
  3. package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
  4. package/dist/services/codex-conversation-lifecycle-hook.js +37 -8
  5. package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
  6. package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
  7. package/dist/services/codex-pre-tool-hook-template.js +44 -8
  8. package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
  9. package/package.json +1 -1
  10. package/templates/.agents/README-ENG.md +12 -0
  11. package/templates/.agents/README.md +12 -0
  12. package/templates/.agents/config/agents/discovery.json +1 -1
  13. package/templates/.agents/dashboard/.zaip-managed.json +31 -31
  14. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-URSe1IiF.js → DashboardHelpDialog-Crv8oLKH.js} +13 -1
  15. package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-8znf56to.js → PricingSettingsDialog-De3_oOUB.js} +1 -1
  16. package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-O68yx0KF.js → ProjectSettingsPage-HNZfT9Xo.js} +1 -1
  17. package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-DlYlyBhz.js → TraceabilityWorkspace-D4tioTQ5.js} +1 -1
  18. package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-DhvlkPf2.js → dashboard-localization-BbNU69xZ.js} +12 -0
  19. package/templates/.agents/dashboard/apps/frontend/dist/assets/{index-CWcci-bM.js → index-oqGtXP7j.js} +2 -2
  20. package/templates/.agents/dashboard/apps/frontend/dist/index.html +1 -1
  21. package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
  22. package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
  23. package/templates/.agents/dashboard/modules/operations/package.json +1 -1
  24. package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
  25. package/templates/.agents/dashboard/packages/branding/package.json +1 -1
  26. package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
  27. package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
  28. package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +162 -161
  29. package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +59 -59
  30. package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
  31. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +162 -161
  32. package/templates/.agents/dashboard/packages/ui/package.json +1 -1
  33. package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
  34. package/templates/.agents/design/.zaip-managed.json +3 -3
  35. package/templates/.agents/design/apps/catalog/package.json +1 -1
  36. package/templates/.agents/design/packages/local-runtime/package.json +1 -1
  37. package/templates/.agents/requirements/autonomous-assurance.md +1 -1
  38. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
  39. package/templates/.agents/requirements/comparative-audit.md +1 -1
  40. package/templates/.agents/requirements/context-engine.md +1 -1
  41. package/templates/.agents/requirements/cost-observability.md +1 -1
  42. package/templates/.agents/requirements/dashboard-launch.md +1 -1
  43. package/templates/.agents/requirements/data-export.md +1 -1
  44. package/templates/.agents/requirements/design-system.md +1 -1
  45. package/templates/.agents/requirements/execution-engine.md +1 -1
  46. package/templates/.agents/requirements/kanban-dashboard.md +1 -1
  47. package/templates/.agents/requirements/model-orchestration.md +1 -1
  48. package/templates/.agents/requirements/public-distribution.md +1 -1
  49. package/templates/.agents/requirements/software-architecture.md +1 -1
  50. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  51. package/templates/.agents/requirements/work-lifecycle.md +1 -1
  52. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  53. package/templates/.agents/runtime/VERSION +1 -1
  54. package/templates/.agents/runtime/bin/zaip.mjs +99 -33
  55. package/templates/.agents/runtime/checksums.sha256 +5 -5
  56. package/templates/.agents/runtime/manifest.json +1 -1
  57. package/templates/.agents/runtime/provenance.json +4 -4
  58. package/templates/.agents/runtime/sbom.cdx.json +1 -1
  59. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +2 -0
  60. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs +1 -1
  61. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-publication-intent.test.mjs +14 -0
  62. package/templates/.agents/skills/zaip-skill-task/references/commit-policy.md +9 -0
  63. package/templates/.agents/zaip-aios/VERSION +1 -1
  64. package/templates/template-manifest.json +68 -68
@@ -1,3 +1,3 @@
1
- import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,_ as n,v as r,w as i,y as a}from"./cost-monitor-B0Jwz_rk.js";import{t as o}from"./index-CWcci-bM.js";var s=e(t(),1),c=i();function l({children:e,className:t=``,title:n}){return(0,c.jsxs)(`section`,{className:`project-settings-card ${t}`,children:[(0,c.jsx)(`h2`,{children:n}),(0,c.jsx)(`div`,{className:`project-settings-fields`,children:e})]})}function u({children:e,className:t=``,hint:n,label:r}){return(0,c.jsxs)(`div`,{className:`project-settings-field ${t}`,children:[(0,c.jsx)(`span`,{children:r}),e,n?(0,c.jsx)(`small`,{children:n}):null]})}var d=[{id:`primary_language`,defaultName:`TypeScript`,scope:`backend`},{id:`backend_runtime`,defaultName:`Node.js`,scope:`backend`},{id:`backend_api`,defaultName:`Hono`,scope:`backend`},{id:`query_builder`,defaultName:`Kysely`,scope:`backend`},{id:`database`,defaultName:`PostgreSQL via Supabase`,scope:`backend`},{id:`auth_storage`,defaultName:`Supabase Auth + Storage`,scope:`backend`},{id:`cache_messaging`,defaultName:`Redis`,scope:`backend`},{id:`async_queue`,defaultName:`BullMQ`,scope:`backend`},{id:`backend_infrastructure`,defaultName:`Terraform`,scope:`backend`},{id:`backend_hosting`,defaultName:`Hostinger VPS`,scope:`backend`},{id:`web_framework`,defaultName:`React`,scope:`frontend`},{id:`web_language`,defaultName:`TypeScript`,scope:`frontend`},{id:`web_build`,defaultName:`Vite`,scope:`frontend`},{id:`frontend_hosting`,defaultName:`Cloudflare Pages`,scope:`frontend`},{id:`site_framework`,defaultName:`Astro`,scope:`site`},{id:`site_language`,defaultName:`TypeScript`,scope:`site`},{id:`site_islands`,defaultName:`React Islands`,scope:`site`},{id:`site_build`,defaultName:`Vite`,scope:`site`},{id:`site_hosting`,defaultName:`Cloudflare Pages`,scope:`site`},{id:`prometheus`,defaultName:`Prometheus`,scope:`observability`},{id:`grafana`,defaultName:`Grafana`,scope:`observability`},{id:`uptime_kuma`,defaultName:`Uptime Kuma`,scope:`observability`},{id:`cadvisor`,defaultName:`cAdvisor`,scope:`observability`},{id:`node_exporter`,defaultName:`node-exporter`,scope:`observability`},{id:`redis_exporter`,defaultName:`Redis Exporter`,scope:`observability`},{id:`k6`,defaultName:`k6`,scope:`testing`},{id:`autocannon`,defaultName:`autocannon`,scope:`testing`}],f=new Set([`database`,`auth_storage`,`backend_hosting`,`frontend_hosting`,`site_hosting`]);function p(e){return f.has(e)}function m(e){let{languages:t,components:n,...r}=e.stack.overrides,i=w(n)?n:{};return{components:Object.fromEntries(d.map(e=>{let t=i[e.id],n=w(t)?t:{};return[e.id,{name:C(n.name)||e.defaultName,version:C(n.version),reference:C(n.reference)}]})),otherOverrides:JSON.stringify(r,null,2)}}function h(e,t){let n=new Map(t.filter(e=>e.installation===`installed`&&e.version!==null).map(e=>[e.name.toLowerCase(),e.version]));return Object.fromEntries(d.map(t=>{let r=e[t.id],i=n.get(x(t.id));return[t.id,r.version!==``||i===void 0?r:{...r,version:i}]}))}function g(e,t,n){if(e.autonomy?.version===1&&e.execution&&e.execution.runtime!==`manual`&&e.execution.runtime!==`codex_native`&&e.execution.autonomous.provider!==`codex`)throw Error(`Autonomy-v1 exige Codex na execução gerenciada / requires Codex for managed execution. Selecione Codex; conversas diretas continuam disponíveis.`);let r=JSON.parse(n);if(!w(r))throw Error(`Demais overrides deve ser um objeto JSON.`);let{languages:i,components:a,...o}=r;for(let e of d){let n=t[e.id].version.trim();if(n!==``&&!p(e.id)&&!/^\d+\.\d+(?:\.\d+)?(?:[-+][0-9A-Za-z.-]+)?$/.test(n))throw Error(`A versão de ${t[e.id].name||e.defaultName} deve ser exata, como 22.16.0 ou 17.6, sem ^, ~, >= ou latest.`);if(p(e.id)&&(n.length>120||/[\r\n]/.test(n)))throw Error(`A referência de ${t[e.id].name||e.defaultName} deve ter uma única linha com até 120 caracteres.`)}let s=Object.fromEntries(d.map(e=>[e.id,{name:t[e.id].name.trim()||e.defaultName,version:t[e.id].version.trim(),reference:t[e.id].reference.trim()}])),c=w(e.stack.overrides.components)?e.stack.overrides.components:{};return{...e,stack:{...e.stack,overrides:{...o,components:{...c,...s},languages:{frontend:S(s,`frontend`),backend:S(s,`backend`),site:S(s,`site`)}}}}}function _(e){return[...new Set(e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean))]}function v(){return{runtime:`autonomous`,autonomous:{provider:`codex`,model:`gpt-6-sol`,max_parallelism:1,lease_ms:6e4}}}function y(e){if(e===`manual`)return{runtime:`manual`};if(e===`codex_native`)return{runtime:`codex_native`};if(e!==`managed`&&e!==`autonomous`)throw Error(`Unknown runtime: ${e}`);return{...v(),runtime:e}}function b(e){let t=e?.match(/^v?(\d+)\.(\d+)\.\d+(?:[-+][0-9A-Za-z.-]+)?$/);return t?`v${t[1]}.${t[2]}`:null}function x(e){return e===`backend_runtime`?`node.js`:e===`backend_api`?`hono`:e===`site_framework`?`astro`:e===`cache_messaging`?`redis`:e===`async_queue`?`bullmq`:e===`web_framework`||e===`site_islands`?`react`:e===`web_build`||e===`site_build`?`vite`:e===`primary_language`||e===`web_language`||e===`site_language`?`typescript`:``}function S(e,t){return[...new Set(d.filter(e=>e.scope===t).map(t=>e[t.id].name.trim()).filter(Boolean))]}function C(e){return typeof e==`string`?e:``}function w(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var T={primary_language:{pt:`Linguagem principal`,en:`Primary language`},backend_runtime:{pt:`Runtime backend`,en:`Backend runtime`},backend_api:{pt:`Framework backend / API`,en:`Backend framework / API`},query_builder:{pt:`Query builder`,en:`Query builder`},database:{pt:`Banco de dados`,en:`Database`},auth_storage:{pt:`Autenticação e Storage`,en:`Authentication and Storage`},cache_messaging:{pt:`Cache e mensageria`,en:`Cache and messaging`},async_queue:{pt:`Filas e processamento assíncrono`,en:`Queues and async processing`},backend_infrastructure:{pt:`Infraestrutura backend`,en:`Backend infrastructure`},backend_hosting:{pt:`Hospedagem do backend`,en:`Backend hosting`},web_framework:{pt:`Framework do Web App`,en:`Web App framework`},web_language:{pt:`Linguagem do Web App`,en:`Web App language`},web_build:{pt:`Build do Web App`,en:`Web App build`},frontend_hosting:{pt:`Hospedagem do frontend`,en:`Frontend hosting`},site_framework:{pt:`Framework do site`,en:`Site framework`},site_language:{pt:`Linguagem do site`,en:`Site language`},site_islands:{pt:`Componentes interativos`,en:`Interactive components`},site_build:{pt:`Build do site`,en:`Site build`},site_hosting:{pt:`Hospedagem do site`,en:`Site hosting`},prometheus:{pt:`Coleta de métricas`,en:`Metrics collection`},grafana:{pt:`Dashboards`,en:`Dashboards`},uptime_kuma:{pt:`Monitoramento de disponibilidade`,en:`Availability monitoring`},cadvisor:{pt:`Métricas de containers`,en:`Container metrics`},node_exporter:{pt:`Métricas de host`,en:`Host metrics`},redis_exporter:{pt:`Métricas do Redis`,en:`Redis metrics`},k6:{pt:`Teste de carga`,en:`Load testing`},autocannon:{pt:`Teste HTTP de carga`,en:`HTTP load testing`}};function E({components:e,locale:t,onChange:n,referenceHint:r,versionHint:i}){let a=[{scope:`backend`,title:t===`pt-BR`?`Backend e dados`:`Backend and data`},{scope:`frontend`,title:`Web App`},{scope:`site`,title:t===`pt-BR`?`Site e landing pages`:`Site and landing pages`},{scope:`observability`,title:t===`pt-BR`?`Observabilidade`:`Observability`},{scope:`testing`,title:t===`pt-BR`?`Testes sob demanda`:`On-demand testing`}],o=(t,r,i)=>n({...e,[t]:{...e[t],[r]:i}});return(0,c.jsxs)(`div`,{className:`project-stack-editor`,children:[a.map(n=>(0,c.jsxs)(`section`,{children:[(0,c.jsx)(`h3`,{children:n.title}),(0,c.jsxs)(`div`,{className:`project-stack-table`,children:[(0,c.jsxs)(`div`,{className:`project-stack-table-head`,"aria-hidden":`true`,children:[(0,c.jsx)(`span`,{children:`Item`}),(0,c.jsx)(`span`,{children:t===`pt-BR`?`Tecnologia`:`Technology`}),(0,c.jsx)(`span`,{children:t===`pt-BR`?`Versão atual / referência`:`Current version / reference`}),(0,c.jsx)(`span`,{children:t===`pt-BR`?`Pacote / imagem / serviço`:`Package / image / service`})]}),d.filter(e=>e.scope===n.scope).map(n=>(0,c.jsxs)(`div`,{className:`project-stack-row`,children:[(0,c.jsx)(`strong`,{children:T[n.id][t===`pt-BR`?`pt`:`en`]}),(0,c.jsx)(`input`,{"aria-label":`${T[n.id].pt}: tecnologia`,value:e[n.id].name,onChange:e=>o(n.id,`name`,e.target.value)}),(0,c.jsx)(`input`,{"aria-label":`${T[n.id].pt}: ${p(n.id)?`versão atual ou referência`:`versão exata`}`,className:p(n.id)?`is-reference-value`:void 0,inputMode:p(n.id)?`text`:`decimal`,placeholder:p(n.id)?t===`pt-BR`?`Serviço em nuvem`:`Cloud service`:`x.y.z`,title:p(n.id)?e[n.id].version:void 0,value:e[n.id].version,onChange:e=>o(n.id,`version`,e.target.value)}),(0,c.jsx)(`input`,{"aria-label":`${T[n.id].pt}: referência`,placeholder:`npm:pacote ou service:nome`,value:e[n.id].reference,onChange:e=>o(n.id,`reference`,e.target.value)})]},n.id))]})]},n.scope)),(0,c.jsxs)(`div`,{className:`project-stack-format-help`,children:[(0,c.jsxs)(`p`,{children:[(0,c.jsx)(`strong`,{children:t===`pt-BR`?`Formato da versão:`:`Version format:`}),` `,i]}),(0,c.jsxs)(`p`,{children:[(0,c.jsx)(`strong`,{children:t===`pt-BR`?`Formato da referência:`:`Reference format:`}),` `,r]})]})]})}function D({components:e,showTitle:t=!0,text:n}){return e.length===0?null:(0,c.jsxs)(`section`,{className:`project-stack-versions`,"aria-label":n.versions,children:[t?(0,c.jsx)(`h3`,{children:n.versions}):null,(0,c.jsx)(`div`,{children:e.map(e=>(0,c.jsxs)(`article`,{children:[(0,c.jsxs)(`div`,{className:`project-stack-version-identity`,children:[(0,c.jsx)(`strong`,{children:e.name}),(0,c.jsxs)(`code`,{children:[n.current,`: `,e.version??n.versionUnavailable]}),e.configured_version!==null&&e.configured_version!==e.version?(0,c.jsxs)(`code`,{children:[n.configured,`: `,e.configured_version]}):null]}),(0,c.jsx)(`span`,{className:`is-${e.verification}`,children:e.installation===`runtime`?n.runtime:e.installation===`installed`?n.installed:e.installation===`bundled`?n.bundled:n.missing}),e.source?(0,c.jsx)(`small`,{children:e.source}):null]},e.name))})]})}function O(e){return{health:e.health??{state:`unknown`,scope:`settings_runtime`},dependencies:k(e.dependencies,e.dependencies?.installed),documentation:k(e.documentation,e.documentation?.available),profile:e.installation_profile??null,hasMissingDependencies:(A(e.dependencies?.missing)??0)>0}}function k(e,t){let n=e?.state??`unknown`,r=A(e?.percent);return{completed:A(t),total:A(e?.applicable),percentage:(n===`complete`||n===`incomplete`)&&r!==null&&r<=100?r:null,state:n}}function A(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:null}function j(e){return e.filter(e=>![`database`,`installation`].includes(e.id))}var M={"pt-BR":{eyebrow:`Configurações`,title:`Configuração do projeto`,intro:`Edite o arquivo central do projeto com validação do schema antes da gravação.`,loading:`Carregando…`,loadError:`Não foi possível carregar as configurações do projeto.`,retry:`Tentar novamente`,back:`Voltar ao dashboard`,save:`Salvar configurações`,saving:`Validando e salvando…`,saved:`Configurações salvas e validadas.`,framework:`Framework ZAIP-AIOS`,frameworkHint:`Ativa ou desativa o framework para este projeto.`,identity:`Identidade do projeto`,workspacePath:`Caminho do projeto`,workspacePathHint:`Pasta local usada por esta instância do Dashboard.`,workspacePathLoading:`Identificando caminho…`,workspacePathUnavailable:`Caminho indisponível`,stack:`Stack e linguagens`,execution:`Execução`,assurance:`Assurance`,executionToggleHint:`Grava ou remove o bloco execution. Sem ele, o projeto usa execução manual.`,runtimeHint:`Managed gerencia PRDs/SPECs e mantém avulsas diretas. Manual não inicia provider; autonomous permite execução gerenciada também para Task avulsa por comando explícito.`,providerHint:`Provider que inicia os agentes da execução autônoma: Codex ou Claude.`,autonomyProviderHint:`Autonomy-v1 exige Codex para execução gerenciada. Claude continua disponível em conversas diretas ou no protocolo legado.`,executionModelHint:`Modelo-base do runtime autônomo. A política automática de PRD/SPEC ainda pode selecionar um modelo permitido por agente.`,parallelismHint:`Teto de agentes simultâneos. O valor efetivo é o menor limite entre projeto, DAG, provider e squad.`,leaseHint:`Tempo de lease configurado para o coordenador autônomo.`,assuranceToggleHint:`Ativa ou remove os gates de evidência, revisão e qualidade do projeto. Recomenda-se manter ativo.`,assuranceVersionHint:`Versão do contrato de assurance. É fixa e somente leitura.`,assuranceDepthHint:`Auto ajusta o rigor ao escopo; base exige o conjunto padrão; elevated amplia validações para mudanças mais abrangentes.`,finalCommitHint:`Exige que as evidências comprovem o commit final integrado. Sinais de produção ou migração ainda podem exigir isso mesmo quando desativado.`,context:`Contexto`,overview:`Visão geral do projeto`,metricLabels:{agents:`Agentes`,squads:`Squads`,skills:`Skills`,rules:`Rules`,hooks:`Hooks`},areaLabels:{brandbook:`Brandbook`,design_system:`Design System`,software_architecture:`Arquitetura de Software`,growth_strategy:`Estratégia de Growth`,marketing_strategy:`Estratégia de Marketing`,sales_playbook:`Playbook de Sales`},available:`Criado`,artifactUnavailable:`Ainda não criado`,componentGuide:`Preencha cada responsabilidade separadamente. Use a versão exata do software e, para serviços em nuvem ou hospedagem, informe Serviço em nuvem.`,versionHint:`Software: 22.16.0 ou 17.6, sem prefixos (^, ~, >=). Serviço gerenciado: Serviço em nuvem. Hospedagem: Serviço em nuvem.`,referenceHint:`Ex.: npm:hono, docker:node:22.16.0-bookworm-slim, service:supabase ou provider:cloudflare-pages.`,overrides:`Opções avançadas (JSON)`,overridesHint:`Use apenas fatos técnicos transversais confirmados. Deixe vazio quando não houver exceções.`,versions:`Versões detectadas no workspace`,exact:`Verificada`,constraint:`Requisito`,versionUnavailable:`Não encontrada`,runtime:`Runtime do Dashboard`,installed:`Instalado no projeto`,missing:`Ausente no projeto`,bundled:`Empacotado no Dashboard`,current:`Atual`,configured:`Configurado`,health:`Saúde`,dependencies:`Dependências técnicas`,documentation:`Documentação`,unknown:`Desconhecido`,unavailable:`Indisponível`,notApplicable:`Não aplicável`,complete:`Completo`,incomplete:`Incompleto`,incompleteInstallation:`Há dependências técnicas locais ausentes neste computador.`,dismiss:`Fechar aviso`,contextGuide:`O contexto começa pelas fontes canônicas e inclui somente arquivos relevantes para a tarefa. Saídas geradas são consultadas apenas em setup, release ou checagem de paridade.`,contextDomains:`Branding, Marketing, Growth e Sales são usados sob demanda pelos respectivos especialistas, quando houver uma tarefa e artefatos desses domínios. Não os adicione aqui apenas por existirem como capacidades.`},"en-US":{eyebrow:`Settings`,title:`Project settings`,intro:`Edit the central project file with schema validation before writing.`,loading:`Loading…`,loadError:`Project settings could not be loaded.`,retry:`Try again`,back:`Back to dashboard`,save:`Save settings`,saving:`Validating and saving…`,saved:`Settings saved and validated.`,framework:`ZAIP-AIOS framework`,frameworkHint:`Enable or disable the framework for this project.`,identity:`Project identity`,workspacePath:`Project path`,workspacePathHint:`Local folder used by this Dashboard instance.`,workspacePathLoading:`Identifying path…`,workspacePathUnavailable:`Path unavailable`,stack:`Stack and languages`,execution:`Execution`,assurance:`Assurance`,executionToggleHint:`Writes or removes the execution block. Without it, the project uses manual execution.`,runtimeHint:`Managed runs PRDs/SPECs while standalone Tasks stay direct. Manual never starts a provider; autonomous also permits explicitly commanded managed standalone execution.`,providerHint:`Provider that starts autonomous execution agents: Codex or Claude.`,autonomyProviderHint:`Autonomy-v1 requires Codex for managed execution. Claude remains available for direct conversations or the legacy protocol.`,executionModelHint:`Base model for the autonomous runtime. PRD/SPEC automatic policy may still select an allowed model per agent.`,parallelismHint:`Maximum simultaneous agents. Effective parallelism is the smallest project, DAG, provider, and squad limit.`,leaseHint:`Lease duration configured for the autonomous coordinator.`,assuranceToggleHint:`Enables or removes project evidence, review, and quality gates. Keeping it enabled is recommended.`,assuranceVersionHint:`Assurance contract version. It is fixed and read-only.`,assuranceDepthHint:`Auto adapts rigor to scope; base uses the standard set; elevated expands validation for broader changes.`,finalCommitHint:`Requires evidence for the final integrated commit. Production or migration signals may still require it when disabled.`,context:`Context`,overview:`Project overview`,metricLabels:{agents:`Agents`,squads:`Squads`,skills:`Skills`,rules:`Rules`,hooks:`Hooks`},areaLabels:{brandbook:`Brandbook`,design_system:`Design System`,software_architecture:`Software Architecture`,growth_strategy:`Growth Strategy`,marketing_strategy:`Marketing Strategy`,sales_playbook:`Sales Playbook`},available:`Created`,artifactUnavailable:`Not created yet`,componentGuide:`Fill each responsibility separately. Use an exact software version and, for cloud services or hosting, enter Cloud service.`,versionHint:`Software: 22.16.0 or 17.6, without prefixes (^, ~, >=). Managed service: Cloud service. Hosting: Cloud service.`,referenceHint:`E.g. npm:hono, docker:node:22.16.0-bookworm-slim, service:supabase, or provider:cloudflare-pages.`,overrides:`Advanced options (JSON)`,overridesHint:`Use only confirmed cross-cutting technical facts. Leave empty when there are no exceptions.`,versions:`Versions detected in the workspace`,exact:`Verified`,constraint:`Requirement`,versionUnavailable:`Not found`,runtime:`Dashboard runtime`,installed:`Installed in project`,missing:`Missing from project`,bundled:`Bundled in Dashboard`,current:`Current`,configured:`Configured`,health:`Health`,dependencies:`Technical dependencies`,documentation:`Documentation`,unknown:`Unknown`,unavailable:`Unavailable`,notApplicable:`Not applicable`,complete:`Complete`,incomplete:`Incomplete`,incompleteInstallation:`Some local technical dependencies are missing on this computer.`,dismiss:`Dismiss notification`,contextGuide:`Context starts from canonical sources and includes only files relevant to the task. Generated outputs are consulted only for setup, release, or parity checks.`,contextDomains:`Branding, Marketing, Growth, and Sales are used on demand by their respective specialists when there is a task and artifacts in those domains. Do not add them here merely because they exist as capabilities.`}},N=`autonomy-v1`,P=n([`essential`,`balanced`,`persistent`]),F=a({version:r(1),preset:P}).strict(),I=Object.freeze({essential:Object.freeze({label:`Essencial`,attempts:4,replans:1,automatic_astra:!1}),balanced:Object.freeze({label:`Equilibrado`,attempts:10,replans:3,automatic_astra:!0}),persistent:Object.freeze({label:`Persistente — ilimitado`,attempts:null,replans:null,automatic_astra:!0})});function L(e){let t=F.parse(e??{version:1,preset:`balanced`});return Object.freeze({version:N,preset:t.preset,...I[t.preset],repairs_per_replan:3})}function R({value:e,onChange:t,disabled:n=!1,locale:r=`pt-BR`}){let i=(0,s.useId)(),a=L(e),o=r===`pt-BR`;return(0,c.jsxs)(`div`,{children:[!e&&(0,c.jsx)(`p`,{children:o?`Projeto legado: selecione e salve um perfil para adotar os novos controles nas novas Tasks.`:`Legacy project: select and save a preset to adopt the new controls for new Tasks.`}),(0,c.jsxs)(`label`,{className:`project-settings-field`,htmlFor:i,children:[(0,c.jsx)(`strong`,{children:o?`Perfil de autonomia`:`Autonomy preset`}),(0,c.jsx)(`select`,{id:i,"aria-describedby":`${i}-detail`,disabled:n,value:a.preset,onChange:e=>t({version:1,preset:P.parse(e.target.value)}),children:P.options.map(e=>(0,c.jsx)(`option`,{value:e,children:o?I[e].label:{essential:`Essential`,balanced:`Balanced`,persistent:`Persistent — unlimited`}[e]},e))})]}),(0,c.jsx)(`p`,{id:`${i}-detail`,role:`status`,children:a.attempts===null?o?`Sem limite de tentativas ou replanejamentos. Pode continuar indefinidamente e consumir créditos até você cancelar.`:`No attempt or replanning limit. May continue indefinitely and consume credits until you cancel.`:o?`${a.attempts} execuções por Task (1 inicial + ${a.attempts-1} reparações), até ${a.replans} replanejamento(s). Sem abandono por tempo.`:`${a.attempts} executions per Task (1 initial + ${a.attempts-1} repairs), up to ${a.replans} replan(s). No time-based abandonment.`}),(0,c.jsx)(`p`,{children:a.automatic_astra?o?`Replanejamento: Sol/high no primeiro, Astra/high a partir do segundo. Astra/high pode executar a partir do terceiro.`:`Replanning: Sol/high first, Astra/high from the second. Astra/high may execute from the third.`:o?`Nunca usa Astra automaticamente. Exceção: agente principal de tarefa avulsa com Astra selecionado por você no Codex.`:`Never selects Astra automatically. Exception: a standalone principal with Astra manually selected in Codex.`}),(0,c.jsx)(`p`,{children:o?`A mudança vale para novas Tasks; as iniciadas conservam o perfil e o histórico. Tarefas avulsas priorizam execução direta. Ao delegar, a ZAIP informa que modelo e esforço dos subagentes podem mudar. Critérios de aceite e permissões não são reduzidos.`:`Changes apply to new Tasks; started Tasks retain their preset and history. Standalone work prefers direct execution. Delegation discloses that subagent model and effort may differ. Acceptance criteria and permissions are not reduced.`})]})}function z({api:e,locale:t,onClose:n}){let r=M[t],[i,a]=(0,s.useState)(null),[d,f]=(0,s.useState)(null),[p,v]=(0,s.useState)(null),[x,S]=(0,s.useState)(`{}`),[C,w]=(0,s.useState)(!1),[T,k]=(0,s.useState)(!0),[A,N]=(0,s.useState)(null),[P,F]=(0,s.useState)(null),[I,L]=(0,s.useState)(!1),z=o(),B=d===null?null:O(d),H=(0,s.useCallback)(async()=>{k(!0),N(null);try{let[t,n]=await Promise.all([e.projectSettings(),e.projectOverview()]),r=m(t);a(t),f(n),v(h(r.components,n.stack_components)),S(r.otherOverrides)}catch(e){N(e instanceof Error?e.message:String(e))}finally{k(!1)}},[e]);(0,s.useEffect)(()=>{H()},[H]),(0,s.useEffect)(()=>{L(d!==null&&O(d).hasMissingDependencies)},[d]);async function U(t){if(t.preventDefault(),i!==null){w(!0),N(null),F(null);try{let t=await e.saveProjectSettings(g(i,p??m(i).components,x)),n=await e.projectOverview(),o=m(t);a(t),f(n),v(o.components),S(o.otherOverrides),F(r.saved)}catch(e){N(e instanceof Error?e.message:String(e))}finally{w(!1)}}}if(i===null){let e=T&&A===null;return(0,c.jsx)(`main`,{"aria-busy":e,className:`project-settings-state`,children:(0,c.jsxs)(`div`,{"aria-live":e?`polite`:`assertive`,className:`project-settings-state-card`,role:e?`status`:`alert`,children:[e?(0,c.jsx)(`span`,{"aria-hidden":`true`,className:`project-settings-loader`}):null,(0,c.jsx)(`p`,{children:r.eyebrow}),(0,c.jsx)(`h1`,{children:A?r.loadError:r.loading}),A?(0,c.jsx)(`p`,{className:`project-settings-state-error`,children:A}):null,A?(0,c.jsx)(`button`,{onClick:()=>void H(),type:`button`,children:r.retry}):null,(0,c.jsxs)(`button`,{onClick:n,type:`button`,children:[`← `,r.back]})]})})}return(0,c.jsxs)(`main`,{className:`project-settings-page`,children:[(0,c.jsxs)(`form`,{onSubmit:U,children:[(0,c.jsxs)(`header`,{className:`project-settings-header`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`p`,{children:r.eyebrow}),(0,c.jsx)(`h1`,{children:r.title}),(0,c.jsx)(`span`,{children:r.intro})]}),(0,c.jsxs)(`button`,{className:`project-settings-back`,onClick:n,type:`button`,children:[`← `,r.back]})]}),A?(0,c.jsx)(`div`,{className:`project-settings-message is-error`,role:`alert`,children:A}):null,P?(0,c.jsx)(`div`,{className:`project-settings-message is-success`,role:`status`,children:P}):null,(0,c.jsxs)(`section`,{className:`project-settings-feature`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsxs)(`h2`,{children:[r.framework,b(d?.framework_version)?` - ${b(d?.framework_version)}`:``]}),(0,c.jsx)(`p`,{children:r.frameworkHint})]}),(0,c.jsx)(W,{checked:i.zaip?.enabled===!0,label:t===`pt-BR`?`Framework ativo`:`Framework enabled`,onChange:e=>a({...i,zaip:{enabled:e}})})]}),(0,c.jsxs)(`section`,{className:`project-settings-summary`,"aria-label":r.overview,children:[d&&j(d.metrics).map(e=>(0,c.jsxs)(`div`,{className:`project-settings-metric`,children:[(0,c.jsx)(`strong`,{children:e.value}),(0,c.jsx)(`span`,{children:r.metricLabels[e.id]})]},e.id)),B?(0,c.jsx)(V,{installation:B,locale:t}):null]}),(0,c.jsx)(l,{className:`is-wide`,title:r.overview,children:(0,c.jsx)(`div`,{className:`project-overview`,"aria-live":`polite`,children:d?.areas.map(e=>(0,c.jsxs)(`div`,{className:`project-overview-item`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`strong`,{children:r.areaLabels[e.id]}),(0,c.jsx)(`code`,{children:e.artifact})]}),(0,c.jsx)(`span`,{className:e.available?`is-available`:`is-unavailable`,children:e.available===!0?r.available:e.available===!1?r.artifactUnavailable:r.unavailable})]},e.id))})}),(0,c.jsx)(l,{className:`is-wide project-detected-versions`,title:r.versions,children:(0,c.jsx)(D,{components:d?.stack_components??[],text:r,showTitle:!1})}),(0,c.jsxs)(`div`,{className:`project-settings-grid`,children:[(0,c.jsxs)(l,{className:`is-wide project-identity-card`,title:r.identity,children:[(0,c.jsx)(u,{className:`project-settings-workspace-field`,hint:r.workspacePathHint,label:r.workspacePath,children:(0,c.jsx)(`code`,{className:`project-settings-workspace-path`,children:z.status?.workspace??(z.unavailable?r.workspacePathUnavailable:r.workspacePathLoading)})}),(0,c.jsx)(u,{label:`Schema`,children:(0,c.jsx)(`input`,{readOnly:!0,value:i.schema_version})}),(0,c.jsx)(u,{label:t===`pt-BR`?`ID do projeto`:`Project ID`,children:(0,c.jsx)(`input`,{required:!0,value:i.project.id,onChange:e=>a({...i,project:{...i.project,id:e.target.value}})})}),(0,c.jsx)(u,{label:t===`pt-BR`?`Nome do projeto`:`Project name`,children:(0,c.jsx)(`input`,{required:!0,value:i.project.name,onChange:e=>a({...i,project:{...i.project,name:e.target.value}})})}),(0,c.jsx)(u,{label:`Timezone IANA`,children:(0,c.jsx)(`input`,{required:!0,value:i.project.timezone,onChange:e=>a({...i,project:{...i.project,timezone:e.target.value}})})})]}),(0,c.jsxs)(l,{className:`is-wide`,title:r.stack,children:[(0,c.jsx)(`p`,{className:`project-stack-guide`,children:r.componentGuide}),p?(0,c.jsx)(E,{components:p,locale:t,onChange:v,referenceHint:r.referenceHint,versionHint:r.versionHint}):null,(0,c.jsxs)(`details`,{className:`project-settings-advanced`,children:[(0,c.jsx)(`summary`,{children:r.overrides}),(0,c.jsx)(u,{hint:r.overridesHint,label:`Overrides`,children:(0,c.jsx)(`textarea`,{rows:7,value:x,onChange:e=>S(e.target.value)})})]})]}),(0,c.jsxs)(l,{title:r.execution,children:[(0,c.jsx)(G,{checked:i.execution!==void 0,hint:r.executionToggleHint,label:t===`pt-BR`?`Incluir configuração de execução`:`Include execution configuration`,onChange:e=>a({...i,execution:e?{runtime:`codex_native`}:void 0})}),i.execution?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{hint:r.runtimeHint,label:`Runtime`,children:(0,c.jsxs)(`select`,{value:i.execution.runtime,"aria-label":`Runtime`,onChange:e=>a({...i,execution:y(e.target.value)}),children:[(0,c.jsx)(`option`,{value:`manual`,children:`manual`}),(0,c.jsx)(`option`,{value:`codex_native`,children:`codex_native (Codex)`}),(0,c.jsx)(`option`,{value:`managed`,children:`managed (PRD/SPEC)`}),(0,c.jsx)(`option`,{value:`autonomous`,children:`autonomous`})]})}),i.execution.runtime!==`manual`&&i.execution.runtime!==`codex_native`?(0,c.jsx)(K,{config:i,setConfig:a,text:r}):null]}):null]}),(0,c.jsx)(l,{title:t===`pt-BR`?`Autonomia e recuperação`:`Autonomy and recovery`,children:(0,c.jsx)(R,{value:i.autonomy,disabled:C,locale:t,onChange:e=>a({...i,autonomy:e})})}),(0,c.jsxs)(l,{title:r.assurance,children:[(0,c.jsx)(G,{checked:i.assurance!==void 0,hint:r.assuranceToggleHint,label:t===`pt-BR`?`Incluir assurance`:`Include assurance`,onChange:e=>a({...i,assurance:e?{version:1,standard_depth:`auto`,require_final_commit:!0}:void 0})}),i.assurance?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{hint:r.assuranceVersionHint,label:t===`pt-BR`?`Versão`:`Version`,children:(0,c.jsx)(`input`,{readOnly:!0,value:i.assurance.version})}),(0,c.jsx)(u,{hint:r.assuranceDepthHint,label:t===`pt-BR`?`Profundidade padrão`:`Standard depth`,children:(0,c.jsxs)(`select`,{value:i.assurance.standard_depth,onChange:e=>a({...i,assurance:{...i.assurance??{version:1,standard_depth:`auto`,require_final_commit:!0},standard_depth:e.target.value}}),children:[(0,c.jsx)(`option`,{value:`auto`,children:`auto`}),(0,c.jsx)(`option`,{value:`base`,children:`base`}),(0,c.jsx)(`option`,{value:`elevated`,children:`elevated`})]})}),(0,c.jsx)(W,{checked:i.assurance.require_final_commit,hint:r.finalCommitHint,label:t===`pt-BR`?`Exigir commit final`:`Require final commit`,onChange:e=>a({...i,assurance:{...i.assurance??{version:1,standard_depth:`auto`,require_final_commit:!0},require_final_commit:e}})})]}):null]}),(0,c.jsxs)(l,{className:`is-wide`,title:r.context,children:[(0,c.jsx)(G,{checked:i.context!==void 0,label:t===`pt-BR`?`Incluir raízes de contexto`:`Include context roots`,onChange:e=>a({...i,context:e?{canonical_roots:[`packages`],projection_roots:[]}:void 0})}),i.context?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(`div`,{className:`project-settings-guidance`,children:[(0,c.jsx)(`p`,{children:r.contextGuide}),(0,c.jsx)(`p`,{children:r.contextDomains})]}),(0,c.jsxs)(`div`,{className:`project-settings-fields two-columns`,children:[(0,c.jsx)(u,{hint:t===`pt-BR`?`Uma pasta por linha. Estas são as fontes principais do projeto.`:`One folder per line. These are the project's primary sources.`,label:t===`pt-BR`?`Fontes canônicas`:`Canonical sources`,children:(0,c.jsx)(`textarea`,{required:!0,rows:5,value:i.context.canonical_roots.join(`
1
+ import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,_ as n,v as r,w as i,y as a}from"./cost-monitor-B0Jwz_rk.js";import{t as o}from"./index-oqGtXP7j.js";var s=e(t(),1),c=i();function l({children:e,className:t=``,title:n}){return(0,c.jsxs)(`section`,{className:`project-settings-card ${t}`,children:[(0,c.jsx)(`h2`,{children:n}),(0,c.jsx)(`div`,{className:`project-settings-fields`,children:e})]})}function u({children:e,className:t=``,hint:n,label:r}){return(0,c.jsxs)(`div`,{className:`project-settings-field ${t}`,children:[(0,c.jsx)(`span`,{children:r}),e,n?(0,c.jsx)(`small`,{children:n}):null]})}var d=[{id:`primary_language`,defaultName:`TypeScript`,scope:`backend`},{id:`backend_runtime`,defaultName:`Node.js`,scope:`backend`},{id:`backend_api`,defaultName:`Hono`,scope:`backend`},{id:`query_builder`,defaultName:`Kysely`,scope:`backend`},{id:`database`,defaultName:`PostgreSQL via Supabase`,scope:`backend`},{id:`auth_storage`,defaultName:`Supabase Auth + Storage`,scope:`backend`},{id:`cache_messaging`,defaultName:`Redis`,scope:`backend`},{id:`async_queue`,defaultName:`BullMQ`,scope:`backend`},{id:`backend_infrastructure`,defaultName:`Terraform`,scope:`backend`},{id:`backend_hosting`,defaultName:`Hostinger VPS`,scope:`backend`},{id:`web_framework`,defaultName:`React`,scope:`frontend`},{id:`web_language`,defaultName:`TypeScript`,scope:`frontend`},{id:`web_build`,defaultName:`Vite`,scope:`frontend`},{id:`frontend_hosting`,defaultName:`Cloudflare Pages`,scope:`frontend`},{id:`site_framework`,defaultName:`Astro`,scope:`site`},{id:`site_language`,defaultName:`TypeScript`,scope:`site`},{id:`site_islands`,defaultName:`React Islands`,scope:`site`},{id:`site_build`,defaultName:`Vite`,scope:`site`},{id:`site_hosting`,defaultName:`Cloudflare Pages`,scope:`site`},{id:`prometheus`,defaultName:`Prometheus`,scope:`observability`},{id:`grafana`,defaultName:`Grafana`,scope:`observability`},{id:`uptime_kuma`,defaultName:`Uptime Kuma`,scope:`observability`},{id:`cadvisor`,defaultName:`cAdvisor`,scope:`observability`},{id:`node_exporter`,defaultName:`node-exporter`,scope:`observability`},{id:`redis_exporter`,defaultName:`Redis Exporter`,scope:`observability`},{id:`k6`,defaultName:`k6`,scope:`testing`},{id:`autocannon`,defaultName:`autocannon`,scope:`testing`}],f=new Set([`database`,`auth_storage`,`backend_hosting`,`frontend_hosting`,`site_hosting`]);function p(e){return f.has(e)}function m(e){let{languages:t,components:n,...r}=e.stack.overrides,i=w(n)?n:{};return{components:Object.fromEntries(d.map(e=>{let t=i[e.id],n=w(t)?t:{};return[e.id,{name:C(n.name)||e.defaultName,version:C(n.version),reference:C(n.reference)}]})),otherOverrides:JSON.stringify(r,null,2)}}function h(e,t){let n=new Map(t.filter(e=>e.installation===`installed`&&e.version!==null).map(e=>[e.name.toLowerCase(),e.version]));return Object.fromEntries(d.map(t=>{let r=e[t.id],i=n.get(x(t.id));return[t.id,r.version!==``||i===void 0?r:{...r,version:i}]}))}function g(e,t,n){if(e.autonomy?.version===1&&e.execution&&e.execution.runtime!==`manual`&&e.execution.runtime!==`codex_native`&&e.execution.autonomous.provider!==`codex`)throw Error(`Autonomy-v1 exige Codex na execução gerenciada / requires Codex for managed execution. Selecione Codex; conversas diretas continuam disponíveis.`);let r=JSON.parse(n);if(!w(r))throw Error(`Demais overrides deve ser um objeto JSON.`);let{languages:i,components:a,...o}=r;for(let e of d){let n=t[e.id].version.trim();if(n!==``&&!p(e.id)&&!/^\d+\.\d+(?:\.\d+)?(?:[-+][0-9A-Za-z.-]+)?$/.test(n))throw Error(`A versão de ${t[e.id].name||e.defaultName} deve ser exata, como 22.16.0 ou 17.6, sem ^, ~, >= ou latest.`);if(p(e.id)&&(n.length>120||/[\r\n]/.test(n)))throw Error(`A referência de ${t[e.id].name||e.defaultName} deve ter uma única linha com até 120 caracteres.`)}let s=Object.fromEntries(d.map(e=>[e.id,{name:t[e.id].name.trim()||e.defaultName,version:t[e.id].version.trim(),reference:t[e.id].reference.trim()}])),c=w(e.stack.overrides.components)?e.stack.overrides.components:{};return{...e,stack:{...e.stack,overrides:{...o,components:{...c,...s},languages:{frontend:S(s,`frontend`),backend:S(s,`backend`),site:S(s,`site`)}}}}}function _(e){return[...new Set(e.split(/\r?\n/).map(e=>e.trim()).filter(Boolean))]}function v(){return{runtime:`autonomous`,autonomous:{provider:`codex`,model:`gpt-6-sol`,max_parallelism:1,lease_ms:6e4}}}function y(e){if(e===`manual`)return{runtime:`manual`};if(e===`codex_native`)return{runtime:`codex_native`};if(e!==`managed`&&e!==`autonomous`)throw Error(`Unknown runtime: ${e}`);return{...v(),runtime:e}}function b(e){let t=e?.match(/^v?(\d+)\.(\d+)\.\d+(?:[-+][0-9A-Za-z.-]+)?$/);return t?`v${t[1]}.${t[2]}`:null}function x(e){return e===`backend_runtime`?`node.js`:e===`backend_api`?`hono`:e===`site_framework`?`astro`:e===`cache_messaging`?`redis`:e===`async_queue`?`bullmq`:e===`web_framework`||e===`site_islands`?`react`:e===`web_build`||e===`site_build`?`vite`:e===`primary_language`||e===`web_language`||e===`site_language`?`typescript`:``}function S(e,t){return[...new Set(d.filter(e=>e.scope===t).map(t=>e[t.id].name.trim()).filter(Boolean))]}function C(e){return typeof e==`string`?e:``}function w(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var T={primary_language:{pt:`Linguagem principal`,en:`Primary language`},backend_runtime:{pt:`Runtime backend`,en:`Backend runtime`},backend_api:{pt:`Framework backend / API`,en:`Backend framework / API`},query_builder:{pt:`Query builder`,en:`Query builder`},database:{pt:`Banco de dados`,en:`Database`},auth_storage:{pt:`Autenticação e Storage`,en:`Authentication and Storage`},cache_messaging:{pt:`Cache e mensageria`,en:`Cache and messaging`},async_queue:{pt:`Filas e processamento assíncrono`,en:`Queues and async processing`},backend_infrastructure:{pt:`Infraestrutura backend`,en:`Backend infrastructure`},backend_hosting:{pt:`Hospedagem do backend`,en:`Backend hosting`},web_framework:{pt:`Framework do Web App`,en:`Web App framework`},web_language:{pt:`Linguagem do Web App`,en:`Web App language`},web_build:{pt:`Build do Web App`,en:`Web App build`},frontend_hosting:{pt:`Hospedagem do frontend`,en:`Frontend hosting`},site_framework:{pt:`Framework do site`,en:`Site framework`},site_language:{pt:`Linguagem do site`,en:`Site language`},site_islands:{pt:`Componentes interativos`,en:`Interactive components`},site_build:{pt:`Build do site`,en:`Site build`},site_hosting:{pt:`Hospedagem do site`,en:`Site hosting`},prometheus:{pt:`Coleta de métricas`,en:`Metrics collection`},grafana:{pt:`Dashboards`,en:`Dashboards`},uptime_kuma:{pt:`Monitoramento de disponibilidade`,en:`Availability monitoring`},cadvisor:{pt:`Métricas de containers`,en:`Container metrics`},node_exporter:{pt:`Métricas de host`,en:`Host metrics`},redis_exporter:{pt:`Métricas do Redis`,en:`Redis metrics`},k6:{pt:`Teste de carga`,en:`Load testing`},autocannon:{pt:`Teste HTTP de carga`,en:`HTTP load testing`}};function E({components:e,locale:t,onChange:n,referenceHint:r,versionHint:i}){let a=[{scope:`backend`,title:t===`pt-BR`?`Backend e dados`:`Backend and data`},{scope:`frontend`,title:`Web App`},{scope:`site`,title:t===`pt-BR`?`Site e landing pages`:`Site and landing pages`},{scope:`observability`,title:t===`pt-BR`?`Observabilidade`:`Observability`},{scope:`testing`,title:t===`pt-BR`?`Testes sob demanda`:`On-demand testing`}],o=(t,r,i)=>n({...e,[t]:{...e[t],[r]:i}});return(0,c.jsxs)(`div`,{className:`project-stack-editor`,children:[a.map(n=>(0,c.jsxs)(`section`,{children:[(0,c.jsx)(`h3`,{children:n.title}),(0,c.jsxs)(`div`,{className:`project-stack-table`,children:[(0,c.jsxs)(`div`,{className:`project-stack-table-head`,"aria-hidden":`true`,children:[(0,c.jsx)(`span`,{children:`Item`}),(0,c.jsx)(`span`,{children:t===`pt-BR`?`Tecnologia`:`Technology`}),(0,c.jsx)(`span`,{children:t===`pt-BR`?`Versão atual / referência`:`Current version / reference`}),(0,c.jsx)(`span`,{children:t===`pt-BR`?`Pacote / imagem / serviço`:`Package / image / service`})]}),d.filter(e=>e.scope===n.scope).map(n=>(0,c.jsxs)(`div`,{className:`project-stack-row`,children:[(0,c.jsx)(`strong`,{children:T[n.id][t===`pt-BR`?`pt`:`en`]}),(0,c.jsx)(`input`,{"aria-label":`${T[n.id].pt}: tecnologia`,value:e[n.id].name,onChange:e=>o(n.id,`name`,e.target.value)}),(0,c.jsx)(`input`,{"aria-label":`${T[n.id].pt}: ${p(n.id)?`versão atual ou referência`:`versão exata`}`,className:p(n.id)?`is-reference-value`:void 0,inputMode:p(n.id)?`text`:`decimal`,placeholder:p(n.id)?t===`pt-BR`?`Serviço em nuvem`:`Cloud service`:`x.y.z`,title:p(n.id)?e[n.id].version:void 0,value:e[n.id].version,onChange:e=>o(n.id,`version`,e.target.value)}),(0,c.jsx)(`input`,{"aria-label":`${T[n.id].pt}: referência`,placeholder:`npm:pacote ou service:nome`,value:e[n.id].reference,onChange:e=>o(n.id,`reference`,e.target.value)})]},n.id))]})]},n.scope)),(0,c.jsxs)(`div`,{className:`project-stack-format-help`,children:[(0,c.jsxs)(`p`,{children:[(0,c.jsx)(`strong`,{children:t===`pt-BR`?`Formato da versão:`:`Version format:`}),` `,i]}),(0,c.jsxs)(`p`,{children:[(0,c.jsx)(`strong`,{children:t===`pt-BR`?`Formato da referência:`:`Reference format:`}),` `,r]})]})]})}function D({components:e,showTitle:t=!0,text:n}){return e.length===0?null:(0,c.jsxs)(`section`,{className:`project-stack-versions`,"aria-label":n.versions,children:[t?(0,c.jsx)(`h3`,{children:n.versions}):null,(0,c.jsx)(`div`,{children:e.map(e=>(0,c.jsxs)(`article`,{children:[(0,c.jsxs)(`div`,{className:`project-stack-version-identity`,children:[(0,c.jsx)(`strong`,{children:e.name}),(0,c.jsxs)(`code`,{children:[n.current,`: `,e.version??n.versionUnavailable]}),e.configured_version!==null&&e.configured_version!==e.version?(0,c.jsxs)(`code`,{children:[n.configured,`: `,e.configured_version]}):null]}),(0,c.jsx)(`span`,{className:`is-${e.verification}`,children:e.installation===`runtime`?n.runtime:e.installation===`installed`?n.installed:e.installation===`bundled`?n.bundled:n.missing}),e.source?(0,c.jsx)(`small`,{children:e.source}):null]},e.name))})]})}function O(e){return{health:e.health??{state:`unknown`,scope:`settings_runtime`},dependencies:k(e.dependencies,e.dependencies?.installed),documentation:k(e.documentation,e.documentation?.available),profile:e.installation_profile??null,hasMissingDependencies:(A(e.dependencies?.missing)??0)>0}}function k(e,t){let n=e?.state??`unknown`,r=A(e?.percent);return{completed:A(t),total:A(e?.applicable),percentage:(n===`complete`||n===`incomplete`)&&r!==null&&r<=100?r:null,state:n}}function A(e){return typeof e==`number`&&Number.isFinite(e)&&e>=0?e:null}function j(e){return e.filter(e=>![`database`,`installation`].includes(e.id))}var M={"pt-BR":{eyebrow:`Configurações`,title:`Configuração do projeto`,intro:`Edite o arquivo central do projeto com validação do schema antes da gravação.`,loading:`Carregando…`,loadError:`Não foi possível carregar as configurações do projeto.`,retry:`Tentar novamente`,back:`Voltar ao dashboard`,save:`Salvar configurações`,saving:`Validando e salvando…`,saved:`Configurações salvas e validadas.`,framework:`Framework ZAIP-AIOS`,frameworkHint:`Ativa ou desativa o framework para este projeto.`,identity:`Identidade do projeto`,workspacePath:`Caminho do projeto`,workspacePathHint:`Pasta local usada por esta instância do Dashboard.`,workspacePathLoading:`Identificando caminho…`,workspacePathUnavailable:`Caminho indisponível`,stack:`Stack e linguagens`,execution:`Execução`,assurance:`Assurance`,executionToggleHint:`Grava ou remove o bloco execution. Sem ele, o projeto usa execução manual.`,runtimeHint:`Managed gerencia PRDs/SPECs e mantém avulsas diretas. Manual não inicia provider; autonomous permite execução gerenciada também para Task avulsa por comando explícito.`,providerHint:`Provider que inicia os agentes da execução autônoma: Codex ou Claude.`,autonomyProviderHint:`Autonomy-v1 exige Codex para execução gerenciada. Claude continua disponível em conversas diretas ou no protocolo legado.`,executionModelHint:`Modelo-base do runtime autônomo. A política automática de PRD/SPEC ainda pode selecionar um modelo permitido por agente.`,parallelismHint:`Teto de agentes simultâneos. O valor efetivo é o menor limite entre projeto, DAG, provider e squad.`,leaseHint:`Tempo de lease configurado para o coordenador autônomo.`,assuranceToggleHint:`Ativa ou remove os gates de evidência, revisão e qualidade do projeto. Recomenda-se manter ativo.`,assuranceVersionHint:`Versão do contrato de assurance. É fixa e somente leitura.`,assuranceDepthHint:`Auto ajusta o rigor ao escopo; base exige o conjunto padrão; elevated amplia validações para mudanças mais abrangentes.`,finalCommitHint:`Exige que as evidências comprovem o commit final integrado. Sinais de produção ou migração ainda podem exigir isso mesmo quando desativado.`,context:`Contexto`,overview:`Visão geral do projeto`,metricLabels:{agents:`Agentes`,squads:`Squads`,skills:`Skills`,rules:`Rules`,hooks:`Hooks`},areaLabels:{brandbook:`Brandbook`,design_system:`Design System`,software_architecture:`Arquitetura de Software`,growth_strategy:`Estratégia de Growth`,marketing_strategy:`Estratégia de Marketing`,sales_playbook:`Playbook de Sales`},available:`Criado`,artifactUnavailable:`Ainda não criado`,componentGuide:`Preencha cada responsabilidade separadamente. Use a versão exata do software e, para serviços em nuvem ou hospedagem, informe Serviço em nuvem.`,versionHint:`Software: 22.16.0 ou 17.6, sem prefixos (^, ~, >=). Serviço gerenciado: Serviço em nuvem. Hospedagem: Serviço em nuvem.`,referenceHint:`Ex.: npm:hono, docker:node:22.16.0-bookworm-slim, service:supabase ou provider:cloudflare-pages.`,overrides:`Opções avançadas (JSON)`,overridesHint:`Use apenas fatos técnicos transversais confirmados. Deixe vazio quando não houver exceções.`,versions:`Versões detectadas no workspace`,exact:`Verificada`,constraint:`Requisito`,versionUnavailable:`Não encontrada`,runtime:`Runtime do Dashboard`,installed:`Instalado no projeto`,missing:`Ausente no projeto`,bundled:`Empacotado no Dashboard`,current:`Atual`,configured:`Configurado`,health:`Saúde`,dependencies:`Dependências técnicas`,documentation:`Documentação`,unknown:`Desconhecido`,unavailable:`Indisponível`,notApplicable:`Não aplicável`,complete:`Completo`,incomplete:`Incompleto`,incompleteInstallation:`Há dependências técnicas locais ausentes neste computador.`,dismiss:`Fechar aviso`,contextGuide:`O contexto começa pelas fontes canônicas e inclui somente arquivos relevantes para a tarefa. Saídas geradas são consultadas apenas em setup, release ou checagem de paridade.`,contextDomains:`Branding, Marketing, Growth e Sales são usados sob demanda pelos respectivos especialistas, quando houver uma tarefa e artefatos desses domínios. Não os adicione aqui apenas por existirem como capacidades.`},"en-US":{eyebrow:`Settings`,title:`Project settings`,intro:`Edit the central project file with schema validation before writing.`,loading:`Loading…`,loadError:`Project settings could not be loaded.`,retry:`Try again`,back:`Back to dashboard`,save:`Save settings`,saving:`Validating and saving…`,saved:`Settings saved and validated.`,framework:`ZAIP-AIOS framework`,frameworkHint:`Enable or disable the framework for this project.`,identity:`Project identity`,workspacePath:`Project path`,workspacePathHint:`Local folder used by this Dashboard instance.`,workspacePathLoading:`Identifying path…`,workspacePathUnavailable:`Path unavailable`,stack:`Stack and languages`,execution:`Execution`,assurance:`Assurance`,executionToggleHint:`Writes or removes the execution block. Without it, the project uses manual execution.`,runtimeHint:`Managed runs PRDs/SPECs while standalone Tasks stay direct. Manual never starts a provider; autonomous also permits explicitly commanded managed standalone execution.`,providerHint:`Provider that starts autonomous execution agents: Codex or Claude.`,autonomyProviderHint:`Autonomy-v1 requires Codex for managed execution. Claude remains available for direct conversations or the legacy protocol.`,executionModelHint:`Base model for the autonomous runtime. PRD/SPEC automatic policy may still select an allowed model per agent.`,parallelismHint:`Maximum simultaneous agents. Effective parallelism is the smallest project, DAG, provider, and squad limit.`,leaseHint:`Lease duration configured for the autonomous coordinator.`,assuranceToggleHint:`Enables or removes project evidence, review, and quality gates. Keeping it enabled is recommended.`,assuranceVersionHint:`Assurance contract version. It is fixed and read-only.`,assuranceDepthHint:`Auto adapts rigor to scope; base uses the standard set; elevated expands validation for broader changes.`,finalCommitHint:`Requires evidence for the final integrated commit. Production or migration signals may still require it when disabled.`,context:`Context`,overview:`Project overview`,metricLabels:{agents:`Agents`,squads:`Squads`,skills:`Skills`,rules:`Rules`,hooks:`Hooks`},areaLabels:{brandbook:`Brandbook`,design_system:`Design System`,software_architecture:`Software Architecture`,growth_strategy:`Growth Strategy`,marketing_strategy:`Marketing Strategy`,sales_playbook:`Sales Playbook`},available:`Created`,artifactUnavailable:`Not created yet`,componentGuide:`Fill each responsibility separately. Use an exact software version and, for cloud services or hosting, enter Cloud service.`,versionHint:`Software: 22.16.0 or 17.6, without prefixes (^, ~, >=). Managed service: Cloud service. Hosting: Cloud service.`,referenceHint:`E.g. npm:hono, docker:node:22.16.0-bookworm-slim, service:supabase, or provider:cloudflare-pages.`,overrides:`Advanced options (JSON)`,overridesHint:`Use only confirmed cross-cutting technical facts. Leave empty when there are no exceptions.`,versions:`Versions detected in the workspace`,exact:`Verified`,constraint:`Requirement`,versionUnavailable:`Not found`,runtime:`Dashboard runtime`,installed:`Installed in project`,missing:`Missing from project`,bundled:`Bundled in Dashboard`,current:`Current`,configured:`Configured`,health:`Health`,dependencies:`Technical dependencies`,documentation:`Documentation`,unknown:`Unknown`,unavailable:`Unavailable`,notApplicable:`Not applicable`,complete:`Complete`,incomplete:`Incomplete`,incompleteInstallation:`Some local technical dependencies are missing on this computer.`,dismiss:`Dismiss notification`,contextGuide:`Context starts from canonical sources and includes only files relevant to the task. Generated outputs are consulted only for setup, release, or parity checks.`,contextDomains:`Branding, Marketing, Growth, and Sales are used on demand by their respective specialists when there is a task and artifacts in those domains. Do not add them here merely because they exist as capabilities.`}},N=`autonomy-v1`,P=n([`essential`,`balanced`,`persistent`]),F=a({version:r(1),preset:P}).strict(),I=Object.freeze({essential:Object.freeze({label:`Essencial`,attempts:4,replans:1,automatic_astra:!1}),balanced:Object.freeze({label:`Equilibrado`,attempts:10,replans:3,automatic_astra:!0}),persistent:Object.freeze({label:`Persistente — ilimitado`,attempts:null,replans:null,automatic_astra:!0})});function L(e){let t=F.parse(e??{version:1,preset:`balanced`});return Object.freeze({version:N,preset:t.preset,...I[t.preset],repairs_per_replan:3})}function R({value:e,onChange:t,disabled:n=!1,locale:r=`pt-BR`}){let i=(0,s.useId)(),a=L(e),o=r===`pt-BR`;return(0,c.jsxs)(`div`,{children:[!e&&(0,c.jsx)(`p`,{children:o?`Projeto legado: selecione e salve um perfil para adotar os novos controles nas novas Tasks.`:`Legacy project: select and save a preset to adopt the new controls for new Tasks.`}),(0,c.jsxs)(`label`,{className:`project-settings-field`,htmlFor:i,children:[(0,c.jsx)(`strong`,{children:o?`Perfil de autonomia`:`Autonomy preset`}),(0,c.jsx)(`select`,{id:i,"aria-describedby":`${i}-detail`,disabled:n,value:a.preset,onChange:e=>t({version:1,preset:P.parse(e.target.value)}),children:P.options.map(e=>(0,c.jsx)(`option`,{value:e,children:o?I[e].label:{essential:`Essential`,balanced:`Balanced`,persistent:`Persistent — unlimited`}[e]},e))})]}),(0,c.jsx)(`p`,{id:`${i}-detail`,role:`status`,children:a.attempts===null?o?`Sem limite de tentativas ou replanejamentos. Pode continuar indefinidamente e consumir créditos até você cancelar.`:`No attempt or replanning limit. May continue indefinitely and consume credits until you cancel.`:o?`${a.attempts} execuções por Task (1 inicial + ${a.attempts-1} reparações), até ${a.replans} replanejamento(s). Sem abandono por tempo.`:`${a.attempts} executions per Task (1 initial + ${a.attempts-1} repairs), up to ${a.replans} replan(s). No time-based abandonment.`}),(0,c.jsx)(`p`,{children:a.automatic_astra?o?`Replanejamento: Sol/high no primeiro, Astra/high a partir do segundo. Astra/high pode executar a partir do terceiro.`:`Replanning: Sol/high first, Astra/high from the second. Astra/high may execute from the third.`:o?`Nunca usa Astra automaticamente. Exceção: agente principal de tarefa avulsa com Astra selecionado por você no Codex.`:`Never selects Astra automatically. Exception: a standalone principal with Astra manually selected in Codex.`}),(0,c.jsx)(`p`,{children:o?`A mudança vale para novas Tasks; as iniciadas conservam o perfil e o histórico. Tarefas avulsas priorizam execução direta. Ao delegar, a ZAIP informa que modelo e esforço dos subagentes podem mudar. Critérios de aceite e permissões não são reduzidos.`:`Changes apply to new Tasks; started Tasks retain their preset and history. Standalone work prefers direct execution. Delegation discloses that subagent model and effort may differ. Acceptance criteria and permissions are not reduced.`})]})}function z({api:e,locale:t,onClose:n}){let r=M[t],[i,a]=(0,s.useState)(null),[d,f]=(0,s.useState)(null),[p,v]=(0,s.useState)(null),[x,S]=(0,s.useState)(`{}`),[C,w]=(0,s.useState)(!1),[T,k]=(0,s.useState)(!0),[A,N]=(0,s.useState)(null),[P,F]=(0,s.useState)(null),[I,L]=(0,s.useState)(!1),z=o(),B=d===null?null:O(d),H=(0,s.useCallback)(async()=>{k(!0),N(null);try{let[t,n]=await Promise.all([e.projectSettings(),e.projectOverview()]),r=m(t);a(t),f(n),v(h(r.components,n.stack_components)),S(r.otherOverrides)}catch(e){N(e instanceof Error?e.message:String(e))}finally{k(!1)}},[e]);(0,s.useEffect)(()=>{H()},[H]),(0,s.useEffect)(()=>{L(d!==null&&O(d).hasMissingDependencies)},[d]);async function U(t){if(t.preventDefault(),i!==null){w(!0),N(null),F(null);try{let t=await e.saveProjectSettings(g(i,p??m(i).components,x)),n=await e.projectOverview(),o=m(t);a(t),f(n),v(o.components),S(o.otherOverrides),F(r.saved)}catch(e){N(e instanceof Error?e.message:String(e))}finally{w(!1)}}}if(i===null){let e=T&&A===null;return(0,c.jsx)(`main`,{"aria-busy":e,className:`project-settings-state`,children:(0,c.jsxs)(`div`,{"aria-live":e?`polite`:`assertive`,className:`project-settings-state-card`,role:e?`status`:`alert`,children:[e?(0,c.jsx)(`span`,{"aria-hidden":`true`,className:`project-settings-loader`}):null,(0,c.jsx)(`p`,{children:r.eyebrow}),(0,c.jsx)(`h1`,{children:A?r.loadError:r.loading}),A?(0,c.jsx)(`p`,{className:`project-settings-state-error`,children:A}):null,A?(0,c.jsx)(`button`,{onClick:()=>void H(),type:`button`,children:r.retry}):null,(0,c.jsxs)(`button`,{onClick:n,type:`button`,children:[`← `,r.back]})]})})}return(0,c.jsxs)(`main`,{className:`project-settings-page`,children:[(0,c.jsxs)(`form`,{onSubmit:U,children:[(0,c.jsxs)(`header`,{className:`project-settings-header`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`p`,{children:r.eyebrow}),(0,c.jsx)(`h1`,{children:r.title}),(0,c.jsx)(`span`,{children:r.intro})]}),(0,c.jsxs)(`button`,{className:`project-settings-back`,onClick:n,type:`button`,children:[`← `,r.back]})]}),A?(0,c.jsx)(`div`,{className:`project-settings-message is-error`,role:`alert`,children:A}):null,P?(0,c.jsx)(`div`,{className:`project-settings-message is-success`,role:`status`,children:P}):null,(0,c.jsxs)(`section`,{className:`project-settings-feature`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsxs)(`h2`,{children:[r.framework,b(d?.framework_version)?` - ${b(d?.framework_version)}`:``]}),(0,c.jsx)(`p`,{children:r.frameworkHint})]}),(0,c.jsx)(W,{checked:i.zaip?.enabled===!0,label:t===`pt-BR`?`Framework ativo`:`Framework enabled`,onChange:e=>a({...i,zaip:{enabled:e}})})]}),(0,c.jsxs)(`section`,{className:`project-settings-summary`,"aria-label":r.overview,children:[d&&j(d.metrics).map(e=>(0,c.jsxs)(`div`,{className:`project-settings-metric`,children:[(0,c.jsx)(`strong`,{children:e.value}),(0,c.jsx)(`span`,{children:r.metricLabels[e.id]})]},e.id)),B?(0,c.jsx)(V,{installation:B,locale:t}):null]}),(0,c.jsx)(l,{className:`is-wide`,title:r.overview,children:(0,c.jsx)(`div`,{className:`project-overview`,"aria-live":`polite`,children:d?.areas.map(e=>(0,c.jsxs)(`div`,{className:`project-overview-item`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`strong`,{children:r.areaLabels[e.id]}),(0,c.jsx)(`code`,{children:e.artifact})]}),(0,c.jsx)(`span`,{className:e.available?`is-available`:`is-unavailable`,children:e.available===!0?r.available:e.available===!1?r.artifactUnavailable:r.unavailable})]},e.id))})}),(0,c.jsx)(l,{className:`is-wide project-detected-versions`,title:r.versions,children:(0,c.jsx)(D,{components:d?.stack_components??[],text:r,showTitle:!1})}),(0,c.jsxs)(`div`,{className:`project-settings-grid`,children:[(0,c.jsxs)(l,{className:`is-wide project-identity-card`,title:r.identity,children:[(0,c.jsx)(u,{className:`project-settings-workspace-field`,hint:r.workspacePathHint,label:r.workspacePath,children:(0,c.jsx)(`code`,{className:`project-settings-workspace-path`,children:z.status?.workspace??(z.unavailable?r.workspacePathUnavailable:r.workspacePathLoading)})}),(0,c.jsx)(u,{label:`Schema`,children:(0,c.jsx)(`input`,{readOnly:!0,value:i.schema_version})}),(0,c.jsx)(u,{label:t===`pt-BR`?`ID do projeto`:`Project ID`,children:(0,c.jsx)(`input`,{required:!0,value:i.project.id,onChange:e=>a({...i,project:{...i.project,id:e.target.value}})})}),(0,c.jsx)(u,{label:t===`pt-BR`?`Nome do projeto`:`Project name`,children:(0,c.jsx)(`input`,{required:!0,value:i.project.name,onChange:e=>a({...i,project:{...i.project,name:e.target.value}})})}),(0,c.jsx)(u,{label:`Timezone IANA`,children:(0,c.jsx)(`input`,{required:!0,value:i.project.timezone,onChange:e=>a({...i,project:{...i.project,timezone:e.target.value}})})})]}),(0,c.jsxs)(l,{className:`is-wide`,title:r.stack,children:[(0,c.jsx)(`p`,{className:`project-stack-guide`,children:r.componentGuide}),p?(0,c.jsx)(E,{components:p,locale:t,onChange:v,referenceHint:r.referenceHint,versionHint:r.versionHint}):null,(0,c.jsxs)(`details`,{className:`project-settings-advanced`,children:[(0,c.jsx)(`summary`,{children:r.overrides}),(0,c.jsx)(u,{hint:r.overridesHint,label:`Overrides`,children:(0,c.jsx)(`textarea`,{rows:7,value:x,onChange:e=>S(e.target.value)})})]})]}),(0,c.jsxs)(l,{title:r.execution,children:[(0,c.jsx)(G,{checked:i.execution!==void 0,hint:r.executionToggleHint,label:t===`pt-BR`?`Incluir configuração de execução`:`Include execution configuration`,onChange:e=>a({...i,execution:e?{runtime:`codex_native`}:void 0})}),i.execution?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{hint:r.runtimeHint,label:`Runtime`,children:(0,c.jsxs)(`select`,{value:i.execution.runtime,"aria-label":`Runtime`,onChange:e=>a({...i,execution:y(e.target.value)}),children:[(0,c.jsx)(`option`,{value:`manual`,children:`manual`}),(0,c.jsx)(`option`,{value:`codex_native`,children:`codex_native (Codex)`}),(0,c.jsx)(`option`,{value:`managed`,children:`managed (PRD/SPEC)`}),(0,c.jsx)(`option`,{value:`autonomous`,children:`autonomous`})]})}),i.execution.runtime!==`manual`&&i.execution.runtime!==`codex_native`?(0,c.jsx)(K,{config:i,setConfig:a,text:r}):null]}):null]}),(0,c.jsx)(l,{title:t===`pt-BR`?`Autonomia e recuperação`:`Autonomy and recovery`,children:(0,c.jsx)(R,{value:i.autonomy,disabled:C,locale:t,onChange:e=>a({...i,autonomy:e})})}),(0,c.jsxs)(l,{title:r.assurance,children:[(0,c.jsx)(G,{checked:i.assurance!==void 0,hint:r.assuranceToggleHint,label:t===`pt-BR`?`Incluir assurance`:`Include assurance`,onChange:e=>a({...i,assurance:e?{version:1,standard_depth:`auto`,require_final_commit:!0}:void 0})}),i.assurance?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{hint:r.assuranceVersionHint,label:t===`pt-BR`?`Versão`:`Version`,children:(0,c.jsx)(`input`,{readOnly:!0,value:i.assurance.version})}),(0,c.jsx)(u,{hint:r.assuranceDepthHint,label:t===`pt-BR`?`Profundidade padrão`:`Standard depth`,children:(0,c.jsxs)(`select`,{value:i.assurance.standard_depth,onChange:e=>a({...i,assurance:{...i.assurance??{version:1,standard_depth:`auto`,require_final_commit:!0},standard_depth:e.target.value}}),children:[(0,c.jsx)(`option`,{value:`auto`,children:`auto`}),(0,c.jsx)(`option`,{value:`base`,children:`base`}),(0,c.jsx)(`option`,{value:`elevated`,children:`elevated`})]})}),(0,c.jsx)(W,{checked:i.assurance.require_final_commit,hint:r.finalCommitHint,label:t===`pt-BR`?`Exigir commit final`:`Require final commit`,onChange:e=>a({...i,assurance:{...i.assurance??{version:1,standard_depth:`auto`,require_final_commit:!0},require_final_commit:e}})})]}):null]}),(0,c.jsxs)(l,{className:`is-wide`,title:r.context,children:[(0,c.jsx)(G,{checked:i.context!==void 0,label:t===`pt-BR`?`Incluir raízes de contexto`:`Include context roots`,onChange:e=>a({...i,context:e?{canonical_roots:[`packages`],projection_roots:[]}:void 0})}),i.context?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(`div`,{className:`project-settings-guidance`,children:[(0,c.jsx)(`p`,{children:r.contextGuide}),(0,c.jsx)(`p`,{children:r.contextDomains})]}),(0,c.jsxs)(`div`,{className:`project-settings-fields two-columns`,children:[(0,c.jsx)(u,{hint:t===`pt-BR`?`Uma pasta por linha. Estas são as fontes principais do projeto.`:`One folder per line. These are the project's primary sources.`,label:t===`pt-BR`?`Fontes canônicas`:`Canonical sources`,children:(0,c.jsx)(`textarea`,{required:!0,rows:5,value:i.context.canonical_roots.join(`
2
2
  `),onChange:e=>a({...i,context:{...i.context??{canonical_roots:[`packages`],projection_roots:[]},canonical_roots:_(e.target.value)}})})}),(0,c.jsx)(u,{hint:t===`pt-BR`?`Uma pasta por linha. São saídas geradas, não fontes de contexto normal.`:`One folder per line. These are generated outputs, not normal context sources.`,label:t===`pt-BR`?`Saídas geradas/publicadas`:`Generated/published outputs`,children:(0,c.jsx)(`textarea`,{rows:5,value:i.context.projection_roots.join(`
3
3
  `),onChange:e=>a({...i,context:{...i.context??{canonical_roots:[`packages`],projection_roots:[]},projection_roots:_(e.target.value)}})})})]})]}):null]})]}),(0,c.jsxs)(`footer`,{className:`project-settings-footer`,children:[(0,c.jsx)(`span`,{children:`.agents/config/project.yaml`}),(0,c.jsx)(`button`,{disabled:C,type:`submit`,children:C?r.saving:r.save})]})]}),I&&B?.hasMissingDependencies?(0,c.jsxs)(`div`,{"aria-live":`assertive`,className:`project-installation-toast`,role:`alert`,children:[(0,c.jsx)(`span`,{children:r.incompleteInstallation}),(0,c.jsx)(`button`,{"aria-label":r.dismiss,onClick:()=>L(!1),type:`button`,children:`×`})]}):null]})}function B(e,t){return`${new Intl.NumberFormat(t,{maximumFractionDigits:2}).format(e)}%`}function V({installation:e,locale:t}){let n=M[t];return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(`p`,{className:`project-installation-health`,children:[n.health,`:`,` `,e.health.state===`healthy`?t===`pt-BR`?`Saudável`:`Healthy`:e.health.state===`degraded`?t===`pt-BR`?`Degradada`:`Degraded`:n.unknown]}),(0,c.jsx)(H,{dimension:e.dependencies,label:n.dependencies,locale:t}),(0,c.jsx)(H,{dimension:e.documentation,label:n.documentation,locale:t})]})}function H({dimension:e,label:t,locale:n}){let r=M[n],i=e.state===`not_applicable`?r.notApplicable:e.percentage===null?r.unknown:B(e.percentage,n),a=U(e.state,n);return(0,c.jsxs)(`div`,{className:`project-settings-metric installation-metric is-${e.state}`,children:[(0,c.jsx)(`strong`,{children:i}),(0,c.jsx)(`span`,{children:e.total===null||e.completed===null?t:`${t} · ${e.completed}/${e.total}`}),(0,c.jsx)(`small`,{children:a})]})}function U(e,t){let n=M[t];return e===`complete`?n.complete:e===`incomplete`?n.incomplete:e===`not_applicable`?n.notApplicable:e===`unavailable`?n.unavailable:n.unknown}function W({checked:e,hint:t,label:n,onChange:r}){return(0,c.jsxs)(`div`,{className:`project-settings-toggle-field`,children:[(0,c.jsxs)(`label`,{className:`project-settings-toggle`,children:[(0,c.jsx)(`input`,{checked:e,onChange:e=>r(e.target.checked),type:`checkbox`}),(0,c.jsx)(`span`,{"aria-hidden":`true`}),(0,c.jsx)(`strong`,{children:n})]}),t?(0,c.jsx)(`small`,{children:t}):null]})}function G(e){return(0,c.jsx)(W,{...e})}function K({config:e,setConfig:t,text:n}){let r=e.execution&&e.execution.runtime!==`manual`&&e.execution.runtime!==`codex_native`?e.execution:v(),i=n=>t({...e,execution:{runtime:r.runtime,autonomous:n}});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{hint:e.autonomy?.version===1?n.autonomyProviderHint:n.providerHint,label:`Provider`,children:(0,c.jsxs)(`select`,{value:r.autonomous.provider,"aria-label":`Provider`,onChange:e=>i({...r.autonomous,provider:e.target.value}),children:[(0,c.jsx)(`option`,{value:`codex`,children:`codex`}),(0,c.jsx)(`option`,{value:`claude`,disabled:e.autonomy?.version===1,children:`claude`})]})}),(0,c.jsx)(u,{hint:n.executionModelHint,label:`Model`,children:(0,c.jsx)(`input`,{required:!0,value:r.autonomous.model,onChange:e=>i({...r.autonomous,model:e.target.value})})}),(0,c.jsx)(u,{hint:n.parallelismHint,label:`Max parallelism`,children:(0,c.jsx)(`input`,{max:8,min:1,type:`number`,value:r.autonomous.max_parallelism,onChange:e=>i({...r.autonomous,max_parallelism:Number(e.target.value)})})}),(0,c.jsx)(u,{hint:n.leaseHint,label:`Lease (ms)`,children:(0,c.jsx)(`input`,{max:36e5,min:5e3,step:1e3,type:`number`,value:r.autonomous.lease_ms,onChange:e=>i({...r.autonomous,lease_ms:Number(e.target.value)})})})]})}export{z as ProjectSettingsPage};
@@ -1 +1 @@
1
- import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{n as r}from"./traceability-DFpwb0TN.js";import{n as i}from"./index-CWcci-bM.js";var a=e(t(),1),o=n();function s(e,t){let n=t.trim().toLocaleLowerCase();return n===``?[...e]:e.filter(e=>`${e.title} ${e.id}`.toLocaleLowerCase().includes(n))}function c(e,t,n){return n?[...e]:s(e,t)}function l(e){return`traceability-task-option-${e}`}function u({locale:e,loadingTaskId:t,hasMoreTasks:n,isLoadingTasks:s,onLoadMoreTasks:u,onSelectTask:d,onOpenChange:f,onOpenPrd:p,onOpenSpec:m,selectedTaskId:h,tasks:g,trace:_}){let v=[...g].sort((e,t)=>Date.parse(t.created_at)-Date.parse(e.created_at)),y=v.find(e=>e.id===h),[b,x]=(0,a.useState)(()=>y?.title??h),[S,C]=(0,a.useState)(!1),[w,T]=(0,a.useState)(!1),[E,D]=(0,a.useState)(0),[O,k]=(0,a.useState)(12),A=(0,a.useMemo)(()=>c(v,b,w),[b,w,v]),j=A.slice(0,O),M=j.length<A.length,N=`traceability-task-search`,P=`traceability-task-results`,F=e===`pt-BR`?`Task selecionada`:`Selected task`,I=e===`pt-BR`?`Buscar task por nome ou ID`:`Search task by name or ID`,L=S?A[E]?.id:void 0;(0,a.useEffect)(()=>{x(y?.title??h),D(0)},[y?.title,h]);let R=e=>{x(e.title),C(!1),T(!1),d(e.id)},z=(e=!0)=>{C(!0),T(!0),e&&(D(0),k(12))};return(0,o.jsxs)(`section`,{className:`traceability-workspace`,children:[(0,o.jsxs)(`header`,{children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`label`,{htmlFor:N,children:F}),(0,o.jsx)(`input`,{"aria-activedescendant":L===void 0?void 0:l(L),"aria-autocomplete":`list`,"aria-controls":P,"aria-expanded":S,"aria-label":I,id:N,onChange:e=>{x(e.target.value),D(0),T(!1),k(12),C(!0)},onClick:()=>z(),onFocus:()=>z(),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),z(!1),D(e=>Math.min(e+1,Math.max(0,v.length-1)));else if(e.key===`ArrowUp`)e.preventDefault(),z(!1),D(e=>Math.max(0,e-1));else if(e.key===`Enter`&&S){let t=A[E];t!==void 0&&(e.preventDefault(),R(t))}else e.key===`Escape`&&C(!1)},role:`combobox`,type:`search`,value:b}),S?(0,o.jsx)(`div`,{"aria-label":I,className:`traceability-task-results`,id:P,onScroll:e=>{let{clientHeight:t,scrollHeight:r,scrollTop:a}=e.currentTarget;a+t<r-32||(n&&u(),j.length<A.length&&k(e=>i(e,A.length,12)))},role:`listbox`,children:A.length>0?j.map((e,t)=>(0,o.jsx)(`div`,{role:`presentation`,children:(0,o.jsx)(`button`,{"aria-selected":e.id===h,className:t===E?`is-active`:void 0,id:l(e.id),onClick:()=>R(e),role:`option`,type:`button`,children:(0,o.jsx)(`strong`,{children:e.title})})},e.id)):(0,o.jsx)(`div`,{className:`traceability-task-no-results`,role:`status`,children:e===`pt-BR`?`Nenhuma task encontrada.`:`No tasks found.`})}):null,S&&A.length>0?(0,o.jsx)(`p`,{"aria-live":`polite`,className:`traceability-task-pagination-status`,role:`status`,children:s?e===`pt-BR`?`Carregando mais tasks…`:`Loading more tasks…`:M||n?e===`pt-BR`?`${j.length} de ${A.length} tasks exibidas. Role para carregar mais.`:`${j.length} of ${A.length} tasks shown. Scroll to load more.`:e===`pt-BR`?`${A.length} tasks exibidas. Fim da lista.`:`${A.length} tasks shown. End of list.`}):null]}),(0,o.jsx)(`small`,{children:e===`pt-BR`?`Selecione pelo nome para visualizar o ciclo completo sem precisar do ID.`:`Select by name to inspect the complete lifecycle without knowing the ID.`})]}),t?(0,o.jsx)(`div`,{"aria-live":`polite`,className:`traceability-workspace-loading`,children:e===`pt-BR`?`Carregando as 6 etapas…`:`Loading all 6 stages…`}):_?(0,o.jsx)(r,{embedded:!0,locale:e,onClose:()=>void 0,onOpenChange:f,onOpenPrd:p,onOpenSpec:m,trace:_}):(0,o.jsx)(`p`,{children:e===`pt-BR`?`Nenhuma task disponível.`:`No task available.`})]})}export{u as TraceabilityWorkspace};
1
+ import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{n as r}from"./traceability-DFpwb0TN.js";import{n as i}from"./index-oqGtXP7j.js";var a=e(t(),1),o=n();function s(e,t){let n=t.trim().toLocaleLowerCase();return n===``?[...e]:e.filter(e=>`${e.title} ${e.id}`.toLocaleLowerCase().includes(n))}function c(e,t,n){return n?[...e]:s(e,t)}function l(e){return`traceability-task-option-${e}`}function u({locale:e,loadingTaskId:t,hasMoreTasks:n,isLoadingTasks:s,onLoadMoreTasks:u,onSelectTask:d,onOpenChange:f,onOpenPrd:p,onOpenSpec:m,selectedTaskId:h,tasks:g,trace:_}){let v=[...g].sort((e,t)=>Date.parse(t.created_at)-Date.parse(e.created_at)),y=v.find(e=>e.id===h),[b,x]=(0,a.useState)(()=>y?.title??h),[S,C]=(0,a.useState)(!1),[w,T]=(0,a.useState)(!1),[E,D]=(0,a.useState)(0),[O,k]=(0,a.useState)(12),A=(0,a.useMemo)(()=>c(v,b,w),[b,w,v]),j=A.slice(0,O),M=j.length<A.length,N=`traceability-task-search`,P=`traceability-task-results`,F=e===`pt-BR`?`Task selecionada`:`Selected task`,I=e===`pt-BR`?`Buscar task por nome ou ID`:`Search task by name or ID`,L=S?A[E]?.id:void 0;(0,a.useEffect)(()=>{x(y?.title??h),D(0)},[y?.title,h]);let R=e=>{x(e.title),C(!1),T(!1),d(e.id)},z=(e=!0)=>{C(!0),T(!0),e&&(D(0),k(12))};return(0,o.jsxs)(`section`,{className:`traceability-workspace`,children:[(0,o.jsxs)(`header`,{children:[(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`label`,{htmlFor:N,children:F}),(0,o.jsx)(`input`,{"aria-activedescendant":L===void 0?void 0:l(L),"aria-autocomplete":`list`,"aria-controls":P,"aria-expanded":S,"aria-label":I,id:N,onChange:e=>{x(e.target.value),D(0),T(!1),k(12),C(!0)},onClick:()=>z(),onFocus:()=>z(),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),z(!1),D(e=>Math.min(e+1,Math.max(0,v.length-1)));else if(e.key===`ArrowUp`)e.preventDefault(),z(!1),D(e=>Math.max(0,e-1));else if(e.key===`Enter`&&S){let t=A[E];t!==void 0&&(e.preventDefault(),R(t))}else e.key===`Escape`&&C(!1)},role:`combobox`,type:`search`,value:b}),S?(0,o.jsx)(`div`,{"aria-label":I,className:`traceability-task-results`,id:P,onScroll:e=>{let{clientHeight:t,scrollHeight:r,scrollTop:a}=e.currentTarget;a+t<r-32||(n&&u(),j.length<A.length&&k(e=>i(e,A.length,12)))},role:`listbox`,children:A.length>0?j.map((e,t)=>(0,o.jsx)(`div`,{role:`presentation`,children:(0,o.jsx)(`button`,{"aria-selected":e.id===h,className:t===E?`is-active`:void 0,id:l(e.id),onClick:()=>R(e),role:`option`,type:`button`,children:(0,o.jsx)(`strong`,{children:e.title})})},e.id)):(0,o.jsx)(`div`,{className:`traceability-task-no-results`,role:`status`,children:e===`pt-BR`?`Nenhuma task encontrada.`:`No tasks found.`})}):null,S&&A.length>0?(0,o.jsx)(`p`,{"aria-live":`polite`,className:`traceability-task-pagination-status`,role:`status`,children:s?e===`pt-BR`?`Carregando mais tasks…`:`Loading more tasks…`:M||n?e===`pt-BR`?`${j.length} de ${A.length} tasks exibidas. Role para carregar mais.`:`${j.length} of ${A.length} tasks shown. Scroll to load more.`:e===`pt-BR`?`${A.length} tasks exibidas. Fim da lista.`:`${A.length} tasks shown. End of list.`}):null]}),(0,o.jsx)(`small`,{children:e===`pt-BR`?`Selecione pelo nome para visualizar o ciclo completo sem precisar do ID.`:`Select by name to inspect the complete lifecycle without knowing the ID.`})]}),t?(0,o.jsx)(`div`,{"aria-live":`polite`,className:`traceability-workspace-loading`,children:e===`pt-BR`?`Carregando as 6 etapas…`:`Loading all 6 stages…`}):_?(0,o.jsx)(r,{embedded:!0,locale:e,onClose:()=>void 0,onOpenChange:f,onOpenPrd:p,onOpenSpec:m,trace:_}):(0,o.jsx)(`p`,{children:e===`pt-BR`?`Nenhuma task disponível.`:`No task available.`})]})}export{u as TraceabilityWorkspace};
@@ -8,6 +8,18 @@ English | [Português](README.md)
8
8
 
9
9
  ## Quick overview
10
10
 
11
+ The [v5.5 guide](docs/quality/v55-eficiencia-operacional.md) describes evidence
12
+ obligations exposed at intake, direct replay of completed lifecycle closure,
13
+ bounded journal segments, and impact-based test selection. Timing diagnostics
14
+ do not invalidate the cache; actual changes still do. Native hook evidence
15
+ limitations are reported separately.
16
+
17
+ The [v5.4 guide](docs/quality/v54-fechamento-cache-hooks.md) describes restricted
18
+ administrative closure after publication, the distinction between text and commands
19
+ in hooks, GitHub queries targeting the current repository, and objective acceptance
20
+ criteria. Partial evidence and historical outcomes remain visible; tests are rerun
21
+ when a change or finding invalidates the corresponding proof.
22
+
11
23
  The [rework prevention guide](docs/quality/v51-eficiencia-e-publicacao.md)
12
24
  documents complete checks before finalization, bounded Run reads, conservative
13
25
  test reuse, content-based Dashboard builds and separate npm confirmation.