@jmanuelcorral/openteam 0.27.0 → 0.28.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 (76) hide show
  1. package/.opencode/openteam.example.json +7 -1
  2. package/README.es.md +22 -4
  3. package/README.md +28 -4
  4. package/dist/certificates/graph-release-certificate.json +2 -2
  5. package/dist/certificates/graph-shadow-certificate.json +2 -2
  6. package/dist/certificates/opencode-2.0.5/graph-release-certificate.json +2 -2
  7. package/dist/certificates/opencode-2.0.5/graph-shadow-certificate.json +2 -2
  8. package/dist/cli/opencodeVersion.d.ts.map +1 -1
  9. package/dist/cli.js +1641 -258
  10. package/dist/commands/setup.d.ts.map +1 -1
  11. package/dist/config/errors.d.ts.map +1 -1
  12. package/dist/config/graphFeatureGate.d.ts +3 -3
  13. package/dist/config/schema.d.ts +18 -0
  14. package/dist/config/schema.d.ts.map +1 -1
  15. package/dist/console/agentView.d.ts +13 -0
  16. package/dist/console/agentView.d.ts.map +1 -0
  17. package/dist/console/assets.d.ts.map +1 -1
  18. package/dist/console/inspector.d.ts.map +1 -1
  19. package/dist/console/refresh.d.ts +1 -1
  20. package/dist/console/refresh.d.ts.map +1 -1
  21. package/dist/console/render.d.ts +1 -0
  22. package/dist/console/render.d.ts.map +1 -1
  23. package/dist/contract/opencode.d.ts +13 -12
  24. package/dist/contract/opencode.d.ts.map +1 -1
  25. package/dist/graph/certificate.d.ts.map +1 -1
  26. package/dist/graph/schema.d.ts +6 -0
  27. package/dist/graph/schema.d.ts.map +1 -1
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +1260 -434
  30. package/dist/lifecycle/contracts.d.ts +2 -2
  31. package/dist/lifecycle/contracts.d.ts.map +1 -1
  32. package/dist/lifecycle/schema.d.ts +6 -0
  33. package/dist/lifecycle/schema.d.ts.map +1 -1
  34. package/dist/local/concurrency.d.ts +1 -1
  35. package/dist/local/concurrency.d.ts.map +1 -1
  36. package/dist/messages/agentView.d.ts +77 -0
  37. package/dist/messages/agentView.d.ts.map +1 -0
  38. package/dist/messages/consoleDetail.d.ts +9 -0
  39. package/dist/messages/consoleDetail.d.ts.map +1 -1
  40. package/dist/messages/nativeHost.d.ts +1 -0
  41. package/dist/messages/nativeHost.d.ts.map +1 -1
  42. package/dist/messages/orchestration.d.ts +26 -0
  43. package/dist/messages/orchestration.d.ts.map +1 -1
  44. package/dist/opencodeArtifacts/orchestratorAgent.d.ts.map +1 -1
  45. package/dist/orchestrator/coordinator.d.ts +13 -1
  46. package/dist/orchestrator/coordinator.d.ts.map +1 -1
  47. package/dist/orchestrator/outputContract.d.ts +3 -0
  48. package/dist/orchestrator/outputContract.d.ts.map +1 -1
  49. package/dist/orchestrator/reportDelivery.d.ts +13 -0
  50. package/dist/orchestrator/reportDelivery.d.ts.map +1 -0
  51. package/dist/orchestrator/subsessions.d.ts +5 -0
  52. package/dist/orchestrator/subsessions.d.ts.map +1 -1
  53. package/dist/orchestrator/taskEffort.d.ts +39 -0
  54. package/dist/orchestrator/taskEffort.d.ts.map +1 -0
  55. package/dist/plugin/capture.d.ts +3 -0
  56. package/dist/plugin/capture.d.ts.map +1 -1
  57. package/dist/plugin/nativeHost.d.ts.map +1 -1
  58. package/dist/plugin/nativeHostContext.d.ts +1 -1
  59. package/dist/plugin/nativeHostContext.d.ts.map +1 -1
  60. package/dist/plugin/nativeSessions.d.ts +9 -0
  61. package/dist/plugin/nativeSessions.d.ts.map +1 -1
  62. package/dist/plugin/orchestrateTool.d.ts +6 -0
  63. package/dist/plugin/orchestrateTool.d.ts.map +1 -1
  64. package/dist/plugin/reportTool.d.ts +4 -0
  65. package/dist/plugin/reportTool.d.ts.map +1 -0
  66. package/dist/plugin/runtimeContext.d.ts +14 -0
  67. package/dist/plugin/runtimeContext.d.ts.map +1 -1
  68. package/dist/plugin/toolcalls.d.ts +9 -1
  69. package/dist/plugin/toolcalls.d.ts.map +1 -1
  70. package/dist/storage/scopedArtifacts.d.ts +7 -0
  71. package/dist/storage/scopedArtifacts.d.ts.map +1 -0
  72. package/dist/telemetry/aggregate.d.ts +7 -0
  73. package/dist/telemetry/aggregate.d.ts.map +1 -1
  74. package/dist/telemetry/events.d.ts +68 -2
  75. package/dist/telemetry/events.d.ts.map +1 -1
  76. package/package.json +1 -1
@@ -92,6 +92,12 @@
92
92
  }
93
93
  },
94
94
  "maxRetries": 2,
95
- "maxModelsPerNode": 2
95
+ "maxModelsPerNode": 2,
96
+ "taskBudget": {
97
+ "maxBatches": 8,
98
+ "maxAttempts": 32,
99
+ "maxDurationMs": 7200000,
100
+ "maxDepth": 3
101
+ }
96
102
  }
97
103
  }
package/README.es.md CHANGED
@@ -40,7 +40,7 @@ estrecha un agente a `local` bajo el modo global `mixed`.
40
40
 
41
41
  ## Características
42
42
 
43
- - Routing por turno antes de inferencia: `chat.message` en 1.x o el adaptador nativo de prompt/modelo en 2.0.5.
43
+ - Routing por turno antes de inferencia: `chat.message` en 1.x o el adaptador nativo de prompt/modelo en 2.x.
44
44
  - Registro de runtimes locales OpenAI-compatible: Ollama, LM Studio, Lemonade Server, llama-swap y Foundry Local.
45
45
  - Perfiles de capacidad desde Models.dev, con cache y fallback curado cuando el catálogo no está disponible.
46
46
  - Selección automática **cheapest-capable** por coste, disponibilidad, soporte de tools y contexto dentro del dominio permitido.
@@ -55,7 +55,7 @@ estrecha un agente a `local` bajo el modo global `mixed`.
55
55
 
56
56
  ## Requisitos
57
57
 
58
- - opencode **1.18.19** (legacy) o **2.0.5** (adaptador nativo).
58
+ - opencode **1.18.19** (legacy) o versiones estables **`>=2.0.5 <3.0.0`** (adaptador nativo).
59
59
  No se asume compatibilidad con otras versiones
60
60
  2.x. Consulta los [límites de compatibilidad](docs/es/compatibility.md#opencode-2-0-5-nativo).
61
61
  - Bun `1.3.14` para instalaciones, desarrollo y tests reproducibles.
@@ -373,6 +373,10 @@ ejecutas desde un subdirectorio verás "provider not configured" y debes hacer
373
373
  | `orchestrator` | objeto opcional | ausente | Contiene políticas de primary/roles y límites de pasadas. |
374
374
  | `orchestrator.maxRetries` | entero no negativo opcional | efectivo `2` | Límite superior de pasadas openteam extra por modelo autorizado; `2` efectivo permite hasta tres pasadas. El default se aplica en runtime, no se materializa en el schema. |
375
375
  | `orchestrator.maxModelsPerNode` | entero positivo opcional | efectivo `2` | Total de candidatos por nodo: el seleccionado más como máximo un fallback por defecto. El default de runtime no se materializa; combinado con reintentos permite como máximo seis intentos. |
376
+ | `orchestrator.taskBudget.maxBatches` | entero `1..1000`, opcional | `8` | Lotes acumulados de una petición raíz, incluidos los anidados. |
377
+ | `orchestrator.taskBudget.maxAttempts` | entero `1..10000`, opcional | `32` | Intentos acumulados, incluidos reintentos y relevos de modelo. |
378
+ | `orchestrator.taskBudget.maxDurationMs` | entero `1000..86400000`, opcional | `7200000` | Plazo desde la petición raíz, con gracia adicional acotada para confirmar la parada. |
379
+ | `orchestrator.taskBudget.maxDepth` | entero `0..32`, opcional | `3` | Profundidad máxima de lotes anidados; la raíz es cero. |
376
380
  | `orchestrator.primary` | `ExecutionPolicy` parcial opcional | ausente | Política del coordinador primario; todos sus campos son opcionales. |
377
381
  | `orchestrator.roles` | `Record<string, AgentRoleProfile parcial>` raw | `{}` si existe `orchestrator` | Las entradas raw pueden ser parciales. Las cargadas quedan totalmente fusionadas y validadas: primero perfil integrado o, si no existe, sintetizado; después prevalece el override raw. |
378
382
  | `orchestrator.roles.<role>.opencodeAgent` | `string` no vacío opcional | role ID | Nombre del agente opencode al que se despacha ese rol. |
@@ -737,6 +741,20 @@ ejecuta dependientes. Consulta
737
741
 
738
742
  ### Console web multi-sesión (se lanza desde la CLI)
739
743
 
744
+ Los lotes relacionados y anidados comparten por defecto **8 lotes, 32 intentos,
745
+ 2 horas y profundidad 3** por petición raíz. `orchestrator.taskBudget` permite
746
+ ajustar los límites; reiniciar el plugin o emitir otra llamada no reinicia el
747
+ presupuesto. Una nueva petición raíz del usuario sí inicia otra tarea.
748
+ `openteam-submit-report` guarda únicamente el informe asignado al trabajador,
749
+ respetando los permisos. La reparación del informe continúa en su misma sesión
750
+ y consume los límites existentes.
751
+
752
+ Agent tree incorpora grafo de operaciones, cronología real, reproducción,
753
+ filtros, controles del lienzo e inspector con conversación visible. Conserva
754
+ los reintentos y fallos de lotes relacionados aunque el padre se recupere.
755
+ Las métricas ausentes o ceros sin verificar se muestran como
756
+ **Unavailable / partial**; no se inventan costes, velocidad ni ahorros.
757
+
740
758
  openteam expone una **Console web local** que **lanzas tú desde la CLI** con
741
759
  `openteam console`.
742
760
  Agrega **todas** las sesiones de opencode a la vez: puedes tener varias pestañas
@@ -1036,8 +1054,8 @@ Consulta [docs/es/compatibility.md](docs/es/compatibility.md). Resumen verificad
1036
1054
 
1037
1055
  | Superficie | Versión / contrato |
1038
1056
  | --- | --- |
1039
- | openteam | `0.27.0`; versión actual del paquete |
1040
- | Host opencode | `1.18.19` legacy; soporte nativo exacto `2.0.5` |
1057
+ | openteam | `0.28.0`; versión actual del paquete |
1058
+ | Host opencode | `1.18.19` legacy; soporte nativo estable `>=2.0.5 <3.0.0` |
1041
1059
  | `@opencode-ai/plugin` | `1.18.19` |
1042
1060
  | `@opencode-ai/sdk` | `1.18.19` |
1043
1061
  | Hook de routing | `chat.message` legacy; `prompt` + `session.switchModel` nativos; nunca `chat.params` |
package/README.md CHANGED
@@ -46,7 +46,7 @@ or narrow an agent to `local` under global `mixed`, when frontier is prohibited.
46
46
 
47
47
  ## Features
48
48
 
49
- - Per-turn routing before inference: legacy `chat.message` or the native 2.0.5 prompt/model boundary.
49
+ - Per-turn routing before inference: legacy `chat.message` or the native 2.x prompt/model boundary.
50
50
  - Registration of OpenAI-compatible local runtimes: **Ollama**, **LM Studio**, **Lemonade Server**, **llama-swap** and **Foundry Local**.
51
51
  - Capability profiles from [Models.dev](https://models.dev), with cache and a curated fallback when the catalog is unavailable.
52
52
  - **Cheapest-capable** automatic selection by cost, availability, tool support, and context requirements inside the allowed domain.
@@ -63,7 +63,7 @@ or narrow an agent to `local` under global `mixed`, when frontier is prohibited.
63
63
 
64
64
  ## Requirements
65
65
 
66
- - opencode **1.18.19** (legacy) or **2.0.5** (native adapter).
66
+ - opencode **1.18.19** (legacy) or stable **`>=2.0.5 <3.0.0`** (native adapter).
67
67
  Other 2.x versions are not assumed compatible. See the
68
68
  [host compatibility boundary](docs/compatibility.md#native-opencode-2-0-5).
69
69
  - [Bun](https://bun.sh) `1.3.14` for reproducible installs, development, and tests.
@@ -379,6 +379,10 @@ configured" and should `cd` to the project root first.
379
379
  | `orchestrator` | object, optional | absent | Holds primary/role policy and pass limits. |
380
380
  | `orchestrator.maxRetries` | non-negative integer, optional | effective `2` | Upper bound of extra openteam passes per authorized model; effective `2` permits up to three passes. The default is applied at runtime, not materialized by the schema. |
381
381
  | `orchestrator.maxModelsPerNode` | positive integer, optional | effective `2` | Total model candidates used by one node: the selected model plus at most one fallback by default. The runtime default is not materialized; with retry defaults it permits at most six attempts. |
382
+ | `orchestrator.taskBudget.maxBatches` | integer `1..1000`, optional | `8` | Cumulative batches for one trusted root user turn, including nested workers. |
383
+ | `orchestrator.taskBudget.maxAttempts` | integer `1..10000`, optional | `32` | Cumulative admitted attempts, including retries and model handoffs. |
384
+ | `orchestrator.taskBudget.maxDurationMs` | integer `1000..86400000`, optional | `7200000` | Task deadline from the root user turn; bounds queueing, creation and prompting, with separate bounded stop-confirmation grace. |
385
+ | `orchestrator.taskBudget.maxDepth` | integer `0..32`, optional | `3` | Maximum nested batch depth; root is depth zero. |
382
386
  | `orchestrator.primary` | partial `ExecutionPolicy`, optional | absent | Policy for the primary coordinator. Every field is optional. |
383
387
  | `orchestrator.roles` | raw `Record<string, partial AgentRoleProfile>` | `{}` when `orchestrator` exists | Raw entries may be partial. Loaded entries are fully merged and validated: built-in profile first, otherwise a synthesized profile, then the raw override. |
384
388
  | `orchestrator.roles.<role>.opencodeAgent` | non-empty string, optional | role ID | opencode agent name to dispatch for that role. |
@@ -710,6 +714,21 @@ retries.
710
714
  The batch, objective, report path, and durable work state are preserved. An
711
715
  exact pin without `fallbacks` authorizes no second model.
712
716
 
717
+ Related and nested batches also share a persisted task allowance: by default
718
+ **8 batches, 32 attempts, 2 hours and nesting depth 3**. Configure the optional
719
+ `orchestrator.taskBudget` block and restart opencode to change future-task
720
+ limits. Another model-authored call or plugin reload cannot reset the task.
721
+ A new root user turn starts a new task; old workers keep their old allowance.
722
+ Exhaustion is explicit, not a successful completion.
723
+
724
+ Workers prefer **`openteam-submit-report`** with `status` and bounded,
725
+ substantive `findings`. The coordinator assigns its only writable report path
726
+ and preserves operator permission checks. Same-model report repair continues
727
+ in the same worker session without another full implementation restart.
728
+ Confirmed length-ended invalid native tool input requests smaller fresh calls
729
+ within existing limits; malformed JSON is never repaired and executed.
730
+ See the [reliability decision](docs/adr/task-effort-and-agent-view.md).
731
+
713
732
  Every pass, including a single pass with `maxRetries: 0`, needs a standalone
714
733
  `openteam-status: done` declaration **and** a durable report with at least 40
715
734
  substantive body characters after actual declaration lines are removed. The
@@ -740,6 +759,11 @@ agent decisions and meetings, orchestration progress, the team, and commits.
740
759
  These controls and estimates are finite/auditable, but they are not provider
741
760
  invoice accounting.
742
761
 
762
+ Agent tree includes the operation graph, real chronology/replay, filters,
763
+ canvas controls and a default-readable inspector. Missing/unverified usage is
764
+ shown as **unavailable / partial**, not confirmed zero. Unknown tool duration
765
+ stays unknown, and routing estimates are distinct from measured usage.
766
+
743
767
  **Conversations are visible by default.** Active Agent tree and Logs views
744
768
  automatically show operator prompts, visible agent responses and recorded tool
745
769
  interactions, with live updates. Reads use opencode's current session history,
@@ -985,8 +1009,8 @@ See [docs/compatibility.md](docs/compatibility.md). Verified summary as of `2026
985
1009
 
986
1010
  | Surface | Version / contract |
987
1011
  | --- | --- |
988
- | openteam | `0.27.0`; current package version |
989
- | opencode host | `1.18.19` legacy; exact `2.0.5` native support |
1012
+ | openteam | `0.28.0`; current package version |
1013
+ | opencode host | `1.18.19` legacy; stable `>=2.0.5 <3.0.0` native support |
990
1014
  | `@opencode-ai/plugin` | `1.18.19` |
991
1015
  | `@opencode-ai/sdk` | `1.18.19` |
992
1016
  | Routing hook | Legacy `chat.message`; native `prompt` + `session.switchModel`; never `chat.params` |
@@ -34,12 +34,12 @@
34
34
  "idempotent": true
35
35
  },
36
36
  "performance": {
37
- "p95Millis": 0.4973019999999906,
37
+ "p95Millis": 0.4664709999999559,
38
38
  "budgetMillis": 50,
39
39
  "samples": 100
40
40
  }
41
41
  },
42
42
  "verdict": "pass",
43
43
  "failedGates": [],
44
- "digest": "9b690d23c4493fbfd8d157387d0f33b53db8fe8cc024c92c60b39b109bc83e3b"
44
+ "digest": "699163958f7f7e149e188d1686155f8a26ef7a54d5f8ec712a5d93907ed9f8a1"
45
45
  }
@@ -20,7 +20,7 @@
20
20
  "rawFindings": 0
21
21
  },
22
22
  "overhead": {
23
- "p95Millis": 0.312385000000063,
23
+ "p95Millis": 0.32996700000001056,
24
24
  "budgetMillis": 25,
25
25
  "samples": 1000
26
26
  },
@@ -35,5 +35,5 @@
35
35
  },
36
36
  "verdict": "pass",
37
37
  "failedGates": [],
38
- "digest": "f751dfd5546d484ac06fdeb6da154ae6364fe04efa1529802b294f32a9f5acaa"
38
+ "digest": "b5081d64bc269e3a439847296805e0debe84651e65cdb456025fa9c1b6015f08"
39
39
  }
@@ -34,12 +34,12 @@
34
34
  "idempotent": true
35
35
  },
36
36
  "performance": {
37
- "p95Millis": 0.509454999999889,
37
+ "p95Millis": 0.4964679999998225,
38
38
  "budgetMillis": 50,
39
39
  "samples": 100
40
40
  }
41
41
  },
42
42
  "verdict": "pass",
43
43
  "failedGates": [],
44
- "digest": "61b110f9ef4b49049d1bb8c0beb818c35fcacf3344af6f4b5963058f5d98dac8"
44
+ "digest": "d837508093429a7e26f9e776526e1e5d47e412fa6f50cb0e5df778fbc21918b2"
45
45
  }
@@ -20,7 +20,7 @@
20
20
  "rawFindings": 0
21
21
  },
22
22
  "overhead": {
23
- "p95Millis": 0.18683999999996104,
23
+ "p95Millis": 0.1888529999999946,
24
24
  "budgetMillis": 25,
25
25
  "samples": 1000
26
26
  },
@@ -35,5 +35,5 @@
35
35
  },
36
36
  "verdict": "pass",
37
37
  "failedGates": [],
38
- "digest": "44eeb60534a6b735c4be99d185d3239a64ea4f6b737d4de5a83c671373fea913"
38
+ "digest": "9ab75e46560deda87df906f5baf6ad3d829aea9d53b05a01db98453cc344e58f"
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"opencodeVersion.d.ts","sourceRoot":"","sources":["../../src/cli/opencodeVersion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACzE;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD,CAAC;AAqBF;;;;;;;GAOG;AACH,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAsB7B"}
1
+ {"version":3,"file":"opencodeVersion.d.ts","sourceRoot":"","sources":["../../src/cli/opencodeVersion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;;OAGG;IACH,QAAQ,CAAC,kBAAkB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACzE;;;OAGG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;CACnD,CAAC;AAsBF;;;;;;;GAOG;AACH,wBAAsB,gCAAgC,CACpD,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAsB7B"}