@jmanuelcorral/openteam 0.1.17 → 0.1.19
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Comandos runtime de openteam (baseline show|set|auto, doctor, report)
|
|
2
|
+
description: Comandos runtime de openteam (baseline show|set|auto, doctor, agents, dashboard, report)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
Usa la herramienta `openteam` para ejecutar el comando indicado por el usuario: $ARGUMENTS
|
|
@@ -10,6 +10,8 @@ Interpreta los argumentos así y llama a la herramienta `openteam` una sola vez:
|
|
|
10
10
|
- `baseline set <provider/model>` → `action: "set"`, `model: "<provider/model>"`
|
|
11
11
|
- `baseline auto` → `action: "auto"`
|
|
12
12
|
- `doctor` → `action: "doctor"`
|
|
13
|
+
- `agents` → `action: "agents"`
|
|
14
|
+
- `dashboard` → `action: "dashboard"`
|
|
13
15
|
- `report` → `action: "report"`
|
|
14
16
|
|
|
15
17
|
Devuelve la salida de la herramienta tal cual, sin reinterpretarla.
|
package/README.md
CHANGED
|
@@ -345,16 +345,20 @@ Los cambios de `set`/`auto` se persisten en `.opencode/openteam.json` y aplican
|
|
|
345
345
|
|
|
346
346
|
### 2. Slash command `/openteam`
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
`openteam init` **genera automáticamente** `.opencode/command/openteam.md`, así que el comando `/openteam` aparece en opencode sin pasos manuales. (Si vienes de una versión anterior, vuelve a ejecutar `openteam init` para crearlo, o cópialo a mano a tu proyecto o a `~/.config/opencode/command/`.) Después:
|
|
349
349
|
|
|
350
350
|
```text
|
|
351
351
|
/openteam baseline show
|
|
352
352
|
/openteam baseline set anthropic/claude-sonnet-4-5
|
|
353
353
|
/openteam baseline auto
|
|
354
354
|
/openteam doctor
|
|
355
|
+
/openteam agents
|
|
356
|
+
/openteam dashboard
|
|
355
357
|
/openteam report
|
|
356
358
|
```
|
|
357
359
|
|
|
360
|
+
> ¿No ves `/openteam` en opencode? Asegúrate de que existe `.opencode/command/openteam.md` (lo crea `openteam init`) y **reinicia/recarga opencode** para que descubra el comando.
|
|
361
|
+
|
|
358
362
|
### 3. CLI (`bin`)
|
|
359
363
|
|
|
360
364
|
El paquete expone el binario `openteam`. Con instalación global:
|
|
@@ -419,7 +423,7 @@ Segundo modo de operación: un **bucle externo** que invoca `opencode run` contr
|
|
|
419
423
|
|
|
420
424
|
openteam puede exponer un **panel web local** que se sirve **dentro del proceso de opencode** (hook `server()`), mientras la sesión está abierta. Muestra en vivo: ruteo reciente (coste/ahorro y modelo elegido, **solo hashes de prompt, nunca el texto**), progreso del backlog del loop, el equipo de agentes (LLM local/frontier de cada uno), últimos commits y actividad. Se actualiza por **SSE** (con *polling* de respaldo).
|
|
421
425
|
|
|
422
|
-
|
|
426
|
+
`openteam init` **te pregunta si quieres activarlo** (puerto 4599 por defecto). También puedes activarlo a mano en `.opencode/openteam.json`:
|
|
423
427
|
|
|
424
428
|
```json
|
|
425
429
|
{
|
package/dist/cli.js
CHANGED
|
@@ -1688,6 +1688,32 @@ async function writeOpenTeamConfigFile(config, path = DEFAULT_CONFIG_PATH, deps
|
|
|
1688
1688
|
await writeFileFn(path, serializeOpenTeamConfig(config), "utf8");
|
|
1689
1689
|
}
|
|
1690
1690
|
|
|
1691
|
+
// src/commands/slashCommand.ts
|
|
1692
|
+
var OPENTEAM_COMMAND_PATH = ".opencode/command/openteam.md";
|
|
1693
|
+
function buildOpenteamCommand() {
|
|
1694
|
+
return [
|
|
1695
|
+
"---",
|
|
1696
|
+
"description: Comandos runtime de openteam (baseline show|set|auto, doctor, agents, dashboard, report)",
|
|
1697
|
+
"---",
|
|
1698
|
+
"",
|
|
1699
|
+
"Usa la herramienta `openteam` para ejecutar el comando indicado por el usuario: $ARGUMENTS",
|
|
1700
|
+
"",
|
|
1701
|
+
"Interpreta los argumentos así y llama a la herramienta `openteam` una sola vez:",
|
|
1702
|
+
"",
|
|
1703
|
+
'- `baseline show` (o vacío) → `action: "show"`',
|
|
1704
|
+
'- `baseline set <provider/model>` → `action: "set"`, `model: "<provider/model>"`',
|
|
1705
|
+
'- `baseline auto` → `action: "auto"`',
|
|
1706
|
+
'- `doctor` → `action: "doctor"`',
|
|
1707
|
+
'- `agents` → `action: "agents"`',
|
|
1708
|
+
'- `dashboard` → `action: "dashboard"`',
|
|
1709
|
+
'- `report` → `action: "report"`',
|
|
1710
|
+
"",
|
|
1711
|
+
"Devuelve la salida de la herramienta tal cual, sin reinterpretarla.",
|
|
1712
|
+
""
|
|
1713
|
+
].join(`
|
|
1714
|
+
`);
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1691
1717
|
// src/commands/init.ts
|
|
1692
1718
|
var OPENTEAM_PLUGIN_SPEC = "@jmanuelcorral/openteam";
|
|
1693
1719
|
var OPENCODE_CONFIG_PATH = "opencode.json";
|
|
@@ -1775,7 +1801,8 @@ function buildOpenTeamConfig(answers) {
|
|
|
1775
1801
|
localDefault
|
|
1776
1802
|
},
|
|
1777
1803
|
local: { runtimes },
|
|
1778
|
-
privacyMode: answers.privacyMode
|
|
1804
|
+
privacyMode: answers.privacyMode,
|
|
1805
|
+
dashboard: { enabled: answers.dashboard }
|
|
1779
1806
|
});
|
|
1780
1807
|
}
|
|
1781
1808
|
function buildOpencodeConfig(answers) {
|
|
@@ -2019,19 +2046,26 @@ async function runInit(deps) {
|
|
|
2019
2046
|
message: "¿Activar modo YOLO? (opencode auto-aprueba todos los permisos; no afecta a la privacidad de openteam)",
|
|
2020
2047
|
initial: false
|
|
2021
2048
|
});
|
|
2049
|
+
const dashboard = await prompt.confirm({
|
|
2050
|
+
message: "¿Exponer el dashboard web local mientras opencode está abierto? (solo loopback en el puerto 4599, sin prompts; ajustable luego en .opencode/openteam.json)",
|
|
2051
|
+
initial: false
|
|
2052
|
+
});
|
|
2022
2053
|
const answers = {
|
|
2023
2054
|
runtimes,
|
|
2024
2055
|
frontier,
|
|
2025
2056
|
routerMode,
|
|
2026
2057
|
privacyMode,
|
|
2027
|
-
yolo
|
|
2058
|
+
yolo,
|
|
2059
|
+
dashboard
|
|
2028
2060
|
};
|
|
2029
2061
|
const openTeamConfig = buildOpenTeamConfig(answers);
|
|
2030
2062
|
const opencodeConfig = buildOpencodeConfig(answers);
|
|
2031
2063
|
const orchestratorAgent = buildOrchestratorAgent(frontier, { yolo });
|
|
2064
|
+
const slashCommand = buildOpenteamCommand();
|
|
2032
2065
|
const openTeamPath = join(deps.cwd, DEFAULT_CONFIG_PATH);
|
|
2033
2066
|
const opencodePath = join(deps.cwd, OPENCODE_CONFIG_PATH);
|
|
2034
2067
|
const agentPath = join(deps.cwd, ORCHESTRATOR_AGENT_PATH);
|
|
2068
|
+
const commandPath = join(deps.cwd, OPENTEAM_COMMAND_PATH);
|
|
2035
2069
|
const existing = [];
|
|
2036
2070
|
if (await deps.fileExists(openTeamPath)) {
|
|
2037
2071
|
existing.push(DEFAULT_CONFIG_PATH);
|
|
@@ -2042,6 +2076,9 @@ async function runInit(deps) {
|
|
|
2042
2076
|
if (await deps.fileExists(agentPath)) {
|
|
2043
2077
|
existing.push(ORCHESTRATOR_AGENT_PATH);
|
|
2044
2078
|
}
|
|
2079
|
+
if (await deps.fileExists(commandPath)) {
|
|
2080
|
+
existing.push(OPENTEAM_COMMAND_PATH);
|
|
2081
|
+
}
|
|
2045
2082
|
if (existing.length > 0) {
|
|
2046
2083
|
const overwrite = await prompt.confirm({
|
|
2047
2084
|
message: `Ya existe ${existing.join(" y ")}. ¿Sobrescribir?`,
|
|
@@ -2055,23 +2092,25 @@ async function runInit(deps) {
|
|
|
2055
2092
|
await deps.writeFile(openTeamPath, serializeOpenTeamConfig(openTeamConfig));
|
|
2056
2093
|
await deps.writeFile(opencodePath, serializeOpencodeConfig(opencodeConfig));
|
|
2057
2094
|
await deps.writeFile(agentPath, orchestratorAgent);
|
|
2095
|
+
await deps.writeFile(commandPath, slashCommand);
|
|
2058
2096
|
const enabledSummary = runtimes.filter((runtime) => runtime.enabled).map((runtime) => `${runtime.id} (${runtime.defaultModelID})`).join(", ");
|
|
2059
2097
|
prompt.note([
|
|
2060
2098
|
`Baseline frontier: ${frontier.providerID}/${frontier.modelID}`,
|
|
2061
2099
|
`Runtimes locales: ${enabledSummary || "ninguno habilitado"}`,
|
|
2062
2100
|
`Modo YOLO: ${yolo ? "activado (auto-aprueba permisos)" : "desactivado"}`,
|
|
2063
|
-
`
|
|
2101
|
+
`Dashboard web: ${dashboard ? "activado (http://127.0.0.1:4599 mientras opencode esté abierto)" : "desactivado"}`,
|
|
2102
|
+
`Escrito: ${OPENCODE_CONFIG_PATH}, ${DEFAULT_CONFIG_PATH}, ${ORCHESTRATOR_AGENT_PATH}, ${OPENTEAM_COMMAND_PATH}`,
|
|
2064
2103
|
"",
|
|
2065
2104
|
"Siguientes pasos:",
|
|
2066
2105
|
` 1. Autentica el provider frontier: opencode auth login`,
|
|
2067
2106
|
reachableIds.length === 0 ? " 2. Arranca tu runtime local (Ollama/LM Studio/Foundry) antes de usarlo" : " 2. Abre opencode en este repo; openteam enruta local-first automáticamente",
|
|
2068
|
-
" 3. Pulsa Tab y elige el agente 'openteam'
|
|
2107
|
+
" 3. Pulsa Tab y elige el agente 'openteam', o usa el slash command /openteam"
|
|
2069
2108
|
].join(`
|
|
2070
2109
|
`), "openteam configurado");
|
|
2071
2110
|
prompt.outro("Listo. Abre opencode y selecciona el agente 'openteam'.");
|
|
2072
2111
|
return {
|
|
2073
2112
|
exitCode: 0,
|
|
2074
|
-
stdout: `openteam init completado: ${OPENCODE_CONFIG_PATH}, ${DEFAULT_CONFIG_PATH}, ${ORCHESTRATOR_AGENT_PATH}`
|
|
2113
|
+
stdout: `openteam init completado: ${OPENCODE_CONFIG_PATH}, ${DEFAULT_CONFIG_PATH}, ${ORCHESTRATOR_AGENT_PATH}, ${OPENTEAM_COMMAND_PATH}`
|
|
2075
2114
|
};
|
|
2076
2115
|
} catch (error) {
|
|
2077
2116
|
const message = error instanceof Error ? error.message : String(error);
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAKpE,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAKpE,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,4BAA4B,CAAC;AAE9D,2DAA2D;AAC3D,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AAEpD,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,cAAc,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAmBjD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,cAAc,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;I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}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ruta relativa (al cwd) del slash command `/openteam` que `openteam init`
|
|
3
|
+
* genera. opencode descubre los slash commands leyendo `.opencode/command/*.md`
|
|
4
|
+
* (o `~/.config/opencode/command/`); el nombre del fichero (`openteam`) es el
|
|
5
|
+
* nombre del comando, invocable como `/openteam`.
|
|
6
|
+
*/
|
|
7
|
+
export declare const OPENTEAM_COMMAND_PATH = ".opencode/command/openteam.md";
|
|
8
|
+
/**
|
|
9
|
+
* Construye el Markdown del slash command `/openteam`. Enseña al agente a mapear
|
|
10
|
+
* los argumentos del usuario a una única llamada de la herramienta `openteam`.
|
|
11
|
+
* Debe mantenerse alineado con las acciones de `commandArgv` en
|
|
12
|
+
* `src/plugin/commandTool.ts`. Pure/determinista: sin I/O.
|
|
13
|
+
*/
|
|
14
|
+
export declare function buildOpenteamCommand(): string;
|
|
15
|
+
//# sourceMappingURL=slashCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slashCommand.d.ts","sourceRoot":"","sources":["../../src/commands/slashCommand.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAErE;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAqB7C"}
|