@zaip-ai/cli 5.7.0 → 5.9.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 (55) hide show
  1. package/dist/services/adapters.d.ts +1 -1
  2. package/dist/services/adapters.js +1 -1
  3. package/package.json +1 -1
  4. package/templates/.agents/README-ENG.md +4 -0
  5. package/templates/.agents/README.md +4 -0
  6. package/templates/.agents/config/agents/discovery.json +1 -1
  7. package/templates/.agents/dashboard/.zaip-managed.json +26 -26
  8. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-B4XMYP00.js → DashboardHelpDialog-Fe0d2Tz3.js} +5 -1
  9. package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-DvMV9yit.js → PricingSettingsDialog-DK1lnaqS.js} +1 -1
  10. package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-CFhFcZjW.js → ProjectSettingsPage-Bz6dDc40.js} +1 -1
  11. package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-DkaJNHuG.js → TraceabilityWorkspace-Bc4WXDXf.js} +1 -1
  12. package/templates/.agents/dashboard/apps/frontend/dist/assets/{dashboard-localization-CwQfHYWq.js → dashboard-localization-r8ywAYW-.js} +4 -0
  13. package/templates/.agents/dashboard/apps/frontend/dist/assets/{index-DB2s40tU.js → index-DJnCLtCS.js} +2 -2
  14. package/templates/.agents/dashboard/apps/frontend/dist/index.html +1 -1
  15. package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
  16. package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
  17. package/templates/.agents/dashboard/modules/operations/package.json +1 -1
  18. package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
  19. package/templates/.agents/dashboard/packages/branding/package.json +1 -1
  20. package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
  21. package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
  22. package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
  23. package/templates/.agents/dashboard/packages/ui/package.json +1 -1
  24. package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
  25. package/templates/.agents/design/.zaip-managed.json +3 -3
  26. package/templates/.agents/design/apps/catalog/package.json +1 -1
  27. package/templates/.agents/design/packages/local-runtime/package.json +1 -1
  28. package/templates/.agents/requirements/autonomous-assurance.md +1 -1
  29. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
  30. package/templates/.agents/requirements/comparative-audit.md +1 -1
  31. package/templates/.agents/requirements/context-engine.md +1 -1
  32. package/templates/.agents/requirements/cost-observability.md +1 -1
  33. package/templates/.agents/requirements/dashboard-launch.md +1 -1
  34. package/templates/.agents/requirements/data-export.md +1 -1
  35. package/templates/.agents/requirements/design-system.md +1 -1
  36. package/templates/.agents/requirements/execution-engine.md +1 -1
  37. package/templates/.agents/requirements/kanban-dashboard.md +1 -1
  38. package/templates/.agents/requirements/model-orchestration.md +1 -1
  39. package/templates/.agents/requirements/public-distribution.md +1 -1
  40. package/templates/.agents/requirements/software-architecture.md +1 -1
  41. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  42. package/templates/.agents/requirements/work-lifecycle.md +1 -1
  43. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  44. package/templates/.agents/runtime/VERSION +1 -1
  45. package/templates/.agents/runtime/bin/zaip.mjs +51 -50
  46. package/templates/.agents/runtime/checksums.sha256 +5 -5
  47. package/templates/.agents/runtime/manifest.json +1 -1
  48. package/templates/.agents/runtime/provenance.json +4 -4
  49. package/templates/.agents/runtime/sbom.cdx.json +1 -1
  50. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs +15 -5
  51. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-publication-intent.test.mjs +51 -0
  52. package/templates/.agents/skills/zaip-skill-lifecycle-closure/references/post-publication-task-first.md +2 -0
  53. package/templates/.agents/skills/zaip-skill-task/references/commit-policy.md +1 -1
  54. package/templates/.agents/zaip-aios/VERSION +1 -1
  55. package/templates/template-manifest.json +63 -63
@@ -1,6 +1,6 @@
1
1
  import { type PublicAgentCatalog } from "./agent-adapters.js";
2
2
  export { isManagedAdapter } from "./managed-adapter.js";
3
- export declare const ADAPTERS_VERSION = "5.7.0";
3
+ export declare const ADAPTERS_VERSION = "5.9.0";
4
4
  export interface AdapterFile {
5
5
  path: string;
6
6
  content: string;
@@ -11,7 +11,7 @@ export { isManagedAdapter } from "./managed-adapter.js";
11
11
  import { CODEX_GITHUB_DEPLOY_RULES, CODEX_SECURITY_RULES } from "./codex-rules.js";
12
12
  import { codexWindowsHookCommand } from "./codex-windows-hook-command.js";
13
13
  import { applyTransactionalChanges, assertSafeDestination } from "./transactional-files.js";
14
- export const ADAPTERS_VERSION = "5.7.0";
14
+ export const ADAPTERS_VERSION = "5.9.0";
15
15
  const ROOT_GUIDANCE = `# ZAIP-AIOS
16
16
 
17
17
  Read \`.agents/config/project.yaml\` first. Apply ZAIP only for literal boolean \`zaip.enabled: true\`, except framework maintenance or \`zaip enable\`. \`AGENTS.md\` is a bootstrap; canonical guidance lives in \`.agents/\`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zaip-ai/cli",
3
- "version": "5.7.0",
3
+ "version": "5.9.0",
4
4
  "description": "CLI oficial para instalar e configurar o ZAIP-AIOS em qualquer repositório",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -6,6 +6,10 @@ English | [Português](README.md)
6
6
 
7
7
  ## Quick overview
8
8
 
9
+ Version 5.9 fixes persistence ordering for [resumable closure](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v59-fechamento-retomavel.md) and prevents Vitest's internal result cache from invalidating ZAIP's signed cache. The [efficiency report](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v59-eficiencia-medida.md) records the experiment, evidence limits, and delivery comparison metrics without assigning automatic grades.
10
+
11
+ The [v5.8 guide](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v58-fechamento-eficiencia.md) explains closure with separate package and publisher-repair SHAs, early contracts before builds, and removal of one duplicate execution. Blocked history remains preserved until proven recovery; grades and savings depend on observed delivery measurements.
12
+
9
13
  The [v5.7 guide](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v57-eficiencia-publicacao.md) documents preflight before long-running gates, every test-selection cause, caching by verified static dependencies, and sanitized progress. Hooks recognize the configured Node executable and literal log searches while preserving authority controls.
10
14
 
11
15
  The [v5.6 guide](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v56-publicacao-reproduzivel.md) describes the reproducible release runtime, immutable candidate review, and early impact-based validation. Reused coverage requires proof for the same candidate; functional changes and missing evidence retain the applicable gates.
@@ -6,6 +6,10 @@
6
6
 
7
7
  ## Visão rápida
8
8
 
9
+ A v5.9 corrige a ordem de persistência do [fechamento retomável](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v59-fechamento-retomavel.md) e evita que o cache interno do Vitest invalide o cache assinado do ZAIP. O [relatório de eficiência](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v59-eficiencia-medida.md) registra o experimento, os limites da prova e as métricas para comparar entregas sem atribuir notas automáticas.
10
+
11
+ O [guia da v5.8](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v58-fechamento-eficiencia.md) explica o fechamento com SHAs separados de pacote e reparo do publicador, os contratos antecipados antes do build e a remoção de uma execução duplicada. O histórico bloqueado é preservado até recuperação comprovada; notas e economia dependem das medidas da entrega.
12
+
9
13
  O [guia da v5.7](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v57-eficiencia-publicacao.md) documenta o preflight antes dos gates longos, todas as causas da seleção de testes, o cache por dependências estáticas verificadas e o progresso sanitizado. Os hooks reconhecem o Node configurado e pesquisas literais em logs sem dispensar controles de autoridade.
10
14
 
11
15
  O [guia da v5.6](https://github.com/zaip-ai/zaip-aios/blob/main/docs/quality/v56-publicacao-reproduzivel.md) apresenta o runtime reproduzível de publicação, a revisão do candidato imutável e a validação antecipada por impacto. Cobertura reutilizada exige prova do mesmo candidato; alterações funcionais e provas ausentes mantêm os gates aplicáveis.
@@ -1,5 +1,5 @@
1
1
  {
2
- "_zaip_managed": "zaip-managed generated-do-not-edit source=agent-discovery version=5.7.0 sha256=3def7a2b43c1a751f8e68754ef94cb107a80b5d26e11f065af2b4cc145fc8897",
2
+ "_zaip_managed": "zaip-managed generated-do-not-edit source=agent-discovery version=5.9.0 sha256=3def7a2b43c1a751f8e68754ef94cb107a80b5d26e11f065af2b4cc145fc8897",
3
3
  "schema_version": 1,
4
4
  "source": {
5
5
  "path": ".agents/config/agents/catalog.yaml",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "5.7.0",
3
+ "version": "5.9.0",
4
4
  "files": [
5
5
  {
6
6
  "path": "DATA-DICTIONARY.md",
@@ -14,29 +14,29 @@
14
14
  "path": "apps/frontend/dist/assets/CostCalculationGuidePage-uR-asJv_.js",
15
15
  "sha256": "d0366ee0d847fe681de0971a14c80ee3a6af1430c0e9c5eb4f84f14a4b734b82"
16
16
  },
17
- {
18
- "path": "apps/frontend/dist/assets/DashboardHelpDialog-B4XMYP00.js",
19
- "sha256": "398d15acb212aa40d9c30bece49a30ca4d11e969141e5b23bc10e21856e77b82"
20
- },
21
17
  {
22
18
  "path": "apps/frontend/dist/assets/DashboardHelpDialog-DRI_XwUf.css",
23
19
  "sha256": "95dbb5c26ad73831f36f2a51d5e08ef5eee7ca85190764a3e63bf1e700fbadf8"
24
20
  },
25
21
  {
26
- "path": "apps/frontend/dist/assets/PricingSettingsDialog-DvMV9yit.js",
27
- "sha256": "83af678b2d9d34bd878c11ccd0807e8a589263403815b8a9aa53c88382d16e1d"
22
+ "path": "apps/frontend/dist/assets/DashboardHelpDialog-Fe0d2Tz3.js",
23
+ "sha256": "3cb2660d666728fcc2343504904641a0ab95caa3dcbdb4773a9f89b0090d22be"
24
+ },
25
+ {
26
+ "path": "apps/frontend/dist/assets/PricingSettingsDialog-DK1lnaqS.js",
27
+ "sha256": "9a1986454653eecc187f5e1d408b19ebbc021795bf4f4505c44442674c489260"
28
28
  },
29
29
  {
30
- "path": "apps/frontend/dist/assets/ProjectSettingsPage-CFhFcZjW.js",
31
- "sha256": "e8ec270b89b54c4d88d9841f2b67f0f1b911d2e2ee03d56c1fb75f49850ed0cd"
30
+ "path": "apps/frontend/dist/assets/ProjectSettingsPage-Bz6dDc40.js",
31
+ "sha256": "3cabe1ede95b43703cd4ff556e5df2e3dd5b56b15fa4b7be9045ae466b0ff5b2"
32
32
  },
33
33
  {
34
34
  "path": "apps/frontend/dist/assets/ProjectSettingsPage-CQMhvzvJ.css",
35
35
  "sha256": "10e875c4e3ab6c252983822e25a85db3d707d903c0fcf39812909fdd1d013f48"
36
36
  },
37
37
  {
38
- "path": "apps/frontend/dist/assets/TraceabilityWorkspace-DkaJNHuG.js",
39
- "sha256": "4f4dc230651f358c9279c6c45b624b4904fd431a5da076c7804caf2142c3f413"
38
+ "path": "apps/frontend/dist/assets/TraceabilityWorkspace-Bc4WXDXf.js",
39
+ "sha256": "1eceab89fda71ea8f7a7ed4eb6a8ad6ba3a70d82df5031905ce39ed473eaf3e5"
40
40
  },
41
41
  {
42
42
  "path": "apps/frontend/dist/assets/TraceabilityWorkspace-DvvavDLY.css",
@@ -51,16 +51,16 @@
51
51
  "sha256": "90be9550e3b6719ffc7a029ac35a93a4f14e95263b3996ad6c06dbfc0490f307"
52
52
  },
53
53
  {
54
- "path": "apps/frontend/dist/assets/dashboard-localization-CwQfHYWq.js",
55
- "sha256": "4c949cdac87cfec3507308eac9d7ffa11b72a6375cadb437d74051061e694b5a"
54
+ "path": "apps/frontend/dist/assets/dashboard-localization-r8ywAYW-.js",
55
+ "sha256": "96967a263b1598f9d449a494b5179cf4654ab1ad400214de81fddd9bc22af66a"
56
56
  },
57
57
  {
58
58
  "path": "apps/frontend/dist/assets/icons-vendor-CjGGux6h.js",
59
59
  "sha256": "0f615bc6eaeb21d12fc0457867d6acbfe9434ebae0ebecea9444262e46b972e9"
60
60
  },
61
61
  {
62
- "path": "apps/frontend/dist/assets/index-DB2s40tU.js",
63
- "sha256": "3cf69156017738b9520e93db0129775fecf89c8ed1139fc6df959daf7fc1c860"
62
+ "path": "apps/frontend/dist/assets/index-DJnCLtCS.js",
63
+ "sha256": "e804f730389a05873084150664b25bf91af8c9f13f090cc8a021f9acf1f90609"
64
64
  },
65
65
  {
66
66
  "path": "apps/frontend/dist/assets/index-DZhppOIk.css",
@@ -92,7 +92,7 @@
92
92
  },
93
93
  {
94
94
  "path": "apps/frontend/dist/index.html",
95
- "sha256": "e63c763258aee77756e8bae671e24cee7b4c9d61c5dde243ce520451d9883dcd"
95
+ "sha256": "21a13ad63f0b7226c57e63c8e4ef3c915a1968af7d9aaac3e10e9deed87e498e"
96
96
  },
97
97
  {
98
98
  "path": "apps/frontend/dist/logo_novo_azul.png",
@@ -104,7 +104,7 @@
104
104
  },
105
105
  {
106
106
  "path": "apps/frontend/package.json",
107
- "sha256": "431336aa01de6bf01c0e79b8ec665e211e5aaeb1f4a9029f24c0c4586cff5f92"
107
+ "sha256": "2512df78444312d0bebcde34465dc3b5bfa87062c70153fbbb01273df41e0871"
108
108
  },
109
109
  {
110
110
  "path": "apps/frontend/playwright.dom.config.ts",
@@ -600,7 +600,7 @@
600
600
  },
601
601
  {
602
602
  "path": "modules/cost-monitor/package.json",
603
- "sha256": "5c6cdf54d3367a6b7fbc266226d96ea0400257016fd630555da488c1690b6a6d"
603
+ "sha256": "5237aca065dbbcf854c000bef2f35a707787ad5e3648f86069dcaf7b49747a9f"
604
604
  },
605
605
  {
606
606
  "path": "modules/cost-monitor/src/agent-groups.test.ts",
@@ -1012,7 +1012,7 @@
1012
1012
  },
1013
1013
  {
1014
1014
  "path": "modules/operations/package.json",
1015
- "sha256": "c8e0b51940c6bc669c5bd8502cebeb8092d9f458465fe91a391eb12f7ed965d2"
1015
+ "sha256": "ebe2b46b61c5a2219c5b10adec64b2389240fbe24d9646838dbf6abbd6922ca0"
1016
1016
  },
1017
1017
  {
1018
1018
  "path": "modules/operations/src/contracts.ts",
@@ -1752,7 +1752,7 @@
1752
1752
  },
1753
1753
  {
1754
1754
  "path": "modules/traceability/package.json",
1755
- "sha256": "0dc8a19bbca6313938bfed33bcb37d9eec85abee2baadc67165d58d592477c28"
1755
+ "sha256": "f62eaa4eec0be736ac1cd05afc8914e8e2ac53d89c1ce376bb228c8c9efd9d92"
1756
1756
  },
1757
1757
  {
1758
1758
  "path": "modules/traceability/src/contracts.ts",
@@ -1824,7 +1824,7 @@
1824
1824
  },
1825
1825
  {
1826
1826
  "path": "packages/branding/package.json",
1827
- "sha256": "31b31853d0855b34762953ee1577ebcab6ba9f1dc7b3e31cc292cf5e516982ec"
1827
+ "sha256": "afaee3d4248b45f6c74353f4991ffd36a56c483fcfcdcbe49e4885ffe68cc8e2"
1828
1828
  },
1829
1829
  {
1830
1830
  "path": "packages/branding/src/index.ts",
@@ -1836,7 +1836,7 @@
1836
1836
  },
1837
1837
  {
1838
1838
  "path": "packages/contracts/package.json",
1839
- "sha256": "3c0dfed50f43e20b0fa803a805361eb19430a19c4a0697c3190b7305450d2669"
1839
+ "sha256": "22dcbf4f73d2d504fcbd95e1b9baf87e9ffd43a391f704b19fbdee4fdfa5d1d4"
1840
1840
  },
1841
1841
  {
1842
1842
  "path": "packages/contracts/src/export.ts",
@@ -1856,7 +1856,7 @@
1856
1856
  },
1857
1857
  {
1858
1858
  "path": "packages/data-export/package.json",
1859
- "sha256": "77effb1a003eb5bd43fe48b72d13b449f6ff9ed5a029236f4e55f0dc5b476a51"
1859
+ "sha256": "a7d332d60b0582d5d3b42fe7adcdcc96a0e4e9f2744f42c69a1cd69486a24084"
1860
1860
  },
1861
1861
  {
1862
1862
  "path": "packages/data-export/src/index.test.ts",
@@ -1912,7 +1912,7 @@
1912
1912
  },
1913
1913
  {
1914
1914
  "path": "packages/local-runtime/package.json",
1915
- "sha256": "06c5d57081e95887281d6bdba6189707213aae4d6886fb0af3afce146e9ba1e0"
1915
+ "sha256": "5e92fce33bb651ef30d5075907af582d00a13b36e54da8cd742972802bed5b25"
1916
1916
  },
1917
1917
  {
1918
1918
  "path": "packages/local-runtime/scripts/build-frontend.mjs",
@@ -2848,7 +2848,7 @@
2848
2848
  },
2849
2849
  {
2850
2850
  "path": "packages/ui/package.json",
2851
- "sha256": "e00b503ecdb09a1c42724aed19f98a0615fb246c0ca9a3d4ca8a8300edb4d974"
2851
+ "sha256": "a8bf202861df03a7cb8ed2b8fc401de430dac74399ce1c0fa1c98151db4adc3e"
2852
2852
  },
2853
2853
  {
2854
2854
  "path": "packages/ui/src/DashboardHeader.test.mjs",
@@ -2956,7 +2956,7 @@
2956
2956
  },
2957
2957
  {
2958
2958
  "path": "tests/e2e/package.json",
2959
- "sha256": "1402a0923dd5629f86cb86efccdc5b8171d7c4f0903527349649b46bb5a5d76c"
2959
+ "sha256": "288c7cb339ab72c1dcca6957200fdf526015ce05260c2c0f4046a4d6cfa38d93"
2960
2960
  },
2961
2961
  {
2962
2962
  "path": "tests/e2e/playwright.config.ts",
@@ -1,4 +1,4 @@
1
- import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{t as r}from"./dashboard-localization-CwQfHYWq.js";var i=`# Primeiros passos
1
+ import{n as e}from"./rolldown-runtime-Bh1tDfsg.js";import{E as t,w as n}from"./cost-monitor-B0Jwz_rk.js";import{t as r}from"./dashboard-localization-r8ywAYW-.js";var i=`# Primeiros passos
2
2
 
3
3
  1. Leia \`.agents/config/project.yaml\` e \`.agents/rules/core.md\`.
4
4
  2. Consulte \`.agents/records/lifecycle/\` para descobrir o estado atual pelos manifests canônicos.
@@ -2343,6 +2343,10 @@ matriz de performance aprovada apenas porque consultas focadas passaram.
2343
2343
 
2344
2344
  ## Visão rápida
2345
2345
 
2346
+ A v5.9 corrige a ordem de persistência do [fechamento retomável](docs/quality/v59-fechamento-retomavel.md) e evita que o cache interno do Vitest invalide o cache assinado do ZAIP. O [relatório de eficiência](docs/quality/v59-eficiencia-medida.md) registra o experimento, os limites da prova e as métricas para comparar entregas sem atribuir notas automáticas.
2347
+
2348
+ O [guia da v5.8](docs/quality/v58-fechamento-eficiencia.md) explica o fechamento com SHAs separados de pacote e reparo do publicador, os contratos antecipados antes do build e a remoção de uma execução duplicada. O histórico bloqueado é preservado até recuperação comprovada; notas e economia dependem das medidas da entrega.
2349
+
2346
2350
  O [guia da v5.7](docs/quality/v57-eficiencia-publicacao.md) documenta o preflight antes dos gates longos, todas as causas da seleção de testes, o cache por dependências estáticas verificadas e o progresso sanitizado. Os hooks reconhecem o Node configurado e pesquisas literais em logs sem dispensar controles de autoridade.
2347
2351
 
2348
2352
  O [guia da v5.6](docs/quality/v56-publicacao-reproduzivel.md) apresenta o runtime reproduzível de publicação, a revisão do candidato imutável e a validação antecipada por impacto. Cobertura reutilizada exige prova do mesmo candidato; alterações funcionais e provas ausentes mantêm os gates aplicáveis.
@@ -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"./dashboard-localization-CwQfHYWq.js";var i=e(t(),1),a=n();function o({catalog:e,fxRate:t,locale:n,onClose:o,onSave:c,onSaveFxRate:l}){let u=r[n],[d,f]=(0,i.useState)(e),[p,m]=(0,i.useState)(t?.rate??0),[h,g]=(0,i.useState)(!1),_=(e,t)=>f(n=>({...n,models:n.models.map((n,r)=>r===e?{...n,...t}:n)})),v=e=>Math.max(0,Number(e)||0);return(0,a.jsx)(`main`,{className:`pricing-backdrop`,children:(0,a.jsxs)(`section`,{"aria-labelledby":`pricing-page-title`,className:`pricing-dialog`,children:[(0,a.jsxs)(`header`,{children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`small`,{children:u.eyebrow}),(0,a.jsx)(`h1`,{id:`pricing-page-title`,children:u.title}),(0,a.jsx)(`p`,{children:u.description})]}),(0,a.jsxs)(`button`,{className:`pricing-back-button`,onClick:o,type:`button`,children:[(0,a.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` `,u.back]})]}),(0,a.jsxs)(`div`,{className:`pricing-fx-settings`,children:[(0,a.jsxs)(`div`,{className:`pricing-fx-copy`,children:[(0,a.jsx)(`strong`,{children:u.fxTitle}),(0,a.jsx)(`p`,{children:u.fxDescription})]}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:u.fxLabel}),(0,a.jsxs)(`div`,{className:`pricing-fx-input`,children:[(0,a.jsx)(`span`,{children:`R$`}),(0,a.jsx)(`input`,{"aria-label":u.fxAriaLabel,min:`0.0001`,onChange:e=>m(Math.max(1e-4,Number(e.target.value)||0)),step:`0.0001`,type:`number`,value:p})]})]})]}),(0,a.jsxs)(`div`,{className:`pricing-table-heading`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`strong`,{children:u.catalog}),(0,a.jsx)(`p`,{children:u.pricesPerMillion})]}),(0,a.jsxs)(`span`,{children:[d.models.length,` `,u.models]})]}),(0,a.jsx)(`div`,{className:`pricing-table-wrap`,children:(0,a.jsxs)(`table`,{children:[(0,a.jsx)(`thead`,{children:(0,a.jsxs)(`tr`,{children:[(0,a.jsx)(`th`,{children:u.model}),(0,a.jsx)(`th`,{children:u.provider}),(0,a.jsx)(`th`,{children:u.input}),(0,a.jsx)(`th`,{children:u.cache}),(0,a.jsx)(`th`,{children:u.output}),(0,a.jsx)(`th`,{children:u.reasoning}),(0,a.jsx)(`th`,{children:u.priorityInput}),(0,a.jsx)(`th`,{children:u.priorityCache}),(0,a.jsx)(`th`,{children:u.priorityOutput}),(0,a.jsx)(`th`,{children:u.priorityReasoning}),(0,a.jsx)(`th`,{children:u.contextLimit}),(0,a.jsx)(`th`,{children:u.inputMultiplier}),(0,a.jsx)(`th`,{children:u.outputMultiplier}),(0,a.jsx)(`th`,{})]})}),(0,a.jsx)(`tbody`,{children:d.models.map((e,t)=>(0,a.jsxs)(`tr`,{children:[(0,a.jsxs)(`td`,{children:[(0,a.jsx)(`input`,{"aria-label":u.model,onChange:e=>_(t,{id:e.target.value}),value:e.id}),(0,a.jsx)(`small`,{children:e.aliases.join(`, `)||u.noAliases})]}),(0,a.jsx)(`td`,{children:(0,a.jsxs)(`select`,{onChange:e=>_(t,{provider:e.target.value}),value:e.provider,children:[(0,a.jsx)(`option`,{value:`openai`,children:`OpenAI`}),(0,a.jsx)(`option`,{value:`anthropic`,children:`Anthropic`})]})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{input_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.input_per_million_usd})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{cached_input_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.cached_input_per_million_usd??0})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{output_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.output_per_million_usd})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{reasoning_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.reasoning_per_million_usd??0})}),[`priority_input_per_million_usd`,`priority_cached_input_per_million_usd`,`priority_output_per_million_usd`,`priority_reasoning_per_million_usd`].map(n=>(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{[n]:v(e.target.value)}),step:`0.001`,type:`number`,value:e[n]??0})},n)),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{long_context_threshold_tokens:v(e.target.value)||null}),step:`1`,type:`number`,value:e.long_context_threshold_tokens??0})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0.001`,onChange:e=>_(t,{long_context_input_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_input_multiplier})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0.001`,onChange:e=>_(t,{long_context_output_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_output_multiplier})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`button`,{"aria-label":u.removeModel,onClick:()=>f(e=>({...e,models:e.models.filter((e,n)=>n!==t)})),type:`button`,children:`×`})})]},e.id))})]})}),(0,a.jsxs)(`footer`,{children:[(0,a.jsxs)(`button`,{onClick:()=>f(e=>({...e,models:[...e.models,s(n)]})),type:`button`,children:[`+ `,u.addModel]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`button`,{onClick:o,type:`button`,children:u.cancel}),(0,a.jsx)(`button`,{disabled:h,onClick:async()=>{g(!0);try{await c(d),await l(p),o()}finally{g(!1)}},type:`button`,children:h?u.saving:u.save})]})]})]})})}function s(e=`pt-BR`){let t=r[e];return{id:t.newModel,provider:`openai`,aliases:[],input_per_million_usd:0,cached_input_per_million_usd:0,output_per_million_usd:0,reasoning_per_million_usd:0,priority_input_per_million_usd:null,priority_cached_input_per_million_usd:null,priority_output_per_million_usd:null,priority_reasoning_per_million_usd:null,reasoning_billed_separately:!1,long_context_threshold_tokens:null,long_context_input_multiplier:1,long_context_output_multiplier:1,source_label:t.manualOverride,source_url:`https://developers.openai.com/api/docs/pricing`,notes:[t.editedNote]}}export{o as PricingSettingsPage};
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"./dashboard-localization-r8ywAYW-.js";var i=e(t(),1),a=n();function o({catalog:e,fxRate:t,locale:n,onClose:o,onSave:c,onSaveFxRate:l}){let u=r[n],[d,f]=(0,i.useState)(e),[p,m]=(0,i.useState)(t?.rate??0),[h,g]=(0,i.useState)(!1),_=(e,t)=>f(n=>({...n,models:n.models.map((n,r)=>r===e?{...n,...t}:n)})),v=e=>Math.max(0,Number(e)||0);return(0,a.jsx)(`main`,{className:`pricing-backdrop`,children:(0,a.jsxs)(`section`,{"aria-labelledby":`pricing-page-title`,className:`pricing-dialog`,children:[(0,a.jsxs)(`header`,{children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`small`,{children:u.eyebrow}),(0,a.jsx)(`h1`,{id:`pricing-page-title`,children:u.title}),(0,a.jsx)(`p`,{children:u.description})]}),(0,a.jsxs)(`button`,{className:`pricing-back-button`,onClick:o,type:`button`,children:[(0,a.jsx)(`span`,{"aria-hidden":`true`,children:`←`}),` `,u.back]})]}),(0,a.jsxs)(`div`,{className:`pricing-fx-settings`,children:[(0,a.jsxs)(`div`,{className:`pricing-fx-copy`,children:[(0,a.jsx)(`strong`,{children:u.fxTitle}),(0,a.jsx)(`p`,{children:u.fxDescription})]}),(0,a.jsxs)(`label`,{children:[(0,a.jsx)(`span`,{children:u.fxLabel}),(0,a.jsxs)(`div`,{className:`pricing-fx-input`,children:[(0,a.jsx)(`span`,{children:`R$`}),(0,a.jsx)(`input`,{"aria-label":u.fxAriaLabel,min:`0.0001`,onChange:e=>m(Math.max(1e-4,Number(e.target.value)||0)),step:`0.0001`,type:`number`,value:p})]})]})]}),(0,a.jsxs)(`div`,{className:`pricing-table-heading`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`strong`,{children:u.catalog}),(0,a.jsx)(`p`,{children:u.pricesPerMillion})]}),(0,a.jsxs)(`span`,{children:[d.models.length,` `,u.models]})]}),(0,a.jsx)(`div`,{className:`pricing-table-wrap`,children:(0,a.jsxs)(`table`,{children:[(0,a.jsx)(`thead`,{children:(0,a.jsxs)(`tr`,{children:[(0,a.jsx)(`th`,{children:u.model}),(0,a.jsx)(`th`,{children:u.provider}),(0,a.jsx)(`th`,{children:u.input}),(0,a.jsx)(`th`,{children:u.cache}),(0,a.jsx)(`th`,{children:u.output}),(0,a.jsx)(`th`,{children:u.reasoning}),(0,a.jsx)(`th`,{children:u.priorityInput}),(0,a.jsx)(`th`,{children:u.priorityCache}),(0,a.jsx)(`th`,{children:u.priorityOutput}),(0,a.jsx)(`th`,{children:u.priorityReasoning}),(0,a.jsx)(`th`,{children:u.contextLimit}),(0,a.jsx)(`th`,{children:u.inputMultiplier}),(0,a.jsx)(`th`,{children:u.outputMultiplier}),(0,a.jsx)(`th`,{})]})}),(0,a.jsx)(`tbody`,{children:d.models.map((e,t)=>(0,a.jsxs)(`tr`,{children:[(0,a.jsxs)(`td`,{children:[(0,a.jsx)(`input`,{"aria-label":u.model,onChange:e=>_(t,{id:e.target.value}),value:e.id}),(0,a.jsx)(`small`,{children:e.aliases.join(`, `)||u.noAliases})]}),(0,a.jsx)(`td`,{children:(0,a.jsxs)(`select`,{onChange:e=>_(t,{provider:e.target.value}),value:e.provider,children:[(0,a.jsx)(`option`,{value:`openai`,children:`OpenAI`}),(0,a.jsx)(`option`,{value:`anthropic`,children:`Anthropic`})]})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{input_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.input_per_million_usd})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{cached_input_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.cached_input_per_million_usd??0})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{output_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.output_per_million_usd})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{reasoning_per_million_usd:v(e.target.value)}),step:`0.001`,type:`number`,value:e.reasoning_per_million_usd??0})}),[`priority_input_per_million_usd`,`priority_cached_input_per_million_usd`,`priority_output_per_million_usd`,`priority_reasoning_per_million_usd`].map(n=>(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{[n]:v(e.target.value)}),step:`0.001`,type:`number`,value:e[n]??0})},n)),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0`,onChange:e=>_(t,{long_context_threshold_tokens:v(e.target.value)||null}),step:`1`,type:`number`,value:e.long_context_threshold_tokens??0})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0.001`,onChange:e=>_(t,{long_context_input_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_input_multiplier})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`input`,{min:`0.001`,onChange:e=>_(t,{long_context_output_multiplier:Math.max(.001,Number(e.target.value)||1)}),step:`0.1`,type:`number`,value:e.long_context_output_multiplier})}),(0,a.jsx)(`td`,{children:(0,a.jsx)(`button`,{"aria-label":u.removeModel,onClick:()=>f(e=>({...e,models:e.models.filter((e,n)=>n!==t)})),type:`button`,children:`×`})})]},e.id))})]})}),(0,a.jsxs)(`footer`,{children:[(0,a.jsxs)(`button`,{onClick:()=>f(e=>({...e,models:[...e.models,s(n)]})),type:`button`,children:[`+ `,u.addModel]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`button`,{onClick:o,type:`button`,children:u.cancel}),(0,a.jsx)(`button`,{disabled:h,onClick:async()=>{g(!0);try{await c(d),await l(p),o()}finally{g(!1)}},type:`button`,children:h?u.saving:u.save})]})]})]})})}function s(e=`pt-BR`){let t=r[e];return{id:t.newModel,provider:`openai`,aliases:[],input_per_million_usd:0,cached_input_per_million_usd:0,output_per_million_usd:0,reasoning_per_million_usd:0,priority_input_per_million_usd:null,priority_cached_input_per_million_usd:null,priority_output_per_million_usd:null,priority_reasoning_per_million_usd:null,reasoning_billed_separately:!1,long_context_threshold_tokens:null,long_context_input_multiplier:1,long_context_output_multiplier:1,source_label:t.manualOverride,source_url:`https://developers.openai.com/api/docs/pricing`,notes:[t.editedNote]}}export{o as PricingSettingsPage};
@@ -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-DB2s40tU.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-DJnCLtCS.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-DB2s40tU.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-DJnCLtCS.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,10 @@ English | [Português](README.md)
8
8
 
9
9
  ## Quick overview
10
10
 
11
+ Version 5.9 fixes persistence ordering for [resumable closure](docs/quality/v59-fechamento-retomavel.md) and prevents Vitest's internal result cache from invalidating ZAIP's signed cache. The [efficiency report](docs/quality/v59-eficiencia-medida.md) records the experiment, evidence limits, and delivery comparison metrics without assigning automatic grades.
12
+
13
+ The [v5.8 guide](docs/quality/v58-fechamento-eficiencia.md) explains closure with separate package and publisher-repair SHAs, early contracts before builds, and removal of one duplicate execution. Blocked history remains preserved until proven recovery; grades and savings depend on observed delivery measurements.
14
+
11
15
  The [v5.7 guide](docs/quality/v57-eficiencia-publicacao.md) documents preflight before long-running gates, every test-selection cause, caching by verified static dependencies, and sanitized progress. Hooks recognize the configured Node executable and literal log searches while preserving authority controls.
12
16
 
13
17
  The [v5.6 guide](docs/quality/v56-publicacao-reproduzivel.md) describes the reproducible release runtime, immutable candidate review, and early impact-based validation. Reused coverage requires proof for the same candidate; functional changes and missing evidence retain the applicable gates.