@otea/cli 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/LICENSE +661 -0
  2. package/README.es.md +151 -0
  3. package/README.md +251 -3
  4. package/THIRD_PARTY_NOTICES.md +114 -0
  5. package/bin/otea.mjs +28 -0
  6. package/dist/app/agent-detail.js +26 -0
  7. package/dist/app/agent-draft.js +429 -0
  8. package/dist/app/agent-prompts.js +52 -0
  9. package/dist/app/agents.js +77 -0
  10. package/dist/app/asking.js +43 -0
  11. package/dist/app/board-archive.js +243 -0
  12. package/dist/app/board-migration.js +272 -0
  13. package/dist/app/boards.js +870 -0
  14. package/dist/app/branch-owner.js +48 -0
  15. package/dist/app/brief.js +53 -0
  16. package/dist/app/choices.js +61 -0
  17. package/dist/app/collections.js +101 -0
  18. package/dist/app/context.js +1 -0
  19. package/dist/app/crop.js +56 -0
  20. package/dist/app/devices.js +62 -0
  21. package/dist/app/draft-request.js +82 -0
  22. package/dist/app/events.js +12 -0
  23. package/dist/app/evidence.js +287 -0
  24. package/dist/app/gates.js +610 -0
  25. package/dist/app/guide.js +37 -0
  26. package/dist/app/home.js +145 -0
  27. package/dist/app/init-boards.js +36 -0
  28. package/dist/app/intake.js +25 -0
  29. package/dist/app/item-search.js +141 -0
  30. package/dist/app/items.js +318 -0
  31. package/dist/app/keep-waiting.js +44 -0
  32. package/dist/app/land-order.js +107 -0
  33. package/dist/app/language.js +52 -0
  34. package/dist/app/launcher.js +56 -0
  35. package/dist/app/lease-take.js +54 -0
  36. package/dist/app/leases.js +86 -0
  37. package/dist/app/machine.js +39 -0
  38. package/dist/app/merged.js +89 -0
  39. package/dist/app/migrate.js +171 -0
  40. package/dist/app/next.js +1637 -0
  41. package/dist/app/notes.js +319 -0
  42. package/dist/app/notify-targets.js +113 -0
  43. package/dist/app/opened.js +25 -0
  44. package/dist/app/owner-only.js +34 -0
  45. package/dist/app/performance.js +28 -0
  46. package/dist/app/phone.js +97 -0
  47. package/dist/app/presence.js +596 -0
  48. package/dist/app/preset-views.js +25 -0
  49. package/dist/app/presets.js +129 -0
  50. package/dist/app/priority.js +156 -0
  51. package/dist/app/profile.js +86 -0
  52. package/dist/app/project.js +247 -0
  53. package/dist/app/proofs.js +179 -0
  54. package/dist/app/questions.js +215 -0
  55. package/dist/app/reader-filter.js +58 -0
  56. package/dist/app/relations.js +164 -0
  57. package/dist/app/relay.js +98 -0
  58. package/dist/app/repos.js +176 -0
  59. package/dist/app/restart.js +92 -0
  60. package/dist/app/set-aside.js +64 -0
  61. package/dist/app/system-locale.js +6 -0
  62. package/dist/app/tailscale-cli.js +77 -0
  63. package/dist/app/tailscale-testing.js +41 -0
  64. package/dist/app/tailscale.js +177 -0
  65. package/dist/app/tips.js +30 -0
  66. package/dist/app/topics-everywhere.js +53 -0
  67. package/dist/app/topics.js +453 -0
  68. package/dist/app/undo.js +52 -0
  69. package/dist/app/validate.js +131 -0
  70. package/dist/app/watch.js +48 -0
  71. package/dist/cli/command.js +44 -0
  72. package/dist/cli/commands.js +3303 -0
  73. package/dist/cli/exit-codes.js +70 -0
  74. package/dist/cli/forge.js +176 -0
  75. package/dist/cli/format.js +340 -0
  76. package/dist/cli/gh.js +17 -0
  77. package/dist/cli/gitrepo.js +489 -0
  78. package/dist/cli/help.js +101 -0
  79. package/dist/cli/hooks.js +232 -0
  80. package/dist/cli/main.js +37 -0
  81. package/dist/cli/merged-outside.js +58 -0
  82. package/dist/cli/names.js +154 -0
  83. package/dist/cli/opener.js +21 -0
  84. package/dist/cli/owner.js +154 -0
  85. package/dist/cli/phone.js +221 -0
  86. package/dist/cli/ports.js +24 -0
  87. package/dist/cli/probe.js +18 -0
  88. package/dist/cli/run.js +246 -0
  89. package/dist/cli/serve-file.js +21 -0
  90. package/dist/cli/stats.js +55 -0
  91. package/dist/cli/version.js +3 -0
  92. package/dist/core/agent-guide.js +31 -0
  93. package/dist/core/agent-prompts.js +139 -0
  94. package/dist/core/authority.js +94 -0
  95. package/dist/core/board/analysis.js +86 -0
  96. package/dist/core/board/choices.js +100 -0
  97. package/dist/core/board/compile.js +362 -0
  98. package/dist/core/board/engine.js +523 -0
  99. package/dist/core/board/hints.js +46 -0
  100. package/dist/core/board/history.js +146 -0
  101. package/dist/core/board/ids.js +87 -0
  102. package/dist/core/board/joins.js +30 -0
  103. package/dist/core/board/mentions.js +68 -0
  104. package/dist/core/board/merged.js +18 -0
  105. package/dist/core/board/model.js +135 -0
  106. package/dist/core/board/next.js +1116 -0
  107. package/dist/core/board/notes.js +298 -0
  108. package/dist/core/board/performance.js +218 -0
  109. package/dist/core/board/plan.js +299 -0
  110. package/dist/core/board/problems.js +232 -0
  111. package/dist/core/board/proofs.js +84 -0
  112. package/dist/core/board/questions.js +114 -0
  113. package/dist/core/board/reading.js +220 -0
  114. package/dist/core/board/readings.js +534 -0
  115. package/dist/core/board/schema.js +335 -0
  116. package/dist/core/board/shape-words.js +179 -0
  117. package/dist/core/board/template-words.js +23 -0
  118. package/dist/core/board/templates-catalogue.js +965 -0
  119. package/dist/core/board/templates-coverage.js +261 -0
  120. package/dist/core/board/templates-flows.js +779 -0
  121. package/dist/core/board/templates.js +586 -0
  122. package/dist/core/brief.js +93 -0
  123. package/dist/core/diagram.js +80 -0
  124. package/dist/core/errors.js +12 -0
  125. package/dist/core/evidence.js +33 -0
  126. package/dist/core/fields.js +129 -0
  127. package/dist/core/hierarchy.js +30 -0
  128. package/dist/core/icons.js +181 -0
  129. package/dist/core/image-crop.js +166 -0
  130. package/dist/core/item.js +49 -0
  131. package/dist/core/lease.js +31 -0
  132. package/dist/core/modules.js +318 -0
  133. package/dist/core/notify/planner.js +117 -0
  134. package/dist/core/notify/signals.js +66 -0
  135. package/dist/core/notify/text.js +60 -0
  136. package/dist/core/path-key.js +22 -0
  137. package/dist/core/placement.js +161 -0
  138. package/dist/core/preset-labels.js +66 -0
  139. package/dist/core/preset-notes.js +109 -0
  140. package/dist/core/preset.js +541 -0
  141. package/dist/core/profile.js +55 -0
  142. package/dist/core/project-id.js +20 -0
  143. package/dist/core/refusal.js +1 -0
  144. package/dist/core/relations.js +208 -0
  145. package/dist/core/repo.js +54 -0
  146. package/dist/core/samples.js +161 -0
  147. package/dist/core/search-words.js +68 -0
  148. package/dist/core/test-report.js +120 -0
  149. package/dist/core/time.js +8 -0
  150. package/dist/core/validation.js +60 -0
  151. package/dist/core/views.js +171 -0
  152. package/dist/core/workflow.js +51 -0
  153. package/dist/mcp/commands.js +101 -0
  154. package/dist/mcp/server.js +239 -0
  155. package/dist/mcp/words.js +95 -0
  156. package/dist/server/boards.js +232 -0
  157. package/dist/server/changes.js +42 -0
  158. package/dist/server/diff-tip.js +83 -0
  159. package/dist/server/drift.js +87 -0
  160. package/dist/server/errors.js +87 -0
  161. package/dist/server/evidence.js +82 -0
  162. package/dist/server/hosts.js +6 -0
  163. package/dist/server/hub.js +98 -0
  164. package/dist/server/lan-access.js +62 -0
  165. package/dist/server/lan.js +164 -0
  166. package/dist/server/listen.js +70 -0
  167. package/dist/server/notifier.js +156 -0
  168. package/dist/server/notify-api.js +151 -0
  169. package/dist/server/pairing.js +124 -0
  170. package/dist/server/projects.js +191 -0
  171. package/dist/server/push.js +199 -0
  172. package/dist/server/server.js +960 -0
  173. package/dist/server/session.js +43 -0
  174. package/dist/server/stream.js +36 -0
  175. package/dist/server/test-push.js +38 -0
  176. package/dist/server/token.js +37 -0
  177. package/dist/server/transports.js +54 -0
  178. package/dist/server/ui.js +44 -0
  179. package/dist/server/writes.js +361 -0
  180. package/dist/server/wrong-address.js +36 -0
  181. package/dist/store/boards.js +111 -0
  182. package/dist/store/database.js +45 -0
  183. package/dist/store/machine.js +77 -0
  184. package/dist/store/migrations.js +493 -0
  185. package/dist/store/queries.js +585 -0
  186. package/dist/store/registry.js +72 -0
  187. package/package.json +72 -4
  188. package/presets/architecture/playbook.md +69 -0
  189. package/presets/architecture/preset.yaml +80 -0
  190. package/presets/architecture/samples.yaml +23 -0
  191. package/presets/bug-triage/playbook.md +129 -0
  192. package/presets/bug-triage/preset.yaml +127 -0
  193. package/presets/bug-triage/samples/wall-slide-after.png +0 -0
  194. package/presets/bug-triage/samples/wall-slide-before.png +0 -0
  195. package/presets/bug-triage/samples.yaml +72 -0
  196. package/presets/change/playbook.md +115 -0
  197. package/presets/change/preset.yaml +141 -0
  198. package/presets/change/samples.yaml +62 -0
  199. package/presets/review/playbook.md +51 -0
  200. package/presets/review/preset.yaml +62 -0
  201. package/presets/review/samples.yaml +27 -0
  202. package/presets/tasks/playbook.md +78 -0
  203. package/presets/tasks/preset.yaml +61 -0
  204. package/presets/tasks/samples.yaml +46 -0
  205. package/schemas/board.schema.json +764 -0
  206. package/ui/dist/THIRD_PARTY_NOTICES.md +114 -0
  207. package/ui/dist/assets/dm-mono-latin-400-normal--0xN8mdc.woff +0 -0
  208. package/ui/dist/assets/dm-mono-latin-400-normal-4GdczIuU.woff2 +0 -0
  209. package/ui/dist/assets/dm-mono-latin-500-normal-CN8Miw6E.woff +0 -0
  210. package/ui/dist/assets/dm-mono-latin-500-normal-DRMDZjhP.woff2 +0 -0
  211. package/ui/dist/assets/dm-mono-latin-ext-400-normal-1aZr6b2b.woff +0 -0
  212. package/ui/dist/assets/dm-mono-latin-ext-400-normal-C2zvOubV.woff2 +0 -0
  213. package/ui/dist/assets/dm-mono-latin-ext-500-normal-BtRyHRi6.woff2 +0 -0
  214. package/ui/dist/assets/dm-mono-latin-ext-500-normal-Dw3M13d8.woff +0 -0
  215. package/ui/dist/assets/index-C3OzJope.js +103 -0
  216. package/ui/dist/assets/index-COdEjckQ.css +1 -0
  217. package/ui/dist/assets/newsreader-latin-ext-opsz-italic-CSPGnFdO.woff2 +0 -0
  218. package/ui/dist/assets/newsreader-latin-ext-opsz-normal-BQn1nviT.woff2 +0 -0
  219. package/ui/dist/assets/newsreader-latin-opsz-italic-kJKFiXvB.woff2 +0 -0
  220. package/ui/dist/assets/newsreader-latin-opsz-normal-s-izfB6B.woff2 +0 -0
  221. package/ui/dist/assets/newsreader-vietnamese-opsz-italic-DTr-ymY4.woff2 +0 -0
  222. package/ui/dist/assets/newsreader-vietnamese-opsz-normal-BjhtXyW2.woff2 +0 -0
  223. package/ui/dist/assets/pdf-YwugTw7Y.js +54 -0
  224. package/ui/dist/assets/pdf-engine-CkBopwck.js +1 -0
  225. package/ui/dist/assets/pdf-rELvHkft.js +56 -0
  226. package/ui/dist/assets/pdf.worker.min-B5Yc7dP4.mjs +27 -0
  227. package/ui/dist/assets/pdf.worker.min-B7U8ptvh.js +1 -0
  228. package/ui/dist/assets/pdf.worker.min-CIqJB0yW.mjs +28 -0
  229. package/ui/dist/assets/pdf.worker.min-UqOn5EDC.js +1 -0
  230. package/ui/dist/assets/schibsted-grotesk-latin-ext-wght-normal-hsMS0n0O.woff2 +0 -0
  231. package/ui/dist/assets/schibsted-grotesk-latin-wght-normal-Bb8VGrTG.woff2 +0 -0
  232. package/ui/dist/icons/apple-touch-icon.png +0 -0
  233. package/ui/dist/icons/otea-192.png +0 -0
  234. package/ui/dist/icons/otea-512.png +0 -0
  235. package/ui/dist/icons/otea-badge.png +0 -0
  236. package/ui/dist/icons/otea-maskable-512.png +0 -0
  237. package/ui/dist/index.html +25 -0
  238. package/ui/dist/manifest.webmanifest +24 -0
  239. package/ui/dist/otea-idle.svg +5 -0
  240. package/ui/dist/otea-working.svg +5 -0
  241. package/ui/dist/otea-yours-working.svg +5 -0
  242. package/ui/dist/otea-yours.svg +5 -0
  243. package/ui/dist/sw.js +1 -0
package/README.es.md ADDED
@@ -0,0 +1,151 @@
1
+ <h1 align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/otea-logo-dark.svg">
4
+ <img src="docs/images/otea-logo-light.svg" alt="Otea · inicio rápido" width="116" height="161">
5
+ </picture><ruby><rp>Otea · inicio rápido</rp></ruby>
6
+ <br>
7
+ <a href="https://github.com/otea-dev/otea/actions/workflows/ci.yml"><img src="https://github.com/otea-dev/otea/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
8
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-blue" alt="Licencia: AGPL-3.0"></a>
9
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D22.18-339933" alt="Node &gt;=22.18"></a>
10
+ </h1>
11
+
12
+ > Del verbo *otear*: mirar desde lo alto lo que pasa y lo que viene.
13
+
14
+ **Otea es el lugar donde tú y tus agentes de IA se pasan el trabajo.** Los agentes dejan lo que hicieron, con su evidencia; tú dejas decisiones y comentarios. En cada momento se ve en qué está cada cosa y a quién le toca. Tus datos se quedan en tu proyecto: sin nube y sin cuentas.
15
+
16
+ Esta es la guía corta en español. Todo lo demás está en el [README en inglés](README.md).
17
+
18
+ ## 1. Instalar
19
+
20
+ > [!NOTE]
21
+ > La primera versión todavía no salió: hasta entonces no hay nada para descargar y `@otea/cli` en npm es solo un nombre reservado, así que [instala desde el código](#desde-el-código). Desde la primera versión, los pasos de abajo valen tal cual.
22
+
23
+ Hay dos formas de instalar Otea: la **app de escritorio** o el **comando `otea` desde npm**. Las dos son el mismo Otea, con los mismos tableros, el mismo teléfono y los mismos agentes.
24
+
25
+ **¿Cuál elijo?**
26
+
27
+ - **Windows:** la app de escritorio. Se instala con un clic, se actualiza sola y deja `otea` en tu terminal.
28
+ - **macOS:** la app de escritorio, si quieres Otea en su propia ventana y con avisos. Todavía no se actualiza sola: cada versión nueva la descargas tú. Si ya usas Node, npm sirve igual.
29
+ - **Linux:** la app de escritorio en `.deb` si usas Debian o Ubuntu. En otras distribuciones, el AppImage, o npm si quieres `otea` en tu terminal.
30
+
31
+ ### Qué te da cada una
32
+
33
+ | | App de escritorio | npm (`npm i -g @otea/cli`) |
34
+ | --- | --- | --- |
35
+ | Cómo abres Otea | Su propia ventana, desde el ícono de la app | Una pestaña del navegador, después de `otea serve` en una terminal |
36
+ | Ícono en la bandeja o la barra de menús | ✅ Muestra lo que te espera; al cerrar la ventana sigue corriendo | ❌ |
37
+ | Número en la barra de tareas o el Dock | ✅ Windows y macOS · ❌ Linux | ❌ |
38
+ | Avisos en esta computadora | ✅ Los del sistema | ❌ |
39
+ | Actualizaciones | ✅ Windows · ✅ Linux (el `.deb` te pide tu contraseña) · macOS: te avisa y la descargas tú | A mano: `npm i -g @otea/cli` otra vez |
40
+ | `otea` en tu terminal | ✅ Windows y `.deb` · macOS: un clic en la barra de menús · ❌ AppImage | ✅ |
41
+ | Necesita Node.js | ❌ Trae el suyo | ✅ Node.js 22.18 o posterior |
42
+
43
+ Todo lo demás funciona igual de las dos formas: los tableros, el teléfono (emparejarlo y recibir avisos en él) y los agentes por la terminal o por MCP. Ninguna de las dos arranca sola al iniciar sesión.
44
+
45
+ ### La app de escritorio
46
+
47
+ Descarga el instalador de tu sistema desde la [última versión](https://github.com/otea-dev/otea/releases/latest):
48
+
49
+ | Sistema | Archivo |
50
+ | --- | --- |
51
+ | Windows | `Otea-Setup-<versión>.exe` |
52
+ | macOS (Apple silicon e Intel) | `Otea-<versión>-mac.dmg` |
53
+ | Linux, Debian o Ubuntu | `Otea-<versión>-amd64.deb` |
54
+ | Linux, cualquier otra | `Otea-<versión>-x86_64.AppImage` |
55
+
56
+ Los instaladores todavía no están firmados: Otea es un proyecto de código abierto que aún no tiene un certificado de firma de pago. Tu sistema te avisa la primera vez; así lo pasas.
57
+
58
+ **Windows.** Abre el `.exe`. Si aparece una ventana azul que dice «Windows protegió su PC», haz clic en **Más información** y después en **Ejecutar de todos modos**. Otea se instala solo para ti (no hace falta ser administrador) y se abre.
59
+
60
+ **macOS.** Abre el `.dmg` y arrastra Otea a Aplicaciones. Abre Otea: macOS dice que no puede comprobarlo. Haz clic en **Listo** (o **OK**), abre **Configuración del Sistema › Privacidad y seguridad**, baja hasta el mensaje sobre Otea y haz clic en **Abrir igualmente**. Confirma y Otea se abre; desde entonces se abre como cualquier app. Para tener `otea` en tu terminal, haz clic en el ícono de Otea en la barra de menús y elige **Instalar el comando otea**. Por ahora las actualizaciones son a mano: cuando sale una versión nueva, Otea te avisa, y tú la descargas y la arrastras otra vez a Aplicaciones.
61
+
62
+ **Linux, `.deb`.** En una terminal, en la carpeta del archivo:
63
+
64
+ ```sh
65
+ sudo apt install ./Otea-*.deb
66
+ ```
67
+
68
+ Así Otea queda en el menú de aplicaciones y `otea` en tu terminal.
69
+
70
+ **Linux, AppImage.** En una terminal, en la carpeta del archivo:
71
+
72
+ ```sh
73
+ chmod +x Otea-*.AppImage
74
+ ./Otea-*.AppImage
75
+ ```
76
+
77
+ ### Comprobar la descarga
78
+
79
+ Cada versión trae un `SHA256SUMS.txt` con la huella de cada instalador. Si la huella de tu archivo coincide con su línea, es el archivo que publicó la versión. Descarga `SHA256SUMS.txt` en la misma carpeta y después:
80
+
81
+ - **Windows** (PowerShell): `Get-FileHash .\Otea-Setup-*.exe` muestra la huella. Busca el mismo texto en `SHA256SUMS.txt` (no importan mayúsculas o minúsculas).
82
+ - **macOS** (Terminal): `shasum -a 256 Otea-*-mac.dmg` muestra la huella. Busca el mismo texto en `SHA256SUMS.txt`.
83
+ - **Linux**: `sha256sum -c --ignore-missing SHA256SUMS.txt` revisa los archivos que tienes y dice `OK` (o `La suma coincide`) para cada uno.
84
+
85
+ ### El comando `otea` desde npm
86
+
87
+ Necesitas [Node.js](https://nodejs.org/) 22.18 o posterior (se recomienda Node 24). Compruébalo con `node --version`. Después:
88
+
89
+ ```sh
90
+ npm i -g @otea/cli
91
+ otea --version
92
+ ```
93
+
94
+ Para actualizar, corre `npm i -g @otea/cli` otra vez. Para quitarlo, `npm uninstall -g @otea/cli`. El escritorio lo abres con `otea serve` (paso 3).
95
+
96
+ ### Desde el código
97
+
98
+ Para trabajar en Otea, o para correr lo que aún no se publicó (hasta la primera versión, es la única forma). Necesitas Git y Node.js 22.18 o posterior (se recomienda Node 24).
99
+
100
+ ```sh
101
+ git clone https://github.com/otea-dev/otea.git
102
+ cd otea
103
+ npm ci # las dependencias del comando
104
+ npm run build:ui # la página web que muestra otea serve
105
+ npm link # deja el comando otea disponible en tu terminal
106
+ otea --version
107
+ ```
108
+
109
+ `npm link` instala un comando de verdad, así que también lo encuentra la terminal de tu agente. Si `otea` no aparece, `npm prefix -g` te dice dónde quedó: agrega esa carpeta a tu PATH (en macOS y Linux, su `bin`). Para actualizar, corre `git pull`, `npm ci` y `npm run build:ui` otra vez. Para armar la app de escritorio desde el código, mira [`desktop/README.md`](desktop/README.md) (en inglés).
110
+
111
+ ## 2. Crear el proyecto
112
+
113
+ En la carpeta de tu proyecto:
114
+
115
+ ```sh
116
+ otea init # crea el proyecto y te dice el paso siguiente
117
+ ```
118
+
119
+ ## 3. Abrir el escritorio
120
+
121
+ ```sh
122
+ otea serve # abre el escritorio de Otea en tu navegador
123
+ ```
124
+
125
+ Déjalo corriendo mientras trabajas. Es tu escritorio: ahí revisas, apruebas y devuelves el trabajo de tus agentes.
126
+
127
+ <picture>
128
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/demo-agent-loop-dark.gif">
129
+ <img src="docs/images/demo-agent-loop-light.gif" alt="La página de un cambio en el escritorio: el agente tilda la lista (rama, diff, capturas), la ruta pasa de su carril al tuyo y la persona pulsa Aprobar. Leyenda en inglés: The agent does the steps. You only review.">
130
+ </picture>
131
+
132
+ **El agente hace los pasos; tú solo revisas.** Tilda la lista que pide el tablero, la ruta pasa de su carril al tuyo y a ti solo te queda aprobar.
133
+
134
+ ## 4. Pegarle el texto a tu agente
135
+
136
+ El escritorio vacío te muestra un texto bajo «Esto es para tu agente». Cópialo y pégalo en el chat de tu agente (Claude Code, OpenCode, Codex o cualquier otro con terminal o MCP). `otea prompt` imprime el mismo texto en la terminal.
137
+
138
+ Con ese texto, el agente se conecta solo, lee el proyecto y te hace unas preguntas para armar contigo sus tableros. Tú los pruebas y los publicas en Studio. Desde ahí, cada pedido pasa por un tablero, y tú revisas los pasos que el tablero te asigna.
139
+
140
+ Si trabajas directo en `main` y no quieres que nada se suba antes de verlo, pídele el tablero «Código en main». Al publicarlo, deja marcada la opción de instalar el hook de git de Otea (`otea hook install --git`): sin ese hook, git deja pasar un push antes de que lo apruebes.
141
+
142
+ <picture>
143
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/demo-phone-answer-dark.gif">
144
+ <img src="docs/images/demo-phone-answer-light.gif" alt="Un teléfono muestra la pregunta de un agente; la persona toca Responder, escribe y envía, y el escritorio pequeño a su lado muestra que la pregunta ya no está. Leyenda en inglés: Answer your agents from your phone.">
145
+ </picture>
146
+
147
+ **Responde a tus agentes desde el teléfono.** La pregunta de un agente te llega al teléfono; la respondes ahí y el escritorio muestra al agente siguiendo.
148
+
149
+ ## En Windows, con Git Bash
150
+
151
+ Git Bash convierte en ruta un argumento que empieza con `/`. Otea lo corrige en los textos que recibe (un título, un campo, una nota), así que `otea create --title "/deploy falla"` conserva su barra. En cualquier otro caso, pon `MSYS_NO_PATHCONV=1` delante de ese comando o empieza el valor con `//`.
package/README.md CHANGED
@@ -1,5 +1,253 @@
1
- # @otea/cli
1
+ <h1 align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/otea-logo-dark.svg">
4
+ <img src="docs/images/otea-logo-light.svg" alt="Otea" width="116" height="161">
5
+ </picture><ruby><rp>Otea</rp></ruby>
6
+ <br>
7
+ <a href="https://github.com/otea-dev/otea/actions/workflows/ci.yml"><img src="https://github.com/otea-dev/otea/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
8
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-blue" alt="License: AGPL-3.0"></a>
9
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D22.18-339933" alt="Node &gt;=22.18"></a>
10
+ </h1>
2
11
 
3
- Local-first modular panel to see what your AI agents are working on: what they are doing now, what comes next, what is pending and what is done.
12
+ **A local board where your AI agents hand you their work, and you hand back decisions, without keeping their sessions open.**
4
13
 
5
- Early development. Not usable yet.
14
+ ¿Hablas español? Lee el [inicio rápido en español](README.es.md).
15
+
16
+ > From the Spanish verb *otear*: to scan from a high vantage point, to watch what is happening and what is coming.
17
+
18
+ Agents produce work faster than a human can follow it live. Otea is where work changes hands: agents leave findings, deliverables and evidence; you leave decisions and feedback; both can see at any moment where each thing stands and whose turn it is.
19
+
20
+ **The handoff lives in the item, not in the session.** Evidence, history and the next step are stored with the item, so an agent can hand it over and its session can close instead of sitting open waiting for you. Any later session picks it up from `otea show`, whose `Next:` line says what to do now, and `otea wait` blocks until an item is the agent's turn again. A lease the closed session held expires on its own.
21
+
22
+ - **Triage** many findings at once: filter, group, prioritize, discard.
23
+ - **Review** results in depth: GIFs, video, diffs, logs, with concrete questions the agent reads back and acts on.
24
+ - **Boards** shape the work: their steps, who does and reviews each, what a handoff carries. **Templates** start a board, or several joined boards at once (a Cambio that divides into one Tarea de repo per repository).
25
+ - **Local-first**: data stays with your project. No cloud, no accounts.
26
+ - **Harness-neutral**: any agent with a shell (CLI) or MCP support can use it.
27
+ - **Traceable**: every change is an append-only event, with who made it and through which channel.
28
+
29
+ <picture>
30
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/demo-agent-loop-dark.gif">
31
+ <img src="docs/images/demo-agent-loop-light.gif" alt="A change's page on the desk: the agent ticks the checklist (branch, diff, screenshots), the route moves from its lane to yours, and the person presses Approve. Caption: The agent does the steps. You only review.">
32
+ </picture>
33
+
34
+ **The agent does the steps; you only review.** It ticks the checklist the board asks for, the route moves from its lane to yours, and all that is left for you is Approve.
35
+
36
+ <picture>
37
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/desk-your-turn-dark.png">
38
+ <img src="docs/images/desk-your-turn-light.png" alt="The desk's Your turn page in a demo project: an agent's question, a change to review, a bug to triage and a change an agent is working on">
39
+ </picture>
40
+
41
+ **Your turn**, the desk's first page: what waits for you, and what the agents are on.
42
+
43
+ <picture>
44
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/desk-review-dark.png">
45
+ <img src="docs/images/desk-review-light.png" alt="A change under review on the desk: the agent's diff and its before and after screenshots, side by side">
46
+ </picture>
47
+
48
+ A change under review, with the evidence its step asked for: the diff and before-and-after screenshots.
49
+
50
+ <picture>
51
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/phone-review-dark.png">
52
+ <img src="docs/images/phone-review-light.png" alt="The same change on a phone: the agent's handoff note, with Send back and Approve" width="300">
53
+ </picture>
54
+
55
+ The same change on a phone, with the agent's note and your two moves.
56
+
57
+ <picture>
58
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/demo-phone-answer-dark.gif">
59
+ <img src="docs/images/demo-phone-answer-light.gif" alt="A phone shows a question from an agent; the person taps Answer, types a reply and sends it, and the small desk beside it shows the question gone. Caption: Answer your agents from your phone.">
60
+ </picture>
61
+
62
+ **Answer your agents from your phone.** A question from an agent reaches your phone; you answer there, and the desk shows the agent going on.
63
+
64
+ ## Status
65
+
66
+ Early: usable, still changing fast. The product definition lives in [`docs/otea-product-definition.md`](docs/otea-product-definition.md).
67
+
68
+ ## Install
69
+
70
+ > [!NOTE]
71
+ > The first release is not out yet: until it is, there is nothing to download and `@otea/cli` on npm is only a placeholder, so [install from source](#from-source). From the first release, the steps below work as written.
72
+
73
+ There are two ways to install Otea: the **desktop app**, or the **`otea` command from npm**. Both are the same Otea, with the same boards, phone and agents.
74
+
75
+ **Which one?**
76
+
77
+ - **Windows:** the desktop app. One click installs it, it updates itself and it puts `otea` in your terminal.
78
+ - **macOS:** the desktop app, if you want Otea in its own window with notifications. It cannot update itself yet: you download each new version. If you already use Node, npm is just as good.
79
+ - **Linux:** the desktop app as a `.deb` on Debian or Ubuntu. On other distributions, the AppImage, or npm if you want `otea` in your terminal.
80
+
81
+ ### What each one gives you
82
+
83
+ | | Desktop app | npm (`npm i -g @otea/cli`) |
84
+ | --- | --- | --- |
85
+ | How you open Otea | Its own window, from the app icon | A tab in your browser, after `otea serve` in a terminal |
86
+ | Icon in the tray or menu bar | ✅ Shows what waits for you; closing the window keeps it running | ❌ |
87
+ | Count on the taskbar or Dock | ✅ Windows and macOS · ❌ Linux | ❌ |
88
+ | Notifications on this computer | ✅ The system's own | ❌ |
89
+ | Updates | ✅ Windows · ✅ Linux (the `.deb` asks for your password) · macOS: it tells you, you download it | By hand: `npm i -g @otea/cli` again |
90
+ | `otea` in your terminal | ✅ Windows and `.deb` · macOS: one click in the menu bar · ❌ AppImage | ✅ |
91
+ | Needs Node.js | ❌ It brings its own | ✅ Node.js 22.18 or later |
92
+
93
+ Everything else works the same both ways: boards, the phone (pairing and notifications on it), agents over the CLI or MCP. Neither starts on its own when you log in.
94
+
95
+ ### The desktop app
96
+
97
+ Download the installer for your system from the [latest release](https://github.com/otea-dev/otea/releases/latest):
98
+
99
+ | System | File |
100
+ | --- | --- |
101
+ | Windows | `Otea-Setup-<version>.exe` |
102
+ | macOS (Apple silicon and Intel) | `Otea-<version>-mac.dmg` |
103
+ | Linux, Debian or Ubuntu | `Otea-<version>-amd64.deb` |
104
+ | Linux, any other | `Otea-<version>-x86_64.AppImage` |
105
+
106
+ The installers are not signed yet: Otea is an open-source project without a paid signing certificate so far. Your system warns you the first time; here is how to get past it.
107
+
108
+ **Windows.** Open the `.exe`. If a blue window says "Windows protected your PC", click **More info**, then **Run anyway**. Otea installs for you alone (no administrator needed) and opens.
109
+
110
+ **macOS.** Open the `.dmg` and drag Otea to Applications. Open Otea: macOS says it cannot check it. Click **Done** (or **OK**), then open **System Settings › Privacy & Security**, scroll down to the message about Otea and click **Open Anyway**. Confirm, and Otea opens; from then on it opens normally. To have `otea` in your terminal, click the Otea icon in the menu bar and choose **Install the otea command**. Updates are manual for now: when a new version is out, Otea tells you, and you download it and drag it to Applications again.
111
+
112
+ **Linux, `.deb`.** In a terminal, in the folder with the file:
113
+
114
+ ```sh
115
+ sudo apt install ./Otea-*.deb
116
+ ```
117
+
118
+ This puts Otea in your apps menu and `otea` in your terminal.
119
+
120
+ **Linux, AppImage.** In a terminal, in the folder with the file:
121
+
122
+ ```sh
123
+ chmod +x Otea-*.AppImage
124
+ ./Otea-*.AppImage
125
+ ```
126
+
127
+ ### Check your download
128
+
129
+ Each release has a `SHA256SUMS.txt` with a fingerprint of every installer. If your file's fingerprint matches its line, it is the file the release published. Download `SHA256SUMS.txt` to the same folder, then:
130
+
131
+ - **Windows** (PowerShell): `Get-FileHash .\Otea-Setup-*.exe` prints the fingerprint. Find the same text in `SHA256SUMS.txt` (case does not matter).
132
+ - **macOS** (Terminal): `shasum -a 256 Otea-*-mac.dmg` prints the fingerprint. Find the same text in `SHA256SUMS.txt`.
133
+ - **Linux**: `sha256sum -c --ignore-missing SHA256SUMS.txt` checks the files you have and says `OK` for each.
134
+
135
+ ### The `otea` command from npm
136
+
137
+ You need [Node.js](https://nodejs.org/) 22.18 or later (Node 24 recommended). Check with `node --version`. Then:
138
+
139
+ ```sh
140
+ npm i -g @otea/cli
141
+ otea --version
142
+ ```
143
+
144
+ To update, run `npm i -g @otea/cli` again. To remove it, `npm uninstall -g @otea/cli`. You open the desk with `otea serve` (see [Quickstart](#quickstart)).
145
+
146
+ ### From source
147
+
148
+ To work on Otea, or to run what is not released yet (until the first release, this is the only way). It takes Git and Node.js 22.18 or later (Node 24 recommended):
149
+
150
+ ```sh
151
+ git clone https://github.com/otea-dev/otea.git
152
+ cd otea
153
+ npm ci # the CLI's dependencies
154
+ npm run build:ui # the web UI that otea serve shows
155
+ npm link # puts the otea command on your PATH
156
+ otea --version
157
+ ```
158
+
159
+ `npm link` installs a real command, not an alias: a symlink in npm's global `bin` on macOS and Linux, and `otea.cmd`, `otea.ps1` and a shell script in npm's global folder on Windows. Every shell finds it, so an agent's own shell (Claude Code's, OpenCode's, a script's) runs `otea` the same as your terminal. Run `npm prefix -g` to see where it went; if `otea` is not found, add that folder (on macOS and Linux, its `bin`) to your PATH. To update, `git pull`, `npm ci` and `npm run build:ui` again; `npm unlink -g @otea/cli` takes the command away. To build the desktop app from source, see [`desktop/README.md`](desktop/README.md).
160
+
161
+ ### On Windows, in Git Bash
162
+
163
+ Git Bash turns an argument that starts with `/` into a path (`/deploy` reaches Otea as `C:/Program Files/Git/deploy`). Otea undoes it for the text it is given (a title, a field, a note), so `otea create --title "/deploy fails"` keeps its slash. Anywhere else, set `MSYS_NO_PATHCONV=1` for that command, or start the value with `//`.
164
+
165
+
166
+ ## Quickstart
167
+
168
+ 1. **Make the project.** In the folder you want to track, usually a repository:
169
+
170
+ ```sh
171
+ otea init
172
+ ```
173
+
174
+ It says where the project's data lives and what to do next:
175
+
176
+ ```text
177
+ Project data in ~/.otea/data/tienda-web-yafrhx
178
+ Next: run otea serve in a terminal of your own, or open the Otea desktop app: the desk gives you the text to paste into your agent's chat (otea prompt prints it here).
179
+ ```
180
+
181
+ Nothing is written into the repo, and the project starts with no boards.
182
+
183
+ 2. **Open the desk.** In a terminal of your own, and leave it running:
184
+
185
+ ```sh
186
+ otea serve
187
+ ```
188
+
189
+ It prints `Otea running at http://127.0.0.1:4400/p/tienda-web-yafrhx/` and opens the desk in your browser, signed in. A project with no boards opens on **Your turn** with a text for your agent and a **Copy the instruction** button.
190
+
191
+ 3. **Hand it to your agent.** Paste that text into your agent's chat (Claude Code, OpenCode, Codex or any other with a shell or MCP); `otea prompt` prints the same text. The agent connects itself, reads the project, asks you one question at a time how you work and drafts its boards. You try them and publish them in Studio. From then on each request goes through a board, and what waits for you shows in **Your turn**.
192
+
193
+ ## Everyday commands
194
+
195
+ | You run | What it does |
196
+ | --- | --- |
197
+ | `otea init` | makes the project for this folder |
198
+ | `otea serve` | opens the desk in your browser |
199
+ | `otea prompt` | prints the text to paste into an agent's chat |
200
+ | `otea board add <name> --template <key>` | adds a board from a template, published at once |
201
+ | `otea topic on` | has agents keep the side questions you ask them, with their answers |
202
+ | `otea devices list` | lists the paired phones; `otea devices revoke <id>` unpairs one |
203
+ | `otea hook install --git` | in a repo: a pre-push hook that checks each push against the boards |
204
+
205
+ | Agents run | What it does |
206
+ | --- | --- |
207
+ | `otea next` | says which item to take now and what its step asks |
208
+ | `otea claim <id>` | holds the item for this step, so no other agent writes it |
209
+ | `otea handoff <id>` | hands the step on, refused until it carries what the step asks |
210
+ | `otea wait --turn agent --unclaimed` | blocks until there is work, then `otea next` again |
211
+
212
+ `otea help` lists every command, and `otea <command> --help` its options; the [docs](#docs) go into each part.
213
+
214
+ ## Why Otea, and when not
215
+
216
+ An issue tracker or a TODO.md holds what to do. Otea also holds how, and checks it:
217
+
218
+ - **The board is the procedure.** An agent reads each step's instructions from the board (`otea next`), not from a prompt you repeat in every session.
219
+ - **Handoffs carry evidence.** The diff, the screenshots, the test output or the recording come with the item, and you review them there.
220
+ - **A gate checks what an agent can push.** The pre-push hook lets a branch through only while its item's step allows it, and a base branch the board protects only once you approved.
221
+
222
+ When not to use it:
223
+
224
+ - You pair live with one agent and never step away: the chat already is the handoff.
225
+ - You need cloud sync or accounts: Otea is local-first, and its data stays on your computer.
226
+ - You need a signed installer: Otea's installers are not signed yet.
227
+
228
+ ## Help
229
+
230
+ Questions and bugs go to [GitHub Issues](https://github.com/otea-dev/otea/issues). Report a security problem privately, as [SECURITY.md](SECURITY.md) says.
231
+
232
+ ## License
233
+
234
+ Otea is free software under the [GNU Affero General Public License v3.0](LICENSE). You can use, study, modify and share it. If you distribute a modified version, or let people use it over a network, you must publish its source under the same license, keeping the copyright notices.
235
+
236
+ **Commercial license.** If the AGPL does not fit your use (for example, embedding Otea in a closed product), a commercial license is available. Open an issue or contact Federico Daniel Ara ([@Lartweib](https://github.com/Lartweib)).
237
+
238
+ **Name.** "Otea" and its logo identify this project. Forks are welcome under the AGPL, but must use a different name.
239
+
240
+ Contributions are accepted under the [Contributor License Agreement](CLA.md); see [CONTRIBUTING.md](CONTRIBUTING.md).
241
+
242
+ ## Docs
243
+
244
+ - [Working with agents](docs/working-with-agents.md): the commands agents run, leases, relaying a decision, waiting and events, the guide, profiles and stats, what to paste into an agent's chat, and what your harness must allow.
245
+ - [MCP](docs/mcp.md): working from an MCP client, `otea connect` and the tools.
246
+ - [Projects](docs/projects.md): where a project lives, the files Otea writes in the repo, linking several repos, and moving a local project to common storage.
247
+ - [Evidence](docs/evidence.md): attaching files as proof, and how the item page draws them.
248
+ - [Relations](docs/relations.md): parents, blockers and the other links between items.
249
+ - [Boards](docs/boards.md): templates, the Matrix, boards that divide into others, an agent drafting a board, archiving, and the moves and git gates of agents.
250
+ - [Topics](docs/topics.md): the side questions agents keep as short conversations.
251
+ - [The desk](docs/desk.md): `otea serve`, the web UI, and its API for agents at work and notes.
252
+ - [Several projects and a phone](docs/phone.md): one server for every project, the phone on the local network or Tailscale, and notifications.
253
+ - [Development](docs/development.md): tests, `npm run dev:ui` and the token budget.
@@ -0,0 +1,114 @@
1
+ # Third-party notices
2
+
3
+ Otea is licensed under the AGPL-3.0 (see [LICENSE](LICENSE)). The web app and the desktop app also carry the third-party fonts below. Each one keeps its own license, which is reproduced here.
4
+
5
+ The fonts come from npm, through [Fontsource](https://fontsource.org), and are not committed to this repository. The web app loads them in `ui/src/main.tsx`. The desktop app embeds Schibsted Grotesk in the window it shows while the installer runs (`desktop/src/main.ts`), and copies all three into its project picker (`desktop/build.mjs`).
6
+
7
+ The npm packages Otea is built from carry their own license files in their packages; see `package.json` and `desktop/package.json`.
8
+
9
+ ## Fonts
10
+
11
+ | Font | Files Otea uses | npm package | Upstream source | License |
12
+ |---|---|---|---|---|
13
+ | Newsreader | variable, optical size, normal and italic | [`@fontsource-variable/newsreader`](https://fontsource.org/fonts/newsreader) 5.3.0 | <https://github.com/productiontype/Newsreader> | OFL-1.1 |
14
+ | Schibsted Grotesk | variable, weight, normal | [`@fontsource-variable/schibsted-grotesk`](https://fontsource.org/fonts/schibsted-grotesk) 5.3.0 | <https://github.com/schibsted/schibsted-grotesk> | OFL-1.1 |
15
+ | DM Mono | 400 and 500, normal | [`@fontsource/dm-mono`](https://fontsource.org/fonts/dm-mono) 5.3.0 | <https://github.com/googlefonts/dm-mono> | OFL-1.1 |
16
+
17
+ ### Copyright notices
18
+
19
+ - **Newsreader:** Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader)
20
+ - **Schibsted Grotesk:** Copyright 2023 The Schibsted-Grotesk Project Authors (https://github.com/schibsted/schibsted-grotesk)
21
+ - **DM Mono:** Copyright 2020 The DM Mono Project Authors (https://www.github.com/googlefonts/dm-mono)
22
+
23
+ Each font is licensed under the SIL Open Font License, Version 1.1. The license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
24
+
25
+ ### SIL Open Font License, Version 1.1
26
+
27
+ ```text
28
+ -----------------------------------------------------------
29
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
30
+ -----------------------------------------------------------
31
+
32
+ PREAMBLE
33
+ The goals of the Open Font License (OFL) are to stimulate worldwide
34
+ development of collaborative font projects, to support the font creation
35
+ efforts of academic and linguistic communities, and to provide a free and
36
+ open framework in which fonts may be shared and improved in partnership
37
+ with others.
38
+
39
+ The OFL allows the licensed fonts to be used, studied, modified and
40
+ redistributed freely as long as they are not sold by themselves. The
41
+ fonts, including any derivative works, can be bundled, embedded,
42
+ redistributed and/or sold with any software provided that any reserved
43
+ names are not used by derivative works. The fonts and derivatives,
44
+ however, cannot be released under any other type of license. The
45
+ requirement for fonts to remain under this license does not apply
46
+ to any document created using the fonts or their derivatives.
47
+
48
+ DEFINITIONS
49
+ "Font Software" refers to the set of files released by the Copyright
50
+ Holder(s) under this license and clearly marked as such. This may
51
+ include source files, build scripts and documentation.
52
+
53
+ "Reserved Font Name" refers to any names specified as such after the
54
+ copyright statement(s).
55
+
56
+ "Original Version" refers to the collection of Font Software components as
57
+ distributed by the Copyright Holder(s).
58
+
59
+ "Modified Version" refers to any derivative made by adding to, deleting,
60
+ or substituting -- in part or in whole -- any of the components of the
61
+ Original Version, by changing formats or by porting the Font Software to a
62
+ new environment.
63
+
64
+ "Author" refers to any designer, engineer, programmer, technical
65
+ writer or other person who contributed to the Font Software.
66
+
67
+ PERMISSION & CONDITIONS
68
+ Permission is hereby granted, free of charge, to any person obtaining
69
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
70
+ redistribute, and sell modified and unmodified copies of the Font
71
+ Software, subject to the following conditions:
72
+
73
+ 1) Neither the Font Software nor any of its individual components,
74
+ in Original or Modified Versions, may be sold by itself.
75
+
76
+ 2) Original or Modified Versions of the Font Software may be bundled,
77
+ redistributed and/or sold with any software, provided that each copy
78
+ contains the above copyright notice and this license. These can be
79
+ included either as stand-alone text files, human-readable headers or
80
+ in the appropriate machine-readable metadata fields within text or
81
+ binary files as long as those fields can be easily viewed by the user.
82
+
83
+ 3) No Modified Version of the Font Software may use the Reserved Font
84
+ Name(s) unless explicit written permission is granted by the corresponding
85
+ Copyright Holder. This restriction only applies to the primary font name as
86
+ presented to the users.
87
+
88
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
89
+ Software shall not be used to promote, endorse or advertise any
90
+ Modified Version, except to acknowledge the contribution(s) of the
91
+ Copyright Holder(s) and the Author(s) or with their explicit written
92
+ permission.
93
+
94
+ 5) The Font Software, modified or unmodified, in part or in whole,
95
+ must be distributed entirely under this license, and must not be
96
+ distributed under any other license. The requirement for fonts to
97
+ remain under this license does not apply to any document created
98
+ using the Font Software.
99
+
100
+ TERMINATION
101
+ This license becomes null and void if any of the above conditions are
102
+ not met.
103
+
104
+ DISCLAIMER
105
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
106
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
107
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
108
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
109
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
110
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
111
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
112
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
113
+ OTHER DEALINGS IN THE FONT SOFTWARE.
114
+ ```
package/bin/otea.mjs ADDED
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ // The otea command, of a checkout (for `npm link`) and of the published package: npm puts a real
3
+ // command on the PATH that runs this file on the system's Node (a symlink on macOS and Linux; otea.cmd,
4
+ // otea.ps1 and a shell script on Windows), so every shell finds it, an agent's included, where an
5
+ // alias reaches only the shell that defined it.
6
+ import { existsSync } from 'node:fs';
7
+ import module from 'node:module';
8
+
9
+ // The compiled code is kept between runs: each command starts faster after the first.
10
+ module.enableCompileCache?.();
11
+
12
+ // Node warns that type stripping and node:sqlite are experimental on every run; otea's output is
13
+ // read by people and agents, so those notices stay out of it (as --disable-warning would).
14
+ const emitWarning = process.emitWarning.bind(process);
15
+ process.emitWarning = (warning, ...rest) => {
16
+ const [options] = rest;
17
+ const type = typeof options === 'string' ? options : options?.type;
18
+ const name = warning instanceof Error ? warning.name : type;
19
+ if (name === 'ExperimentalWarning') return;
20
+ emitWarning(warning, ...rest);
21
+ };
22
+
23
+ // A checkout runs its TypeScript source, as Node strips the types. The published package carries
24
+ // the compiled dist instead: Node does not strip types of a file under node_modules.
25
+ const source = new URL('../src/cli/main.ts', import.meta.url);
26
+ await import(
27
+ existsSync(source) ? source.href : new URL('../dist/cli/main.js', import.meta.url).href
28
+ );
@@ -0,0 +1,26 @@
1
+ import { OteaError } from '../core/errors.js';
2
+ import { findAgent, selectProfileChanges } from '../store/queries.js';
3
+ import { systemClock } from './items.js';
4
+ import { liveBoards } from './next.js';
5
+ import { listAgents } from './presence.js';
6
+ function roleOf(role) {
7
+ if (role === 'you' || role === 'none' || role === 'any')
8
+ return { kind: role };
9
+ if (typeof role === 'object' && role !== null && 'agent' in role) {
10
+ return { kind: 'agent', agent: String(role.agent) };
11
+ }
12
+ return { kind: 'any' };
13
+ }
14
+ export function agentDetail(ctx, name, now = systemClock) {
15
+ const agent = findAgent(ctx.db, name) && listAgents(ctx.db, now).find((a) => a.name === name);
16
+ if (!agent)
17
+ throw new OteaError('not_found', `No agent named ${name} in this project`);
18
+ const steps = liveBoards(ctx).flatMap(({ collection, def }) => def.steps.map((step) => ({
19
+ board: collection,
20
+ step: step.id,
21
+ name: step.name,
22
+ doer: roleOf(step.doer),
23
+ reviewer: roleOf(step.reviewer),
24
+ })));
25
+ return { agent, profiles: selectProfileChanges(ctx.db, name), steps };
26
+ }