@jmanuelcorral/openteam 0.2.2 → 0.9.1
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/.opencode/command/openteam.md +2 -1
- package/.opencode/openteam.example.json +27 -8
- package/AGENTS.md +5 -2
- package/README.es.md +155 -59
- package/README.md +418 -62
- package/dist/capabilities/types.d.ts +3 -3
- package/dist/capabilities/types.d.ts.map +1 -1
- package/dist/classifier/localClassifier.d.ts +0 -2
- package/dist/classifier/localClassifier.d.ts.map +1 -1
- package/dist/cli/consoleServe.d.ts +21 -1
- package/dist/cli/consoleServe.d.ts.map +1 -1
- package/dist/cli/graphOperator.d.ts +22 -0
- package/dist/cli/graphOperator.d.ts.map +1 -0
- package/dist/cli/graphStatusSnapshot.d.ts +16 -0
- package/dist/cli/graphStatusSnapshot.d.ts.map +1 -0
- package/dist/cli/migrateAdapter.d.ts +12 -0
- package/dist/cli/migrateAdapter.d.ts.map +1 -0
- package/dist/cli/purgeAdapter.d.ts +10 -0
- package/dist/cli/purgeAdapter.d.ts.map +1 -0
- package/dist/cli/setupAdapters.d.ts.map +1 -1
- package/dist/cli.js +13534 -6124
- package/dist/commands/agents.d.ts +102 -2
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/baseline.d.ts.map +1 -1
- package/dist/commands/clearCache.d.ts +23 -0
- package/dist/commands/clearCache.d.ts.map +1 -0
- package/dist/commands/dispatch.d.ts +202 -4
- package/dist/commands/dispatch.d.ts.map +1 -1
- package/dist/commands/doctor.d.ts +53 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/frontierCatalog.d.ts +8 -14
- package/dist/commands/frontierCatalog.d.ts.map +1 -1
- package/dist/commands/graph.d.ts +0 -27
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/local.d.ts.map +1 -1
- package/dist/commands/migrate.d.ts +11 -0
- package/dist/commands/migrate.d.ts.map +1 -0
- package/dist/commands/purge.d.ts +132 -0
- package/dist/commands/purge.d.ts.map +1 -0
- package/dist/commands/report.d.ts +1 -0
- package/dist/commands/report.d.ts.map +1 -1
- package/dist/commands/setup.d.ts +62 -5
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/config/errors.d.ts +10 -0
- package/dist/config/errors.d.ts.map +1 -0
- package/dist/config/legacyMigration.d.ts +82 -0
- package/dist/config/legacyMigration.d.ts.map +1 -0
- package/dist/config/legacyPaths.d.ts +105 -0
- package/dist/config/legacyPaths.d.ts.map +1 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/opencode.d.ts +63 -0
- package/dist/config/opencode.d.ts.map +1 -0
- package/dist/config/persist.d.ts +8 -0
- package/dist/config/persist.d.ts.map +1 -1
- package/dist/config/resolve.d.ts +1 -1
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/runtime.d.ts +62 -0
- package/dist/config/runtime.d.ts.map +1 -0
- package/dist/config/schema.d.ts +142 -79
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/console/assets.d.ts +2 -2
- package/dist/console/assets.d.ts.map +1 -1
- package/dist/console/configView.d.ts +74 -0
- package/dist/console/configView.d.ts.map +1 -0
- package/dist/console/opencodeClient.d.ts +8 -6
- package/dist/console/opencodeClient.d.ts.map +1 -1
- package/dist/console/protocol.d.ts +30 -6
- package/dist/console/protocol.d.ts.map +1 -1
- package/dist/console/render.d.ts +30 -1
- package/dist/console/render.d.ts.map +1 -1
- package/dist/console/types.d.ts +1 -1
- package/dist/console/types.d.ts.map +1 -1
- package/dist/context/redaction.d.ts +19 -19
- package/dist/context/redaction.d.ts.map +1 -1
- package/dist/context/schema.d.ts +26 -26
- package/dist/context/schema.d.ts.map +1 -1
- package/dist/context/types.d.ts +3 -3
- package/dist/contract/opencode.d.ts +39 -23
- package/dist/contract/opencode.d.ts.map +1 -1
- package/dist/graph/certificate.d.ts +37 -16
- package/dist/graph/certificate.d.ts.map +1 -1
- package/dist/graph/langgraph/adapter.d.ts +56 -0
- package/dist/graph/langgraph/adapter.d.ts.map +1 -0
- package/dist/graph/langgraph/certification.d.ts +64 -0
- package/dist/graph/langgraph/certification.d.ts.map +1 -0
- package/dist/graph/langgraph/checkpointReplay.d.ts +49 -0
- package/dist/graph/langgraph/checkpointReplay.d.ts.map +1 -0
- package/dist/graph/langgraph/checkpointer.d.ts +49 -0
- package/dist/graph/langgraph/checkpointer.d.ts.map +1 -0
- package/dist/graph/langgraph/engine.d.ts +34 -0
- package/dist/graph/langgraph/engine.d.ts.map +1 -0
- package/dist/graph/langgraph/graphModel.d.ts +37 -0
- package/dist/graph/langgraph/graphModel.d.ts.map +1 -0
- package/dist/graph/langgraph/reducer.d.ts +18 -0
- package/dist/graph/langgraph/reducer.d.ts.map +1 -0
- package/dist/graph/langgraph/retirement.d.ts +59 -0
- package/dist/graph/langgraph/retirement.d.ts.map +1 -0
- package/dist/graph/langgraph/types.d.ts +65 -0
- package/dist/graph/langgraph/types.d.ts.map +1 -0
- package/dist/graph/privacyPolicy.d.ts +7 -0
- package/dist/graph/privacyPolicy.d.ts.map +1 -1
- package/dist/graph/soakLedger.d.ts.map +1 -1
- package/dist/graph/types.d.ts +0 -2
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/index.d.ts +52 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11334 -5016
- package/dist/local/cacheAdapter.d.ts +7 -0
- package/dist/local/cacheAdapter.d.ts.map +1 -0
- package/dist/local/concurrency.d.ts +52 -0
- package/dist/local/concurrency.d.ts.map +1 -0
- package/dist/local/embeddings.d.ts +10 -10
- package/dist/local/embeddings.d.ts.map +1 -1
- package/dist/local/extractClient.d.ts +13 -10
- package/dist/local/extractClient.d.ts.map +1 -1
- package/dist/local/lemonade.d.ts +4 -0
- package/dist/local/lemonade.d.ts.map +1 -0
- package/dist/local/registry.d.ts +16 -0
- package/dist/local/registry.d.ts.map +1 -1
- package/dist/local/types.d.ts +1 -1
- package/dist/local/types.d.ts.map +1 -1
- package/dist/mcp/semanticRecall.d.ts +18 -1
- package/dist/mcp/semanticRecall.d.ts.map +1 -1
- package/dist/mcp/server.d.ts +41 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/memory/embedText.d.ts +4 -0
- package/dist/memory/embedText.d.ts.map +1 -0
- package/dist/memory/extract.d.ts +33 -18
- package/dist/memory/extract.d.ts.map +1 -1
- package/dist/memory/fold.d.ts +3 -2
- package/dist/memory/fold.d.ts.map +1 -1
- package/dist/memory/index.d.ts +1 -0
- package/dist/memory/index.d.ts.map +1 -1
- package/dist/memory/inject.d.ts.map +1 -1
- package/dist/memory/log.d.ts +15 -4
- package/dist/memory/log.d.ts.map +1 -1
- package/dist/memory/merge.d.ts +18 -1
- package/dist/memory/merge.d.ts.map +1 -1
- package/dist/memory/traverse.d.ts +80 -0
- package/dist/memory/traverse.d.ts.map +1 -0
- package/dist/memory/types.d.ts +53 -7
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/messages/commands.d.ts +84 -0
- package/dist/messages/commands.d.ts.map +1 -0
- package/dist/messages/index.d.ts +46 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/opencodeArtifacts/index.d.ts +33 -0
- package/dist/opencodeArtifacts/index.d.ts.map +1 -0
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts +29 -0
- package/dist/opencodeArtifacts/orchestratorAgent.d.ts.map +1 -0
- package/dist/opencodeArtifacts/slashCommand.d.ts +31 -0
- package/dist/opencodeArtifacts/slashCommand.d.ts.map +1 -0
- package/dist/orchestrator/coordinator.d.ts +155 -1
- package/dist/orchestrator/coordinator.d.ts.map +1 -1
- package/dist/orchestrator/graphCancellation.d.ts +40 -37
- package/dist/orchestrator/graphCancellation.d.ts.map +1 -1
- package/dist/orchestrator/graphEffects.d.ts +24 -24
- package/dist/orchestrator/graphEffects.d.ts.map +1 -1
- package/dist/orchestrator/graphFacade.d.ts +16 -16
- package/dist/orchestrator/graphFacade.d.ts.map +1 -1
- package/dist/orchestrator/graphIngress.d.ts +49 -45
- package/dist/orchestrator/graphIngress.d.ts.map +1 -1
- package/dist/orchestrator/graphReview.d.ts +24 -23
- package/dist/orchestrator/graphReview.d.ts.map +1 -1
- package/dist/orchestrator/graphRuntime.d.ts +27 -26
- package/dist/orchestrator/graphRuntime.d.ts.map +1 -1
- package/dist/orchestrator/graphShadow.d.ts +70 -69
- package/dist/orchestrator/graphShadow.d.ts.map +1 -1
- package/dist/orchestrator/opencodeSessionAdapter.d.ts +25 -25
- package/dist/orchestrator/opencodeSessionAdapter.d.ts.map +1 -1
- package/dist/orchestrator/permissions.d.ts.map +1 -1
- package/dist/orchestrator/ralphLoop.d.ts +57 -0
- package/dist/orchestrator/ralphLoop.d.ts.map +1 -0
- package/dist/orchestrator/roles.d.ts +69 -8
- package/dist/orchestrator/roles.d.ts.map +1 -1
- package/dist/orchestrator/roster.d.ts +103 -0
- package/dist/orchestrator/roster.d.ts.map +1 -0
- package/dist/orchestrator/rosterPersistence.d.ts +22 -0
- package/dist/orchestrator/rosterPersistence.d.ts.map +1 -0
- package/dist/orchestrator/runtimeSelection.d.ts +46 -0
- package/dist/orchestrator/runtimeSelection.d.ts.map +1 -0
- package/dist/orchestrator/sddCompiler.d.ts +34 -34
- package/dist/orchestrator/sddCompiler.d.ts.map +1 -1
- package/dist/orchestrator/sessionReconciler.d.ts +31 -29
- package/dist/orchestrator/sessionReconciler.d.ts.map +1 -1
- package/dist/orchestrator/shadowComparator.d.ts +23 -23
- package/dist/orchestrator/shadowComparator.d.ts.map +1 -1
- package/dist/orchestrator/subsessions.d.ts.map +1 -1
- package/dist/orchestrator/worktreeAdapter.d.ts +12 -12
- package/dist/orchestrator/worktreeAdapter.d.ts.map +1 -1
- package/dist/orchestrator/worktreeDispatch.d.ts +34 -34
- package/dist/orchestrator/worktreeDispatch.d.ts.map +1 -1
- package/dist/orchestrator/worktreeReconciler.d.ts +37 -36
- package/dist/orchestrator/worktreeReconciler.d.ts.map +1 -1
- package/dist/plugin/availability.d.ts.map +1 -1
- package/dist/plugin/capture.d.ts +12 -12
- package/dist/plugin/capture.d.ts.map +1 -1
- package/dist/plugin/commandTool.d.ts +1 -1
- package/dist/plugin/commandTool.d.ts.map +1 -1
- package/dist/plugin/diagnostics.d.ts +30 -0
- package/dist/plugin/diagnostics.d.ts.map +1 -0
- package/dist/plugin/graphShadowIngress.d.ts +50 -48
- package/dist/plugin/graphShadowIngress.d.ts.map +1 -1
- package/dist/plugin/graphTool.d.ts +25 -23
- package/dist/plugin/graphTool.d.ts.map +1 -1
- package/dist/plugin/hooks.d.ts +10 -10
- package/dist/plugin/hooks.d.ts.map +1 -1
- package/dist/plugin/legacyRunProducer.d.ts +22 -22
- package/dist/plugin/legacyRunProducer.d.ts.map +1 -1
- package/dist/plugin/memoryInject.d.ts +6 -6
- package/dist/plugin/memoryInject.d.ts.map +1 -1
- package/dist/plugin/memoryTool.d.ts +36 -0
- package/dist/plugin/memoryTool.d.ts.map +1 -0
- package/dist/plugin/orchestrateTool.d.ts +38 -3
- package/dist/plugin/orchestrateTool.d.ts.map +1 -1
- package/dist/plugin/reportRunSchema.d.ts +8 -8
- package/dist/plugin/reportRunSchema.d.ts.map +1 -1
- package/dist/plugin/sessionTracker.d.ts +15 -15
- package/dist/plugin/sessionTracker.d.ts.map +1 -1
- package/dist/plugin/shadowPipeline.d.ts +2 -1
- package/dist/plugin/shadowPipeline.d.ts.map +1 -1
- package/dist/plugin/soakObserver.d.ts +18 -11
- package/dist/plugin/soakObserver.d.ts.map +1 -1
- package/dist/plugin/toolcalls.d.ts +3 -3
- package/dist/router/chooseModel.d.ts.map +1 -1
- package/dist/router/frontierBaseline.d.ts +3 -3
- package/dist/router/modelSelection.d.ts +12 -4
- package/dist/router/modelSelection.d.ts.map +1 -1
- package/dist/router/types.d.ts +6 -1
- package/dist/router/types.d.ts.map +1 -1
- package/dist/storage/graph/snapshot.d.ts.map +1 -1
- package/dist/storage/graph/soakRecorder.d.ts +14 -1
- package/dist/storage/graph/soakRecorder.d.ts.map +1 -1
- package/dist/storage/graph/workspaceLease.d.ts +1 -1
- package/dist/storage/graph/workspaceLease.d.ts.map +1 -1
- package/dist/storage/graph/worktreeRegistry.d.ts +1 -1
- package/dist/storage/graph/worktreeRegistry.d.ts.map +1 -1
- package/dist/storage/httpStorageProvider.d.ts +2 -2
- package/dist/storage/index/bunSqlite.d.ts +1 -0
- package/dist/storage/index/bunSqlite.d.ts.map +1 -1
- package/dist/storage/index/memoryConsolidate.d.ts +2 -0
- package/dist/storage/index/memoryConsolidate.d.ts.map +1 -1
- package/dist/storage/index/memoryEmbeddings.d.ts +51 -0
- package/dist/storage/index/memoryEmbeddings.d.ts.map +1 -0
- package/dist/storage/index/memoryIndex.d.ts +37 -5
- package/dist/storage/index/memoryIndex.d.ts.map +1 -1
- package/dist/storage/index/memoryRecall.d.ts +1 -1
- package/dist/storage/index/memoryRecall.d.ts.map +1 -1
- package/dist/storage/index/memoryRuntime.d.ts +2 -0
- package/dist/storage/index/memoryRuntime.d.ts.map +1 -1
- package/dist/storage/index/sqliteIndex.d.ts +18 -1
- package/dist/storage/index/sqliteIndex.d.ts.map +1 -1
- package/dist/storage/path.d.ts.map +1 -1
- package/dist/telemetry/aggregate.d.ts +12 -12
- package/dist/telemetry/aggregate.d.ts.map +1 -1
- package/dist/telemetry/cost.d.ts.map +1 -1
- package/dist/telemetry/decisions.d.ts +11 -11
- package/dist/telemetry/decisions.d.ts.map +1 -1
- package/dist/telemetry/diagnostics.d.ts +10 -0
- package/dist/telemetry/diagnostics.d.ts.map +1 -0
- package/dist/telemetry/eventLog.d.ts +44 -26
- package/dist/telemetry/eventLog.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +121 -36
- package/dist/telemetry/events.d.ts.map +1 -1
- package/dist/telemetry/fanout.d.ts +18 -0
- package/dist/telemetry/fanout.d.ts.map +1 -0
- package/dist/telemetry/graphProjection.d.ts +12 -12
- package/dist/telemetry/graphProjection.d.ts.map +1 -1
- package/dist/telemetry/graphRuntimeHealth.d.ts +26 -26
- package/dist/telemetry/graphRuntimeHealth.d.ts.map +1 -1
- package/dist/telemetry/graphView.d.ts +20 -20
- package/dist/telemetry/graphView.d.ts.map +1 -1
- package/dist/telemetry/otel.d.ts +86 -0
- package/dist/telemetry/otel.d.ts.map +1 -0
- package/dist/telemetry/otelConfig.d.ts +128 -0
- package/dist/telemetry/otelConfig.d.ts.map +1 -0
- package/dist/telemetry/otelExporter.d.ts +7 -0
- package/dist/telemetry/otelExporter.d.ts.map +1 -0
- package/dist/telemetry/read.d.ts +18 -4
- package/dist/telemetry/read.d.ts.map +1 -1
- package/dist/telemetry/types.d.ts +3 -2
- package/dist/telemetry/types.d.ts.map +1 -1
- package/dist/web/configApi.d.ts +154 -0
- package/dist/web/configApi.d.ts.map +1 -0
- package/dist/web/configRoute.d.ts +57 -0
- package/dist/web/configRoute.d.ts.map +1 -0
- package/dist/web/console.d.ts +8 -0
- package/dist/web/console.d.ts.map +1 -1
- package/dist/web/paths.d.ts +4 -3
- package/dist/web/paths.d.ts.map +1 -1
- package/dist/web/server.d.ts +30 -1
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/start.d.ts +15 -0
- package/dist/web/start.d.ts.map +1 -1
- package/dist/web/storageRoute.d.ts +2 -2
- package/package.json +13 -7
- package/dist/cli/tunnel.d.ts +0 -89
- package/dist/cli/tunnel.d.ts.map +0 -1
- package/dist/commands/orchestratorAgent.d.ts +0 -30
- package/dist/commands/orchestratorAgent.d.ts.map +0 -1
- package/dist/commands/slashCommand.d.ts +0 -39
- package/dist/commands/slashCommand.d.ts.map +0 -1
- package/dist/orchestrator/ledger.d.ts +0 -28
- package/dist/orchestrator/ledger.d.ts.map +0 -1
- package/dist/storage/graph/importLegacy.d.ts +0 -62
- package/dist/storage/graph/importLegacy.d.ts.map +0 -1
- package/dist/storage/graph/migration.d.ts +0 -91
- package/dist/storage/graph/migration.d.ts.map +0 -1
- package/dist/storage/graph/projections.d.ts +0 -31
- package/dist/storage/graph/projections.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -19,8 +19,12 @@
|
|
|
19
19
|
- [Installation](#installation)
|
|
20
20
|
- [Quickstart: `openteam setup`](#quickstart-openteam-setup)
|
|
21
21
|
- [The `openteam` agent](#the-openteam-agent)
|
|
22
|
-
- [
|
|
22
|
+
- [Try it on another machine](#try-it-on-another-machine)
|
|
23
|
+
- [Updating openteam](#updating-openteam)
|
|
23
24
|
- [Configuration](#configuration)
|
|
25
|
+
- [Usage](#usage)
|
|
26
|
+
- [Runtime commands](#runtime-commands)
|
|
27
|
+
- [Safe publishing](#safe-publishing)
|
|
24
28
|
- [Privacy](#privacy)
|
|
25
29
|
- [Quality](#quality)
|
|
26
30
|
- [Compatibility](#compatibility)
|
|
@@ -38,7 +42,7 @@ The router keeps a privacy guarantee: with `privacyMode: "forceLocalOnSensitive"
|
|
|
38
42
|
## Features
|
|
39
43
|
|
|
40
44
|
- Per-turn routing from the `chat.message` hook, mutating `output.message.model` before opencode persists the message.
|
|
41
|
-
- Registration of OpenAI-compatible local runtimes: **Ollama**, **LM Studio** and **Foundry Local**.
|
|
45
|
+
- Registration of OpenAI-compatible local runtimes: **Ollama**, **LM Studio**, **Lemonade Server** and **Foundry Local**.
|
|
42
46
|
- Local JSON classifier with a deterministic heuristic fallback.
|
|
43
47
|
- Capability profiles from [Models.dev](https://models.dev), with cache and a curated fallback when the catalog is unavailable.
|
|
44
48
|
- **Cheapest-capable** frontier selection by blended cost `0.75 * inputUSD + 0.25 * outputUSD`.
|
|
@@ -46,23 +50,26 @@ The router keeps a privacy guarantee: with `privacyMode: "forceLocalOnSensitive"
|
|
|
46
50
|
- Hash-only `CostRecord` JSONL telemetry: stores `promptHash`, cost/decision metrics — **never raw prompts**.
|
|
47
51
|
- Multi-agent orchestration with `runRoleTask` / `runRoleTasks`, SDK child sessions and an explicit model in `client.session.prompt({ body: { model } })`.
|
|
48
52
|
- Local availability refresh at startup and on `session.created` / `session.idle` events.
|
|
49
|
-
- A local web **Console** aggregating every opencode session (cost, tokens, tool calls, routing, decisions) — redacted, loopback-only.
|
|
53
|
+
- A local web **Console** aggregating every opencode session (cost, tokens, tool calls, routing, decisions) — redacted, loopback-only.
|
|
50
54
|
- A read-only **MCP server** exposing aggregated team memory, plus opt-in semantic recall.
|
|
51
55
|
|
|
52
56
|
## Requirements
|
|
53
57
|
|
|
54
|
-
- opencode compatible with `@opencode-ai/plugin` `1.18.
|
|
58
|
+
- opencode compatible with `@opencode-ai/plugin` `1.18.19`.
|
|
55
59
|
- [Bun](https://bun.sh) `1.3.14` for reproducible installs, development, and tests.
|
|
56
60
|
- Node.js `^22.22.2 || ^24.15.0 || >=26.0.0` for the published CLI/plugin.
|
|
57
61
|
- Optional local runtimes:
|
|
58
62
|
- Ollama at `http://localhost:11434/v1`.
|
|
59
63
|
- LM Studio at `http://localhost:1234/v1`.
|
|
64
|
+
- Lemonade Server at `http://localhost:8000/api/v1`.
|
|
60
65
|
- Foundry Local with a dynamic port discovered via CLI on Windows.
|
|
61
66
|
|
|
62
|
-
> Local runtimes are **optional**. You can run openteam **frontier-only**, or point it at an Ollama / LM Studio running on **another machine on your LAN**.
|
|
67
|
+
> Local runtimes are **optional**. You can run openteam **frontier-only**, or point it at an Ollama / LM Studio / Lemonade Server running on **another machine on your LAN**.
|
|
63
68
|
|
|
64
69
|
## Installation
|
|
65
70
|
|
|
71
|
+
### Option A: npm package
|
|
72
|
+
|
|
66
73
|
The package is published as [`@jmanuelcorral/openteam`](https://www.npmjs.com/package/@jmanuelcorral/openteam). These are the supported installation paths:
|
|
67
74
|
|
|
68
75
|
| Need | Supported method |
|
|
@@ -73,6 +80,8 @@ The package is published as [`@jmanuelcorral/openteam`](https://www.npmjs.com/pa
|
|
|
73
80
|
|
|
74
81
|
Global installation with npm is **not supported**. Bun is the only supported package installer. Node.js runs the published CLI/plugin within the declared engine range; npm is limited to maintainer-only `pack`, Trusted Publishing, and `link:local` operations.
|
|
75
82
|
|
|
83
|
+
> **GitHub Packages route:** releases are published to both npmjs and private GitHub Packages. See [docs/guide/install-github-packages.md](docs/guide/install-github-packages.md) for the authenticated GitHub Packages install procedure, PATH setup on zsh, and Lemonade provider verification.
|
|
84
|
+
|
|
76
85
|
For direct opencode loading, reference the package name:
|
|
77
86
|
|
|
78
87
|
```jsonc
|
|
@@ -112,7 +121,7 @@ For direct opencode loading, reference the package name:
|
|
|
112
121
|
"hardStopOnBudgetExhaustion": false
|
|
113
122
|
},
|
|
114
123
|
"privacyMode": "forceLocalOnSensitive",
|
|
115
|
-
"telemetry": { "enabled": true, "path": ".opencode/openteam-telemetry.jsonl" }
|
|
124
|
+
"telemetry": { "enabled": true, "path": ".opencode/openteam-local/telemetry.jsonl" }
|
|
116
125
|
}
|
|
117
126
|
]
|
|
118
127
|
]
|
|
@@ -121,12 +130,39 @@ For direct opencode loading, reference the package name:
|
|
|
121
130
|
|
|
122
131
|
The fastest way to get a repository ready is the interactive `openteam setup` command (below), which generates this configuration for you.
|
|
123
132
|
|
|
133
|
+
### Option B: development path
|
|
134
|
+
|
|
135
|
+
During development you can load a local plugin from `.opencode/plugins/openteam.ts`:
|
|
136
|
+
|
|
137
|
+
```jsonc
|
|
138
|
+
{
|
|
139
|
+
"$schema": "https://opencode.ai/config.json",
|
|
140
|
+
"plugin": [
|
|
141
|
+
[
|
|
142
|
+
"./.opencode/plugins/openteam.ts",
|
|
143
|
+
{
|
|
144
|
+
"router": {
|
|
145
|
+
"mode": "balanced",
|
|
146
|
+
"localDefault": {
|
|
147
|
+
"providerID": "ollama",
|
|
148
|
+
"modelID": "qwen3:8b"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"telemetry": {
|
|
152
|
+
"path": ".opencode/openteam-local/telemetry.jsonl"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
124
160
|
## Quickstart: `openteam setup`
|
|
125
161
|
|
|
126
|
-
`openteam setup` detects the installed local runtimes (Ollama, LM Studio, Foundry Local — all optional), lets you pick the local models and the **frontier baseline** model (sorted cheapest-capable first), and writes three files:
|
|
162
|
+
`openteam setup` detects the installed local runtimes (Ollama, LM Studio, Lemonade Server, Foundry Local — all optional), lets you pick the local models and the **frontier baseline** model (sorted cheapest-capable first), and writes three files:
|
|
127
163
|
|
|
128
164
|
- `opencode.json` at the repo root: declares the `@jmanuelcorral/openteam` plugin, the OpenAI-compatible local `provider`s, the frontier `model` and the local `small_model`.
|
|
129
|
-
- `.opencode/openteam.json`: openteam's validated runtime configuration (baseline, routing, local runtimes and privacy).
|
|
165
|
+
- `.opencode/openteam.json`: openteam's validated runtime configuration (baseline, routing, local runtimes, orchestrator roles and privacy).
|
|
130
166
|
- `.opencode/agent/openteam.md`: the **primary `openteam` agent**, visible in the Tab switcher.
|
|
131
167
|
|
|
132
168
|
```powershell
|
|
@@ -152,16 +188,196 @@ After `setup`, authenticate the frontier provider (`opencode auth login`), make
|
|
|
152
188
|
|
|
153
189
|
`openteam setup` generates a single **primary agent** named `openteam`. Press **Tab** in opencode to select it: you explicitly know you are in openteam mode while the plugin keeps optimizing the model underneath.
|
|
154
190
|
|
|
155
|
-
That orchestrator ships **no pre-created subagents**. On **every request** its first action is to check whether a team already exists (`.opencode/openteam
|
|
191
|
+
That orchestrator ships **no pre-created subagents**. On **every request** its first action is to check whether a team already exists (`.opencode/openteam/roster.md` + subagents in `.opencode/agent/`). If it does, it hands work to the right specialists; if not, it understands the tasks your request implies, designs the minimal team and **creates it on demand** (writing `.opencode/agent/<name>.md` with `mode: subagent`), reusing existing agents before creating new ones. Mechanical/bulk roles are left to route to local models; only architecture, security or ambiguous debugging escalate to frontier. (This on-demand, themed-team model is inspired by [Squad](https://bradygaster.github.io/squad/) — see [Acknowledgements](#acknowledgements).)
|
|
156
192
|
|
|
157
|
-
The team has a **themed identity**: the orchestrator picks (or asks for) a **universe** and names each agent after a character, recording the cast in `.opencode/openteam
|
|
193
|
+
The team has a **themed identity**: the orchestrator picks (or asks for) a **universe** and names each agent after a character, recording the cast in `.opencode/openteam/roster.md` so names **persist** across sessions. Besides project-specific roles, it plans three **standard roles** created on demand:
|
|
158
194
|
|
|
159
|
-
- **scribe** — silent memory: logs decisions and learnings to `.opencode/openteam
|
|
195
|
+
- **scribe** — silent memory: logs decisions and learnings to `.opencode/openteam/decisions.md` without touching code (local model).
|
|
160
196
|
- **ralph** — automation and triage: monitors the backlog, prioritizes, coordinates execution and **escalates to the human** on blockers or approvals.
|
|
161
197
|
- **guardian** — security and privacy: **detects and masks sensitive data** (PII, secrets, API keys, tokens) before it reaches frontier; always runs locally and respects `forceLocalOnSensitive`.
|
|
162
198
|
|
|
163
199
|
Before delegating, the orchestrator **plans dependencies and parallelizes**: it splits the request into tasks and, since opencode runs all `task` calls emitted in a single turn in parallel (Vercel AI SDK), it launches independent tasks together and sequences only the dependent ones into waves. Work that collides on the same files is separated into distinct waves to avoid conflicts. In the **todo list** each entry shows the responsible agent via a name prefix, e.g. `[@Basher] Implement the router`.
|
|
164
200
|
|
|
201
|
+
## Try it on another machine
|
|
202
|
+
|
|
203
|
+
To install and try openteam on another machine that already has [opencode](https://opencode.ai) and [Bun](https://bun.sh):
|
|
204
|
+
|
|
205
|
+
1. **Run or install the CLI.** Pick one of the supported paths:
|
|
206
|
+
|
|
207
|
+
```powershell
|
|
208
|
+
# Global option (leaves the `openteam` command on the PATH)
|
|
209
|
+
bun add --global @jmanuelcorral/openteam@latest
|
|
210
|
+
|
|
211
|
+
# One-off option (no global install)
|
|
212
|
+
bunx --package @jmanuelcorral/openteam@latest openteam setup
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
2. **Initialize the repository** you will work in. It generates `opencode.json`, `.opencode/openteam.json` and `.opencode/agent/openteam.md`:
|
|
216
|
+
|
|
217
|
+
```powershell
|
|
218
|
+
cd C:\path\to\your\repo
|
|
219
|
+
openteam setup # global
|
|
220
|
+
# The one-off option already ran setup in the previous step.
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
The wizard detects Ollama / LM Studio / Foundry Local, lets you pick the local models (local or on another machine on the LAN) or **none** to run frontier-only, and the frontier baseline, then writes the configuration.
|
|
224
|
+
|
|
225
|
+
3. **Authenticate the frontier provider** you chose:
|
|
226
|
+
|
|
227
|
+
```powershell
|
|
228
|
+
opencode auth login
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
4. **Start your local runtime** if you enabled one and it was not already up (e.g. `ollama serve`, or open LM Studio / Foundry Local). If you pointed at a runtime on **another machine on the LAN**, make sure it is reachable from this machine (host exposed and port open); for Ollama this usually means starting it with `OLLAMA_HOST=0.0.0.0 ollama serve` on the remote machine. If you configured **frontier-only**, skip this step.
|
|
232
|
+
|
|
233
|
+
5. **Open opencode in the repo**, press **Tab** and pick the `openteam` agent. Give it the first prompt: it will create the subagent team on demand and route local-first automatically.
|
|
234
|
+
|
|
235
|
+
Check the status with `openteam doctor` (runtimes + config) and the savings with `openteam report`.
|
|
236
|
+
|
|
237
|
+
## Updating openteam
|
|
238
|
+
|
|
239
|
+
openteam is published to npm when a GitHub Release is published. To pull the latest version:
|
|
240
|
+
|
|
241
|
+
```powershell
|
|
242
|
+
# Global install
|
|
243
|
+
bun add --global @jmanuelcorral/openteam@latest
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Check versions:
|
|
247
|
+
|
|
248
|
+
```powershell
|
|
249
|
+
bun pm ls --global # installed global packages
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
The most recent published version is shown at
|
|
253
|
+
<https://www.npmjs.com/package/@jmanuelcorral/openteam>.
|
|
254
|
+
|
|
255
|
+
Notes when updating:
|
|
256
|
+
|
|
257
|
+
- **You do not need to re-run `openteam setup`** to update the plugin: opencode resolves the `@jmanuelcorral/openteam` package declared in `opencode.json` to the installed version. Restart opencode so it reloads the plugin.
|
|
258
|
+
- Re-run `openteam setup` **only** if you want to regenerate the configuration (change runtimes, models or baseline). It asks for confirmation before overwriting `opencode.json`, `.opencode/openteam.json` or `.opencode/agent/openteam.md`; it **does not touch the subagents** the orchestrator created on demand.
|
|
259
|
+
- One-off adjustments without a re-init: `openteam baseline set <provider/model>` or `openteam baseline auto`.
|
|
260
|
+
|
|
261
|
+
## Configuration
|
|
262
|
+
|
|
263
|
+
The canonical runtime configuration lives in `.opencode/openteam.json`; this repo ships `.opencode/openteam.example.json` as a complete example. The Zod-validated shape is in `src/config/schema.ts`. `telemetry` is a plugin option read by `src/index.ts`, not part of the persisted `OpenTeamConfig`.
|
|
264
|
+
|
|
265
|
+
Config files are strict: unknown keys fail closed in both the CLI and plugin
|
|
266
|
+
instead of being silently ignored. Errors name each rejected path (for example
|
|
267
|
+
`router.trivialPromptMxChars`) and include a nearest-key hint when available.
|
|
268
|
+
This strict validation applies to the config file on both paths; programmatic
|
|
269
|
+
plugin options are a separate surface and are not yet strictly validated (#102).
|
|
270
|
+
Existing configs without `configVersion` remain valid because openteam migrates
|
|
271
|
+
them to the current version before validation.
|
|
272
|
+
|
|
273
|
+
### opencode config file resolution
|
|
274
|
+
|
|
275
|
+
openteam reads the opencode project config from **two candidate paths** and
|
|
276
|
+
merges them — the same way opencode itself handles multiple config files:
|
|
277
|
+
|
|
278
|
+
| Priority | Path |
|
|
279
|
+
| --- | --- |
|
|
280
|
+
| Higher (overrides) | `.opencode/opencode.json` |
|
|
281
|
+
| Base | `opencode.json` (project root) |
|
|
282
|
+
|
|
283
|
+
Non-conflicting keys from both files survive. When the same key appears in
|
|
284
|
+
both, `.opencode/opencode.json` wins. This is verified against opencode 1.18.18:
|
|
285
|
+
a provider declared in either location appears in `opencode models --pure`.
|
|
286
|
+
|
|
287
|
+
**JSONC comments** (`//` line comments and `/* … */` block comments) are
|
|
288
|
+
tolerated in both files — opencode itself accepts them, and openteam strips them
|
|
289
|
+
before parsing, so a commented config file works identically to a plain JSON one.
|
|
290
|
+
|
|
291
|
+
**Malformed config** — if one of the candidate files is present but cannot be
|
|
292
|
+
parsed (invalid JSON, schema violation), `doctor` and `agents` emit a warning
|
|
293
|
+
that names the offending file and continue rather than aborting. A bad config
|
|
294
|
+
file is not treated as a fatal error.
|
|
295
|
+
|
|
296
|
+
**"Provider not configured"** messages name the two paths that were searched,
|
|
297
|
+
so you immediately know whether the file was not found or the provider is
|
|
298
|
+
genuinely absent from both locations.
|
|
299
|
+
|
|
300
|
+
**`openteam setup` write location** — when setting up a fresh project (no
|
|
301
|
+
existing opencode config file), `setup` now writes to `.opencode/opencode.json`.
|
|
302
|
+
When an existing file is detected it is updated in place — only one file is
|
|
303
|
+
written, never both. Upgrading users: a re-run of `setup` will land in
|
|
304
|
+
`.opencode/` if no root `opencode.json` is present.
|
|
305
|
+
|
|
306
|
+
**No upward traversal** — openteam reads only the two cwd-relative candidates
|
|
307
|
+
above. It does not walk up to the git root. Commands are designed to be run from
|
|
308
|
+
the project root; if you run them from a subdirectory you will see "provider not
|
|
309
|
+
configured" and should `cd` to the project root first.
|
|
310
|
+
|
|
311
|
+
| Key | Type | Default | Description |
|
|
312
|
+
| --- | --- | --- | --- |
|
|
313
|
+
| `baseline.mode` | `"auto" \| "pinned"` | `"auto"` | In `auto`, uses cheapest-capable frontier profiles when passed to the router; in `pinned`, uses `baseline.pinnedModel` if set. |
|
|
314
|
+
| `baseline.pinnedModel` | `ModelRef \| null` | `null` | Explicitly pinned frontier model. `ModelRef` is `{ "providerID": string, "modelID": string }`. |
|
|
315
|
+
| `baseline.hardDefault` | `ModelRef` | `{ "providerID": "anthropic", "modelID": "claude-sonnet-4-5" }` | Frontier fallback when there are no cheapest-capable profiles or a valid pin. |
|
|
316
|
+
| `router.mode` | `"economy" \| "balanced" \| "quality"` | `"balanced"` | Validated routing mode reserved for policy. |
|
|
317
|
+
| `router.localDefault` | `ModelRef \| null` | `null` | Primary local model. Not set by default — no local model is routed until you configure one via `openteam setup` or by hand. |
|
|
318
|
+
| `router.trivialPromptMaxChars` | positive integer | `280` | Code-free prompts up to this size prefer local. |
|
|
319
|
+
| `router.frontierPromptMinChars` | positive integer | `2000` | Prompts from this size are frontier candidates if no guards apply. |
|
|
320
|
+
| `local.runtimes` | `LocalRuntime[]` | `[]` | Local runtimes to probe. Empty by default — no runtime is configured until you run `openteam setup` or add an entry by hand. |
|
|
321
|
+
| `local.runtimes[].id` | `"ollama" \| "lmstudio" \| "foundry-local" \| "lemonade"` | required | Local runtime. |
|
|
322
|
+
| `local.runtimes[].enabled` | `boolean` | `true` | Enable or disable that runtime. |
|
|
323
|
+
| `local.runtimes[].baseURL` | optional URL | per runtime/config | OpenAI-compatible endpoint (`/v1` for Ollama/LM Studio, `/api/v1` for Lemonade); Foundry Local may omit it when using discovery. |
|
|
324
|
+
| `local.runtimes[].discovery` | `"cli" \| "sdk" \| "manual"` optional | none per item | Foundry Local discovery; the registry uses CLI when configured and not `manual`. |
|
|
325
|
+
| `local.runtimes[].defaultModel` | `ModelRef` | required | Default model for that runtime. |
|
|
326
|
+
| `budgets.sessionUSD` | positive number, optional | unlimited | Frontier budget per session. |
|
|
327
|
+
| `budgets.monthlyUSD` | positive number, optional | unlimited | Monthly frontier budget. |
|
|
328
|
+
| `budgets.frontierTokensPerSession` | positive integer, optional | unlimited | Frontier token limit per session. |
|
|
329
|
+
| `budgets.hardStopOnBudgetExhaustion` | `boolean` | `false` | If `true`, an exhausted budget returns `blockFrontier`; if `false`, it forces local. |
|
|
330
|
+
| `privacyMode` | `"forceLocalOnSensitive" \| "consentBeforeFrontier" \| "off"` | `"forceLocalOnSensitive"` | Privacy policy for sensitive tasks. |
|
|
331
|
+
| `orchestrator.roles` | `Record<string, AgentRoleProfile>` | `{}` | Custom or overridden role profiles keyed by role ID. Config entries are validated with the same strict role profile schema as built-in roles and take precedence over `TEAM_ROLES`; if an entry omits `roleID`, the map key is used. Unknown roles not declared here still use the neutral fallback and warn once. |
|
|
332
|
+
| `orchestrator.roles.<role>.opencodeAgent` | non-empty string, optional | role ID | opencode agent name to dispatch for that role. |
|
|
333
|
+
| `orchestrator.roles.<role>.defaultTier` | `"trivial" \| "simple" \| "moderate" \| "hard"` | required | Baseline complexity tier used before heuristic and permission elevation. |
|
|
334
|
+
| `orchestrator.roles.<role>.minReasoningTier` | `1`–`5` | required | Minimum reasoning capability for frontier candidates. |
|
|
335
|
+
| `orchestrator.roles.<role>.minCodeQualityTier` | `1`–`5` | required | Minimum code-quality capability for frontier candidates. |
|
|
336
|
+
| `orchestrator.roles.<role>.needsToolCallingByDefault` | `boolean` | required | Whether this role requires tool-calling capability unless the task says otherwise. |
|
|
337
|
+
| `orchestrator.roles.<role>.preferredFrontierModels` | `Array<ModelRef \| "auto">` | required | Preferred frontier models; use `[]` for a local-first role with no explicit frontier preference. |
|
|
338
|
+
| `orchestrator.roles.<role>.localFirst` | `boolean` | required | Whether the role should keep the normal local-first posture instead of forcing hard frontier routing. |
|
|
339
|
+
| `telemetry.enabled` | `boolean` (plugin option) | `true` | Enable/disable JSONL writing. |
|
|
340
|
+
| `telemetry.path` | `string` (plugin option) | `.opencode/openteam-local/telemetry.jsonl` | Path of the `CostRecord` JSONL log. |
|
|
341
|
+
|
|
342
|
+
Example custom privacy/security auditor:
|
|
343
|
+
|
|
344
|
+
```jsonc
|
|
345
|
+
{
|
|
346
|
+
"orchestrator": {
|
|
347
|
+
"roles": {
|
|
348
|
+
"galadriel": {
|
|
349
|
+
"opencodeAgent": "galadriel",
|
|
350
|
+
"defaultTier": "moderate",
|
|
351
|
+
"minReasoningTier": 3,
|
|
352
|
+
"minCodeQualityTier": 3,
|
|
353
|
+
"needsToolCallingByDefault": true,
|
|
354
|
+
"preferredFrontierModels": [],
|
|
355
|
+
"localFirst": true
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## Usage
|
|
363
|
+
|
|
364
|
+
On each turn, openteam derives signals from the prompt (`promptChars`, `hasCode`, `privacySensitive`, `requiresTools` and a model override if present), runs `chooseModel` and assigns `output.message.model`.
|
|
365
|
+
|
|
366
|
+
Multi-agent orchestration uses static roles and opencode subsessions:
|
|
367
|
+
|
|
368
|
+
| Role | opencode agent | Base tier | Policy |
|
|
369
|
+
| --- | --- | --- | --- |
|
|
370
|
+
| `rusty` | `architect` | `hard` | Architecture and high-risk decisions; frontier auto. |
|
|
371
|
+
| `livingston` | `integration` | `moderate` | TS/opencode integration; tool calling by default. |
|
|
372
|
+
| `yen` | `local-runtime` | `moderate` | Local runtimes; local-first with frontier fallback. |
|
|
373
|
+
| `basher` | `routing-cost` | `moderate` | Router, cost and budget; local-first. |
|
|
374
|
+
| `scribe` | `scribe` | `trivial` | Documentation and summaries; local-first. |
|
|
375
|
+
| `linus` | `tester` | `simple` | Tests and contracts; local-first with tools. |
|
|
376
|
+
|
|
377
|
+
`runRoleTask` runs a single subsession; `runRoleTasks` runs several with a `batchID`. Roles with `destructive` or `multiFileEdit` elevate the tier before choosing a model.
|
|
378
|
+
|
|
379
|
+
To see savings and decisions, read the telemetry JSONL. Key fields: `promptHash`, `promptChars`, `tier`, `routeKind`, `selected`, `rationale`, `estimatedCostUSD`, `baselineCostUSD`, `estimatedSavingsUSD`, `budgetAction`, `tokensIn` and `tokensOut`.
|
|
380
|
+
|
|
165
381
|
## Runtime commands
|
|
166
382
|
|
|
167
383
|
openteam exposes commands to inspect and change routing without editing JSON by hand, over three equivalent surfaces.
|
|
@@ -205,16 +421,18 @@ openteam baseline set openai/gpt-5-mini
|
|
|
205
421
|
openteam doctor --config .opencode/openteam.json
|
|
206
422
|
openteam agents
|
|
207
423
|
openteam console
|
|
208
|
-
openteam report --telemetry .opencode/openteam-telemetry.jsonl
|
|
424
|
+
openteam report --telemetry .opencode/openteam-local/telemetry.jsonl
|
|
209
425
|
openteam yolo status
|
|
210
426
|
openteam local status
|
|
427
|
+
openteam clear-cache
|
|
428
|
+
openteam clear-cache --delete
|
|
211
429
|
```
|
|
212
430
|
|
|
213
|
-
Flags: `--config <path>` and `--telemetry <path>` override the default paths; `--opencode <path>` points the `yolo` command at a specific `opencode.json`.
|
|
431
|
+
Flags: `--config <path>` and `--telemetry <path>` override the default paths; `--opencode <path>` points the `yolo` command at a specific `opencode.json`. An explicit `--config` may be relative or absolute and must be readable; only the default `.opencode/openteam.json` lookup falls back to built-in defaults when absent.
|
|
214
432
|
|
|
215
433
|
### See each agent's LLM: `openteam agents`
|
|
216
434
|
|
|
217
|
-
Lists the agents in `.opencode/agent/`, showing **which LLM each one uses**: whether it is **local** (Ollama/LM Studio/Foundry, no token cost) or **frontier** (consumes your subscription), and the provider. Agents without their own `model` **inherit** the `opencode.json` default (which openteam routes local-first per message).
|
|
435
|
+
Lists the agents in `.opencode/agent/`, showing **which LLM each one uses**: whether it is **local** (Ollama/LM Studio/Lemonade/Foundry, no token cost) or **frontier** (consumes your subscription), and the provider. Agents without their own `model` **inherit** the `opencode.json` default (which openteam routes local-first per message).
|
|
218
436
|
|
|
219
437
|
### YOLO mode (auto-approve permissions)
|
|
220
438
|
|
|
@@ -242,44 +460,82 @@ openteam local on # back to local-first routing
|
|
|
242
460
|
|
|
243
461
|
This persists the `router.frontierOnly` flag in `.opencode/openteam.json`. With `frontierOnly` active the router picks the **cheapest-capable frontier**, but still **respects privacy, budgets and explicit per-task overrides**. Sensitive prompts with `forceLocalOnSensitive` don't leave for frontier; `local off` degrades that policy to `consentBeforeFrontier` (local can't be forced without a runtime) and tells you about the change.
|
|
244
462
|
|
|
245
|
-
###
|
|
463
|
+
### Updating the plugin and clearing the cache: `openteam clear-cache`
|
|
464
|
+
|
|
465
|
+
opencode caches each plugin installation and never refreshes an existing entry —
|
|
466
|
+
there is no version comparison, TTL, or upstream eviction command. Publishing a
|
|
467
|
+
new version of the plugin has **no effect** on a machine that already has a
|
|
468
|
+
cache entry. Deleting the cache directory is the only eviction path.
|
|
469
|
+
|
|
470
|
+
```powershell
|
|
471
|
+
openteam clear-cache # report only — prints the table, deletes nothing
|
|
472
|
+
openteam clear-cache --delete # delete all matched cache entries
|
|
473
|
+
openteam clear-cache --cache-root <path> # override the auto-resolved cache root
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Slash command alias inside opencode: `/openteam-clear-cache`
|
|
477
|
+
|
|
478
|
+
The default (no flags) prints a table with columns `spec dir`, `spec-pinned`,
|
|
479
|
+
`installed` and `mtime` for every `@jmanuelcorral/openteam*` cache entry found.
|
|
480
|
+
Only entries in that scope are ever touched. Symlinks and Windows reparse points
|
|
481
|
+
are listed as `[SKIP — reparse point]` and never deleted. On Windows, close
|
|
482
|
+
opencode before running `--delete` to avoid `[LOCKED]` errors.
|
|
483
|
+
|
|
484
|
+
See [docs/guide/update-plugin.md](docs/guide/update-plugin.md) for the full
|
|
485
|
+
explanation of the freeze mechanism and a step-by-step update procedure.
|
|
486
|
+
|
|
487
|
+
### Unattended mode: `openteam loop` (Ralph pattern) 🎯 *(`--dry-run` verified; live dispatch design-stage)*
|
|
488
|
+
|
|
489
|
+
A second mode of operation: an **external loop** that invokes `opencode run` against a persistent backlog until it is drained, with fresh context per iteration and safety caps (budget, max iterations, no-progress). It complements the interactive orchestrator, it does not replace it. As a safety property, `openteam loop` **refuses to run unattended without explicit confirmation** — running bare it prints *"Refusing to run unattended without confirmation. Re-run with --dry-run to preview the plan, or --yes to run."* and exits non-zero; `openteam loop --dry-run` previews the plan (backlog, iteration and budget caps, sleep, fresh-context and stop conditions) without dispatching anything. The `--dry-run` preview and the bare-invocation refusal are **verified against the shipped binary** (`node dist/cli.js loop --dry-run` exits 0 and prints the plan; running bare exits non-zero); the actual unattended dispatch (`--yes`) is **not yet verified end-to-end and remains design-stage**. See the design and examples in **[docs/loop.md](docs/loop.md)**.
|
|
246
490
|
|
|
247
|
-
|
|
248
|
-
> early, experimental feature that may still be **reworked or rebuilt**, with
|
|
249
|
-
> breaking changes to its UI, endpoints, config (`console` block) and event
|
|
250
|
-
> format. The routing, budgets, telemetry and memory core are stable; the web
|
|
251
|
-
> surface is not yet. Use it for local observation, not as a stable API.
|
|
491
|
+
### Multi-session web Console: `openteam console`
|
|
252
492
|
|
|
253
493
|
openteam exposes a **local web Console** you launch from the CLI with `openteam console`. It aggregates **all** opencode sessions at once (one tab per session, plus "All"), because each plugin **writes redacted events** to per-session JSONL logs that the Console watches (`fs.watch`) and aggregates.
|
|
254
494
|
|
|
255
495
|
It shows live: **real cost and tokens per message** (input/output/reasoning/cache), **tool calls with duration** and ok/fail, recent routing (cost/savings and chosen model — **prompt hashes only, never text**), agent **decisions** (scribe) and **meetings** (multi-agent batches), loop backlog progress, the agent team and latest commits. It updates over **SSE** (with polling fallback).
|
|
256
496
|
|
|
497
|
+
Each session tab also includes a **"Session" view**: a console where you can **watch the live output** (SSE) and **send prompts** or **answer permissions** for that opencode session, authenticated with an **ephemeral token** per launch. Optionally, with the `terminal.pty` flag, a **"Terminal" view** opens a **real shell** in the workspace via opencode's PTY API (no `node-pty`).
|
|
498
|
+
|
|
257
499
|
```powershell
|
|
258
500
|
openteam console # print the URL and serve the multi-session Console
|
|
259
501
|
openteam console --open # also open the browser
|
|
260
502
|
openteam console --status # print the config only (don't launch the server)
|
|
261
503
|
```
|
|
262
504
|
|
|
263
|
-
|
|
505
|
+
See the [Console guide](docs/console.md) for the full reference.
|
|
264
506
|
|
|
265
|
-
|
|
507
|
+
Sessions are read from:
|
|
266
508
|
|
|
267
|
-
|
|
268
|
-
|
|
509
|
+
```text
|
|
510
|
+
.opencode/openteam-local/sessions/*.jsonl
|
|
511
|
+
```
|
|
269
512
|
|
|
270
|
-
|
|
513
|
+
You can tune host/port and the terminal in `.opencode/openteam.json` (`console`
|
|
514
|
+
block):
|
|
271
515
|
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
516
|
+
```json
|
|
517
|
+
{
|
|
518
|
+
"console": {
|
|
519
|
+
"host": "127.0.0.1",
|
|
520
|
+
"port": 4599,
|
|
521
|
+
"autoPortFallback": true,
|
|
522
|
+
"refreshMs": 2000,
|
|
523
|
+
"recentRoutes": 50,
|
|
524
|
+
"openBrowser": false,
|
|
525
|
+
"terminal": { "enabled": true, "pty": false }
|
|
526
|
+
}
|
|
527
|
+
}
|
|
276
528
|
```
|
|
277
529
|
|
|
278
|
-
|
|
530
|
+
**Live agent-graph view.** The Console can also render a live **agent graph** of a Graph run; it is **off by default** and turned on with `console.graphView.enabled: true` — see [Graph observability web](docs/guide/graph-observability-web.md) for setup and the full requirements.
|
|
531
|
+
|
|
532
|
+
> **Security**: the server listens **on loopback only** (`127.0.0.1`/`localhost`, Zod-validated) and **never exposes prompts** (only `promptHash`), tool-call args or message content — only counters, costs and redacted summaries. The "Session"/"Terminal" view requires the ephemeral token. If the port is busy and `autoPortFallback` is `true`, it tries the next free one. Remote access via `openteam tunnel` was **removed from the MVP** (2026-08-31) and will be redefined later; the Console has no built-in remote-exposure path.
|
|
533
|
+
|
|
534
|
+
**Interface stability.** The Console's web surface is **pre-1.0**: its UI, endpoints, `console` config block and event format may still change. The routing, budgets, telemetry and memory core are stable.
|
|
279
535
|
|
|
280
536
|
### Team memory over MCP (read-only): `openteam mcp`
|
|
281
537
|
|
|
282
|
-
`openteam mcp` starts a **read-only MCP server** (JSON-RPC 2.0 over stdio, no dependencies) that exposes the team memory aggregated from per-session events. It uses the same `StorageProvider` as the Console and **never** exposes raw prompts. Tools: `list_decisions` (filterable by `agent`/`tag`), `list_meetings`, `list_sessions` and `cost_summary
|
|
538
|
+
`openteam mcp` starts a **read-only MCP server** (JSON-RPC 2.0 over stdio, no dependencies) that exposes the team memory aggregated from per-session events. It uses the same `StorageProvider` as the Console and **never** exposes raw prompts. Tools: `list_decisions` (filterable by `agent`/`tag`), `list_meetings`, `list_sessions` and `cost_summary` (real cost/tokens + estimated savings vs the all-frontier baseline).
|
|
283
539
|
|
|
284
540
|
Register it in `opencode.json` like any local MCP server:
|
|
285
541
|
|
|
@@ -291,34 +547,134 @@ Register it in `opencode.json` like any local MCP server:
|
|
|
291
547
|
}
|
|
292
548
|
```
|
|
293
549
|
|
|
294
|
-
|
|
550
|
+
#### Semantic recall (opt-in): `recall_facts`, `recall_preferences`, `similar_tasks`
|
|
295
551
|
|
|
296
|
-
|
|
552
|
+
Beyond team memory, `openteam mcp` can expose **semantic recall** of the long-term knowledge memory (facts, preferences, similar tasks). It is **disabled by default**; enable it with the `memory.semantic` block in `.opencode/openteam.json`:
|
|
297
553
|
|
|
298
|
-
|
|
554
|
+
```json
|
|
555
|
+
{
|
|
556
|
+
"memory": {
|
|
557
|
+
"semantic": { "enabled": true }
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
```
|
|
299
561
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
562
|
+
When enabled, and if there is a local runtime with a `baseURL`, the server adds three tools: `recall_facts`, `recall_preferences` and `similar_tasks`. The query is embedded **locally** (never leaves for frontier) and records are **redacted at the source** (`storeContent=false` by default), so the tools never return raw prompts. If `bun:sqlite` is missing or the index cannot be opened, `openteam mcp` **degrades safely** and keeps exposing team memory only.
|
|
563
|
+
|
|
564
|
+
#### Consolidation / forgetting: `openteam memory consolidate`
|
|
565
|
+
|
|
566
|
+
Long-term memory **forgets** by decay: each record's confidence decays over time and, once it falls below the threshold, it is marked soft-invalidated (without deleting: the history is kept for "as-of" auditing). Run the forgetting pass with:
|
|
567
|
+
|
|
568
|
+
```powershell
|
|
569
|
+
openteam memory consolidate
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
It appends *tombstones* to the memory log and reports how many records were forgotten. It is idempotent and non-destructive.
|
|
573
|
+
|
|
574
|
+
#### Automatic push to context (opt-in)
|
|
575
|
+
|
|
576
|
+
With injection enabled, openteam **prepends** relevant memory to the prompt on each turn (`chat.message`), respecting a token budget:
|
|
577
|
+
|
|
578
|
+
```json
|
|
579
|
+
{
|
|
580
|
+
"memory": {
|
|
581
|
+
"semantic": {
|
|
582
|
+
"enabled": true,
|
|
583
|
+
"injection": { "enabled": true, "maxChars": 1200, "maxItems": 8 }
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
It is **disabled by default**. Injection happens **after** the model is chosen, so it does not alter routing or telemetry, and it **never breaks the turn** if recall fails. It only injects what is already in the records (redacted at the source if `storeContent=false`).
|
|
590
|
+
|
|
591
|
+
### Ollama
|
|
592
|
+
|
|
593
|
+
```powershell
|
|
594
|
+
ollama serve
|
|
595
|
+
ollama pull qwen3:8b
|
|
596
|
+
Invoke-RestMethod -Uri "http://localhost:11434/v1/models" -Method Get
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### LM Studio
|
|
600
|
+
|
|
601
|
+
1. Open LM Studio.
|
|
602
|
+
2. Load a compatible model.
|
|
603
|
+
3. Enable the local OpenAI-compatible server on port `1234`.
|
|
604
|
+
|
|
605
|
+
```powershell
|
|
606
|
+
Invoke-RestMethod -Uri "http://localhost:1234/v1/models" -Method Get
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### Lemonade Server
|
|
610
|
+
|
|
611
|
+
```powershell
|
|
612
|
+
Invoke-RestMethod -Uri "http://localhost:8000/api/v1/models" -Method Get
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
### Foundry Local
|
|
616
|
+
|
|
617
|
+
```powershell
|
|
618
|
+
foundry service status
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
openteam extracts the port from the CLI output and normalizes the endpoint to `http://localhost:<PORT>/v1`.
|
|
622
|
+
|
|
623
|
+
### Telemetry
|
|
624
|
+
|
|
625
|
+
openteam writes a hash-only `CostRecord` JSONL log (never raw prompts). Tail the most recent entries:
|
|
626
|
+
|
|
627
|
+
```powershell
|
|
628
|
+
Get-Content -Path ".opencode/openteam-local/telemetry.jsonl" -Tail 5
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### Local verification
|
|
632
|
+
|
|
633
|
+
```powershell
|
|
634
|
+
bun test
|
|
635
|
+
bun run typecheck
|
|
636
|
+
bun run lint
|
|
637
|
+
bun run format:check
|
|
638
|
+
bun run build
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
### Local development in dev mode (no registry)
|
|
642
|
+
|
|
643
|
+
To make the global `openteam` CLI and opencode use this repo's local build instead
|
|
644
|
+
of the published version (without going through any registry), the package is
|
|
645
|
+
linked with a global symlink:
|
|
646
|
+
|
|
647
|
+
```powershell
|
|
648
|
+
bun run link:local # = bun run build && npm link
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
`npm link` creates a global link (junction/symlink) to this repo, so after each
|
|
652
|
+
`bun run build` the global CLI reflects the local code.
|
|
653
|
+
|
|
654
|
+
A versioned `pre-push` hook (`.githooks/pre-push`) can run `bun run link:local`
|
|
655
|
+
before each `git push`, keeping the local install current. Installing
|
|
656
|
+
dependencies does **not** modify Git. Enable the hook explicitly, once per clone:
|
|
657
|
+
|
|
658
|
+
```powershell
|
|
659
|
+
bun run hooks:install
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
The hook warns if the build or the link fails, but it **does not block** the push.
|
|
663
|
+
|
|
664
|
+
## Safe publishing
|
|
665
|
+
|
|
666
|
+
The release workflow builds and verifies a single tarball with no write
|
|
667
|
+
permissions and no OIDC. Another job publishes exactly that artifact, after
|
|
668
|
+
validating its integrity, via npm Trusted Publishing; a final job with only
|
|
669
|
+
`contents: write` attaches it to the GitHub Release. There is no fallback to
|
|
670
|
+
persistent credentials, and normal CI needs no npm configuration.
|
|
671
|
+
|
|
672
|
+
Before the first real release, the owner must register an npm Trusted Publisher
|
|
673
|
+
for `@jmanuelcorral/openteam` with owner `jmanuelcorral`, repository `openteam`,
|
|
674
|
+
workflow `release.yml`, allowed action `npm publish` and no environment. Until
|
|
675
|
+
that one-time registration is complete, publishing fails closed. After the first
|
|
676
|
+
successful OIDC publish, enforce token-less 2FA, revoke the old automation token
|
|
677
|
+
and remove its inherited GitHub Actions secret.
|
|
322
678
|
|
|
323
679
|
## Privacy
|
|
324
680
|
|
|
@@ -340,13 +696,13 @@ Non-negotiable gates (see [docs/testing-and-quality.md](docs/testing-and-quality
|
|
|
340
696
|
|
|
341
697
|
## Compatibility
|
|
342
698
|
|
|
343
|
-
See [docs/compatibility.md](docs/compatibility.md). Verified summary as of `2026-08-
|
|
699
|
+
See [docs/compatibility.md](docs/compatibility.md). Verified summary as of `2026-08-24`:
|
|
344
700
|
|
|
345
701
|
| Surface | Version / contract |
|
|
346
702
|
| --- | --- |
|
|
347
|
-
| openteam | `0.
|
|
348
|
-
| `@opencode-ai/plugin` | `1.18.
|
|
349
|
-
| `@opencode-ai/sdk` | `1.18.
|
|
703
|
+
| openteam | `0.9.1`; current package version |
|
|
704
|
+
| `@opencode-ai/plugin` | `1.18.19` |
|
|
705
|
+
| `@opencode-ai/sdk` | `1.18.19` |
|
|
350
706
|
| Routing hook | `chat.message`; not `chat.params` for model changes |
|
|
351
707
|
| Child sessions | `client.session.create` + `client.session.prompt({ body: { model } })` |
|
|
352
708
|
|
|
@@ -359,12 +715,12 @@ Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for th
|
|
|
359
715
|
| Phase | Status | Deliverables |
|
|
360
716
|
| --- | --- | --- |
|
|
361
717
|
| 0. Scaffold / PoC | Done | TS/Bun, minimal plugin, `chat.message` hook. |
|
|
362
|
-
| 1. Local registry + heuristic router | Done | Ollama/LM Studio/Foundry, probes and deterministic `chooseModel`. |
|
|
718
|
+
| 1. Local registry + heuristic router | Done | Ollama/LM Studio/Lemonade/Foundry, probes and deterministic `chooseModel`. |
|
|
363
719
|
| 2. Classifier + profiles + budget + telemetry | Done | Local classifier, `ModelCapabilityProfile`, budgets and `CostRecord`. |
|
|
364
720
|
| 3. Multi-agent orchestration | Done | Coordinator, roles, child sessions and permissions. |
|
|
365
721
|
| 4. npm packaging + docs | Done | Exportable package, README, Windows examples and compatibility matrix. |
|
|
366
722
|
| 5. Runtime commands | Done | `baseline show/set/auto`, `doctor` and `report` via tool, `/openteam` and CLI `bin`. |
|
|
367
|
-
| 6. Web Console + MCP memory | Done
|
|
723
|
+
| 6. Web Console + MCP memory | Done | The multi-session Console is loopback-only and gate-covered; read-only MCP server and semantic recall are stable. |
|
|
368
724
|
|
|
369
725
|
## License
|
|
370
726
|
|