@jmanuelcorral/openteam 0.1.20 → 0.1.21
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.
- package/README.md +14 -0
- package/dist/cli/dashboardServe.d.ts +45 -0
- package/dist/cli/dashboardServe.d.ts.map +1 -0
- package/dist/cli.js +1183 -479
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -80
- package/dist/web/git.d.ts +9 -0
- package/dist/web/git.d.ts.map +1 -0
- package/dist/web/server.d.ts +8 -7
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/start.d.ts +2 -2
- package/dist/web/start.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -453,6 +453,20 @@ Recarga opencode. Al arrancar, el plugin registra la URL en el log:
|
|
|
453
453
|
openteam dashboard
|
|
454
454
|
```
|
|
455
455
|
|
|
456
|
+
#### Verlo fuera de opencode: `openteam dashboard --serve`
|
|
457
|
+
|
|
458
|
+
¿No lo ves dentro de opencode (config sin `enabled`, o quieres inspeccionarlo
|
|
459
|
+
aparte)? Levanta el mismo panel **standalone** contra el repo actual, sin editar
|
|
460
|
+
la config. Escucha en loopback y corre hasta que lo pares con **Ctrl+C**:
|
|
461
|
+
|
|
462
|
+
```powershell
|
|
463
|
+
openteam dashboard --serve # imprime la URL y sirve el panel
|
|
464
|
+
openteam dashboard --serve --open # además abre el navegador
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Fuerza el servidor aunque `dashboard.enabled` sea `false`. Es de solo lectura y
|
|
468
|
+
usa las mismas fuentes que dentro de opencode (telemetría, backlog, agentes).
|
|
469
|
+
|
|
456
470
|
> **Seguridad**: el servidor escucha **solo en loopback** (`127.0.0.1`/`localhost`, validado por Zod) y **nunca expone prompts** (solo `promptHash`). Se cierra al terminar la sesión de opencode. Si el puerto está ocupado y `autoPortFallback` es `true`, prueba el siguiente libre.
|
|
457
471
|
|
|
458
472
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { AgentFile } from "../commands/agents";
|
|
2
|
+
import type { OpenTeamConfig } from "../config/schema";
|
|
3
|
+
import type { CommitView } from "../dashboard/types";
|
|
4
|
+
import type { DashboardRuntime, DashboardRuntimeDeps } from "../web/start";
|
|
5
|
+
/** Dependencias inyectables del launcher `openteam dashboard --serve`. */
|
|
6
|
+
export type DashboardServeDeps = {
|
|
7
|
+
loadConfig: (path: string) => Promise<OpenTeamConfig>;
|
|
8
|
+
configPath: string;
|
|
9
|
+
telemetryPath: string;
|
|
10
|
+
backlogPath: string;
|
|
11
|
+
agentDir: string;
|
|
12
|
+
readText: (path: string) => Promise<string | undefined>;
|
|
13
|
+
listAgentFiles: (dir: string) => Promise<AgentFile[]>;
|
|
14
|
+
now: () => string;
|
|
15
|
+
gitLastCommit?: () => Promise<CommitView | undefined>;
|
|
16
|
+
/** Espera hasta que el usuario pare el proceso (SIGINT/SIGTERM). */
|
|
17
|
+
waitForSignal: () => Promise<void>;
|
|
18
|
+
log: (message: string) => void;
|
|
19
|
+
/** Inyectable para tests; por defecto `startDashboard`. */
|
|
20
|
+
startDashboard?: (deps: DashboardRuntimeDeps) => DashboardRuntime | Promise<DashboardRuntime>;
|
|
21
|
+
/** Abre el navegador en la URL dada (opcional; solo con `--open`). */
|
|
22
|
+
openBrowser?: (url: string) => void | Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
export type DashboardServeOptions = {
|
|
25
|
+
open: boolean;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Parsea los flags de `openteam dashboard`. `--serve` levanta el servidor real;
|
|
29
|
+
* `--open` (solo con `--serve`) abre el navegador.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseDashboardServeArgs(rest: readonly string[]): {
|
|
32
|
+
serve: boolean;
|
|
33
|
+
open: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type DashboardServeResult = {
|
|
36
|
+
exitCode: number;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* `openteam dashboard --serve`: arranca el dashboard web **standalone** (fuera de
|
|
40
|
+
* opencode) contra el repo actual, imprime la URL y corre hasta que el usuario lo
|
|
41
|
+
* para (Ctrl+C). Fuerza el servidor aunque `dashboard.enabled` sea `false` en la
|
|
42
|
+
* config, para poder verlo sin editar ficheros. Solo escucha en loopback.
|
|
43
|
+
*/
|
|
44
|
+
export declare function runDashboardServe(deps: DashboardServeDeps, options: DashboardServeOptions): Promise<DashboardServeResult>;
|
|
45
|
+
//# sourceMappingURL=dashboardServe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboardServe.d.ts","sourceRoot":"","sources":["../../src/cli/dashboardServe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAG3E,0EAA0E;AAC1E,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACtD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACxD,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IACtD,GAAG,EAAE,MAAM,MAAM,CAAC;IAClB,aAAa,CAAC,EA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