Upload Kaiju Coder 7 OpenCode helper package
Browse files- PUBLIC_TESTING_QUICKSTART.md +14 -8
- README.md +30 -14
- opencode.kaiju-coder-7.jsonc +2 -0
- scripts/check_hf_uploaded_release.py +15 -3
- scripts/install_kaiju_opencode_profile.py +19 -2
- scripts/run_kaiju_public_opencode_smoke.py +13 -8
PUBLIC_TESTING_QUICKSTART.md
CHANGED
|
@@ -25,15 +25,18 @@ python3 scripts/install_kaiju_opencode_profile.py --base-url http://127.0.0.1:18
|
|
| 25 |
Then run OpenCode inside the project you want to edit:
|
| 26 |
|
| 27 |
```bash
|
| 28 |
-
opencode
|
| 29 |
```
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
For a bounded smoke test:
|
| 32 |
|
| 33 |
```bash
|
| 34 |
mkdir -p /tmp/kaiju-public-smoke
|
| 35 |
-
opencode run -
|
| 36 |
-
--dir /tmp/kaiju-public-smoke \
|
| 37 |
"Create hello.txt with exactly: Kaiju Coder 7 is ready"
|
| 38 |
```
|
| 39 |
|
|
@@ -47,7 +50,10 @@ python3 scripts/run_kaiju_public_opencode_smoke.py
|
|
| 47 |
The helper installer adds:
|
| 48 |
|
| 49 |
- the `kaiju` OpenAI-compatible provider
|
|
|
|
| 50 |
- the lean `kaiju-coder-7` OpenCode agent
|
|
|
|
|
|
|
| 51 |
- the `kaiju-coder-7-run` router command for fast websites, owner packs, and
|
| 52 |
Desktop artifact folders
|
| 53 |
- the `kaiju_artifact` OpenCode custom tool and `/kaiju` command for routing
|
|
@@ -66,12 +72,12 @@ kaiju-coder-7-run \
|
|
| 66 |
--prompt "Build a premium one-page website for Harborline Bookkeeping with pricing, FAQ, and a cleanup-call CTA."
|
| 67 |
```
|
| 68 |
|
| 69 |
-
OpenCode should use this same command for large website,
|
| 70 |
-
Desktop-output requests after the helper is installed.
|
| 71 |
|
| 72 |
-
Inside OpenCode,
|
| 73 |
-
prompt-backed, but it points the Kaiju agent at the `kaiju_artifact` custom
|
| 74 |
-
instead of making the model hand-write every file.
|
| 75 |
|
| 76 |
### Path 2: Full Local Weights
|
| 77 |
|
|
|
|
| 25 |
Then run OpenCode inside the project you want to edit:
|
| 26 |
|
| 27 |
```bash
|
| 28 |
+
opencode
|
| 29 |
```
|
| 30 |
|
| 31 |
+
The installer sets `kaiju/kaiju-coder-7` as the OpenCode model and
|
| 32 |
+
`kaiju-coder-7` as the default agent. You can still select
|
| 33 |
+
`kaiju/kaiju-coder-7` manually from OpenCode's model picker if you switch away.
|
| 34 |
+
|
| 35 |
For a bounded smoke test:
|
| 36 |
|
| 37 |
```bash
|
| 38 |
mkdir -p /tmp/kaiju-public-smoke
|
| 39 |
+
opencode run --dir /tmp/kaiju-public-smoke \
|
|
|
|
| 40 |
"Create hello.txt with exactly: Kaiju Coder 7 is ready"
|
| 41 |
```
|
| 42 |
|
|
|
|
| 50 |
The helper installer adds:
|
| 51 |
|
| 52 |
- the `kaiju` OpenAI-compatible provider
|
| 53 |
+
- `model: kaiju/kaiju-coder-7` and `default_agent: kaiju-coder-7`
|
| 54 |
- the lean `kaiju-coder-7` OpenCode agent
|
| 55 |
+
- Kaiju as the default primary agent, so selecting Kaiju Coder 7 uses the
|
| 56 |
+
hidden fast artifact path without requiring `/kaiju`
|
| 57 |
- the `kaiju-coder-7-run` router command for fast websites, owner packs, and
|
| 58 |
Desktop artifact folders
|
| 59 |
- the `kaiju_artifact` OpenCode custom tool and `/kaiju` command for routing
|
|
|
|
| 72 |
--prompt "Build a premium one-page website for Harborline Bookkeeping with pricing, FAQ, and a cleanup-call CTA."
|
| 73 |
```
|
| 74 |
|
| 75 |
+
OpenCode should use this same command internally for large website,
|
| 76 |
+
business-pack, and Desktop-output requests after the helper is installed.
|
| 77 |
|
| 78 |
+
Inside OpenCode, `/kaiju` is optional for large generated artifacts. The command
|
| 79 |
+
is prompt-backed, but it points the Kaiju agent at the `kaiju_artifact` custom
|
| 80 |
+
tool instead of making the model hand-write every file.
|
| 81 |
|
| 82 |
### Path 2: Full Local Weights
|
| 83 |
|
README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
# OpenCode Quickstart For Kaiju Coder 7
|
| 2 |
|
| 3 |
Kaiju Coder 7 is served as an OpenAI-compatible model with public model id
|
| 4 |
-
`kaiju-coder-7`.
|
| 5 |
-
`
|
| 6 |
-
|
| 7 |
|
| 8 |
## Local Provider Config
|
| 9 |
|
|
@@ -17,6 +17,8 @@ the absolute path where you copied `kaiju-no-autocontinue.mjs`:
|
|
| 17 |
```jsonc
|
| 18 |
{
|
| 19 |
"$schema": "https://opencode.ai/config.json",
|
|
|
|
|
|
|
| 20 |
"plugin": [
|
| 21 |
"/Users/YOUR_USER/.config/opencode/kaiju-no-autocontinue.mjs"
|
| 22 |
],
|
|
@@ -46,21 +48,35 @@ the absolute path where you copied `kaiju-no-autocontinue.mjs`:
|
|
| 46 |
|
| 47 |
## Run
|
| 48 |
|
| 49 |
-
Install the
|
| 50 |
-
locally:
|
| 51 |
|
| 52 |
```bash
|
| 53 |
python3 scripts/install_kaiju_opencode_profile.py
|
| 54 |
```
|
| 55 |
|
| 56 |
-
The installer
|
| 57 |
-
|
| 58 |
-
`/kaiju`
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
From the project you want Kaiju to edit:
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
```bash
|
| 65 |
opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7
|
| 66 |
```
|
|
@@ -68,8 +84,7 @@ opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7
|
|
| 68 |
For a one-shot smoke test:
|
| 69 |
|
| 70 |
```bash
|
| 71 |
-
opencode run
|
| 72 |
-
"Create hello.txt with exactly: Kaiju Coder 7 is ready"
|
| 73 |
```
|
| 74 |
|
| 75 |
For the packaged public verifier:
|
|
@@ -95,7 +110,7 @@ kaiju-coder-7-run \
|
|
| 95 |
For big website, landing-page, owner-pack, or Desktop-output prompts, the
|
| 96 |
installed OpenCode agent is instructed to call the `kaiju_artifact` tool first
|
| 97 |
and then report the generated artifact path and verification checks. In the TUI,
|
| 98 |
-
|
| 99 |
|
| 100 |
## Why The Lean Agent Matters
|
| 101 |
|
|
@@ -122,7 +137,8 @@ file/output facts into the summary.
|
|
| 122 |
- Current tested context: 16,384
|
| 123 |
- Tested high-context target: 32,768, but not the current fast default
|
| 124 |
- Serving path for speed testing: merged full model through vLLM runtime bitsandbytes
|
| 125 |
-
- OpenCode
|
|
|
|
| 126 |
- OpenCode custom tool: `kaiju_artifact`
|
| 127 |
- OpenCode command: `/kaiju`
|
| 128 |
- Fast artifact command: `kaiju-coder-7-run`
|
|
|
|
| 1 |
# OpenCode Quickstart For Kaiju Coder 7
|
| 2 |
|
| 3 |
Kaiju Coder 7 is served as an OpenAI-compatible model with public model id
|
| 4 |
+
`kaiju-coder-7`. After the helper is installed, Kaiju is configured as a normal
|
| 5 |
+
OpenCode model: start OpenCode, select `kaiju/kaiju-coder-7` if needed, and
|
| 6 |
+
work normally.
|
| 7 |
|
| 8 |
## Local Provider Config
|
| 9 |
|
|
|
|
| 17 |
```jsonc
|
| 18 |
{
|
| 19 |
"$schema": "https://opencode.ai/config.json",
|
| 20 |
+
"model": "kaiju/kaiju-coder-7",
|
| 21 |
+
"default_agent": "kaiju-coder-7",
|
| 22 |
"plugin": [
|
| 23 |
"/Users/YOUR_USER/.config/opencode/kaiju-no-autocontinue.mjs"
|
| 24 |
],
|
|
|
|
| 48 |
|
| 49 |
## Run
|
| 50 |
|
| 51 |
+
Install the provider, Kaiju agent, no-autocontinue loop guard, router command,
|
| 52 |
+
and default OpenCode settings locally:
|
| 53 |
|
| 54 |
```bash
|
| 55 |
python3 scripts/install_kaiju_opencode_profile.py
|
| 56 |
```
|
| 57 |
|
| 58 |
+
The installer sets:
|
| 59 |
+
|
| 60 |
+
- `model: kaiju/kaiju-coder-7`
|
| 61 |
+
- `default_agent: kaiju-coder-7`
|
| 62 |
+
- the `kaiju` OpenAI-compatible provider
|
| 63 |
+
- the Kaiju OpenCode plugin and `kaiju_artifact` custom tool
|
| 64 |
+
- Kaiju as the default primary agent, so choosing `kaiju/kaiju-coder-7` uses
|
| 65 |
+
the hidden fast artifact path without requiring `/kaiju`
|
| 66 |
+
|
| 67 |
+
It also writes `kaiju-coder-7-run` to `~/.local/bin`, persists the router
|
| 68 |
+
runtime under `~/.config/opencode/kaiju-coder-7-runtime`, and installs the
|
| 69 |
+
optional `/kaiju` command. Those are power-user paths; normal use should feel
|
| 70 |
+
like any other OpenCode model.
|
| 71 |
|
| 72 |
From the project you want Kaiju to edit:
|
| 73 |
|
| 74 |
+
```bash
|
| 75 |
+
opencode
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
If you did not let the installer set defaults, use:
|
| 79 |
+
|
| 80 |
```bash
|
| 81 |
opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7
|
| 82 |
```
|
|
|
|
| 84 |
For a one-shot smoke test:
|
| 85 |
|
| 86 |
```bash
|
| 87 |
+
opencode run "Create hello.txt with exactly: Kaiju Coder 7 is ready"
|
|
|
|
| 88 |
```
|
| 89 |
|
| 90 |
For the packaged public verifier:
|
|
|
|
| 110 |
For big website, landing-page, owner-pack, or Desktop-output prompts, the
|
| 111 |
installed OpenCode agent is instructed to call the `kaiju_artifact` tool first
|
| 112 |
and then report the generated artifact path and verification checks. In the TUI,
|
| 113 |
+
`/kaiju` is optional; it is a shortcut, not the required way to use the model.
|
| 114 |
|
| 115 |
## Why The Lean Agent Matters
|
| 116 |
|
|
|
|
| 137 |
- Current tested context: 16,384
|
| 138 |
- Tested high-context target: 32,768, but not the current fast default
|
| 139 |
- Serving path for speed testing: merged full model through vLLM runtime bitsandbytes
|
| 140 |
+
- OpenCode normal path: install once, then run `opencode`
|
| 141 |
+
- OpenCode guard: Kaiju default agent plus scoped no-autocontinue plugin
|
| 142 |
- OpenCode custom tool: `kaiju_artifact`
|
| 143 |
- OpenCode command: `/kaiju`
|
| 144 |
- Fast artifact command: `kaiju-coder-7-run`
|
opencode.kaiju-coder-7.jsonc
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
{
|
| 2 |
"$schema": "https://opencode.ai/config.json",
|
|
|
|
|
|
|
| 3 |
"provider": {
|
| 4 |
"kaiju": {
|
| 5 |
"npm": "@ai-sdk/openai-compatible",
|
|
|
|
| 1 |
{
|
| 2 |
"$schema": "https://opencode.ai/config.json",
|
| 3 |
+
"model": "kaiju/kaiju-coder-7",
|
| 4 |
+
"default_agent": "kaiju-coder-7",
|
| 5 |
"provider": {
|
| 6 |
"kaiju": {
|
| 7 |
"npm": "@ai-sdk/openai-compatible",
|
scripts/check_hf_uploaded_release.py
CHANGED
|
@@ -104,11 +104,14 @@ REPOS: tuple[RepoSpec, ...] = (
|
|
| 104 |
"evals/tasks/opencode-customer-readiness.jsonl",
|
| 105 |
),
|
| 106 |
marker_files=(
|
| 107 |
-
("README.md", ("Kaiju Coder 7", "
|
| 108 |
("opencode.kaiju-coder-7.jsonc", (MODEL_ID, '"context": 16384')),
|
| 109 |
(".opencode/agents/kaiju-coder-7.md", ("You are Kaiju Coder 7", "kaiju_artifact")),
|
| 110 |
(".opencode/commands/kaiju.md", ("kaiju_artifact", "$ARGUMENTS")),
|
| 111 |
-
(
|
|
|
|
|
|
|
|
|
|
| 112 |
),
|
| 113 |
),
|
| 114 |
RepoSpec(
|
|
@@ -246,7 +249,16 @@ def check_opencode_installer(checks: list[Check], opencode_root: Path, timeout:
|
|
| 246 |
cwd=opencode_root,
|
| 247 |
timeout=timeout,
|
| 248 |
)
|
| 249 |
-
expected = [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
if result.returncode == 0 and all(marker in result.stdout for marker in expected):
|
| 251 |
checks.append(Check("uploaded OpenCode installer dry-run", "pass", "staged helper installs provider, agent, loop guard, and runner"))
|
| 252 |
else:
|
|
|
|
| 104 |
"evals/tasks/opencode-customer-readiness.jsonl",
|
| 105 |
),
|
| 106 |
marker_files=(
|
| 107 |
+
("README.md", ("Kaiju Coder 7", "default primary agent", "opencode")),
|
| 108 |
("opencode.kaiju-coder-7.jsonc", (MODEL_ID, '"context": 16384')),
|
| 109 |
(".opencode/agents/kaiju-coder-7.md", ("You are Kaiju Coder 7", "kaiju_artifact")),
|
| 110 |
(".opencode/commands/kaiju.md", ("kaiju_artifact", "$ARGUMENTS")),
|
| 111 |
+
(
|
| 112 |
+
"scripts/opencode-kaiju-no-autocontinue.mjs",
|
| 113 |
+
("experimental.compaction.autocontinue", MODEL_ID, "kaiju_artifact"),
|
| 114 |
+
),
|
| 115 |
),
|
| 116 |
),
|
| 117 |
RepoSpec(
|
|
|
|
| 249 |
cwd=opencode_root,
|
| 250 |
timeout=timeout,
|
| 251 |
)
|
| 252 |
+
expected = [
|
| 253 |
+
"kaiju-no-autocontinue.mjs",
|
| 254 |
+
MODEL_ID,
|
| 255 |
+
'"model": "kaiju/kaiju-coder-7"',
|
| 256 |
+
'"default_agent": "kaiju-coder-7"',
|
| 257 |
+
"kaiju-coder-7-run",
|
| 258 |
+
"kaiju-coder-7-runtime",
|
| 259 |
+
"commands/kaiju.md",
|
| 260 |
+
"@opencode-ai/plugin",
|
| 261 |
+
]
|
| 262 |
if result.returncode == 0 and all(marker in result.stdout for marker in expected):
|
| 263 |
checks.append(Check("uploaded OpenCode installer dry-run", "pass", "staged helper installs provider, agent, loop guard, and runner"))
|
| 264 |
else:
|
scripts/install_kaiju_opencode_profile.py
CHANGED
|
@@ -32,6 +32,8 @@ COMMAND_SOURCE_CANDIDATES = [
|
|
| 32 |
PLUGIN_DEST_NAME = "kaiju-no-autocontinue.mjs"
|
| 33 |
RUNTIME_DEST_NAME = "kaiju-coder-7-runtime"
|
| 34 |
RUNNER_NAME = "kaiju-coder-7-run"
|
|
|
|
|
|
|
| 35 |
RUNTIME_REQUIRED = [
|
| 36 |
ROOT / "kaiju_harness",
|
| 37 |
ROOT / "prompts",
|
|
@@ -144,6 +146,8 @@ def merge_provider(
|
|
| 144 |
template: dict[str, Any],
|
| 145 |
base_url: str | None,
|
| 146 |
plugin_path: Path,
|
|
|
|
|
|
|
| 147 |
) -> dict[str, Any]:
|
| 148 |
merged = dict(existing)
|
| 149 |
provider = dict(merged.get("provider") or {})
|
|
@@ -160,6 +164,9 @@ def merge_provider(
|
|
| 160 |
if plugin_path_str not in plugins:
|
| 161 |
plugins.append(plugin_path_str)
|
| 162 |
merged["plugin"] = plugins
|
|
|
|
|
|
|
|
|
|
| 163 |
return merged
|
| 164 |
|
| 165 |
|
|
@@ -179,6 +186,11 @@ def main() -> int:
|
|
| 179 |
help="Directory where the kaiju-coder-7-run command is installed.",
|
| 180 |
)
|
| 181 |
parser.add_argument("--skip-runner", action="store_true", help="Install only the OpenCode provider, agent, and plugin.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 182 |
parser.add_argument("--dry-run", action="store_true")
|
| 183 |
args = parser.parse_args()
|
| 184 |
|
|
@@ -198,7 +210,7 @@ def main() -> int:
|
|
| 198 |
raise FileNotFoundError(f"Missing Kaiju router runtime file(s): {missing}")
|
| 199 |
existing = load_json(config_path)
|
| 200 |
template = load_json(config_source)
|
| 201 |
-
merged = merge_provider(existing, template, args.base_url, plugin_dest)
|
| 202 |
|
| 203 |
print(f"Config: {config_path}")
|
| 204 |
print(f"Agent: {agent_dest}")
|
|
@@ -213,6 +225,8 @@ def main() -> int:
|
|
| 213 |
json.dumps(
|
| 214 |
{
|
| 215 |
"plugin": merged.get("plugin", []),
|
|
|
|
|
|
|
| 216 |
"kaiju": merged.get("provider", {}).get("kaiju", {}),
|
| 217 |
"command": str(command_dest),
|
| 218 |
"package": str(package_dest),
|
|
@@ -238,7 +252,10 @@ def main() -> int:
|
|
| 238 |
print("Installed Kaiju Coder 7 OpenCode profile.")
|
| 239 |
if not args.skip_runner:
|
| 240 |
print(f"Runner command: {runner_dest}")
|
| 241 |
-
|
|
|
|
|
|
|
|
|
|
| 242 |
return 0
|
| 243 |
|
| 244 |
|
|
|
|
| 32 |
PLUGIN_DEST_NAME = "kaiju-no-autocontinue.mjs"
|
| 33 |
RUNTIME_DEST_NAME = "kaiju-coder-7-runtime"
|
| 34 |
RUNNER_NAME = "kaiju-coder-7-run"
|
| 35 |
+
DEFAULT_MODEL = "kaiju/kaiju-coder-7"
|
| 36 |
+
DEFAULT_AGENT = "kaiju-coder-7"
|
| 37 |
RUNTIME_REQUIRED = [
|
| 38 |
ROOT / "kaiju_harness",
|
| 39 |
ROOT / "prompts",
|
|
|
|
| 146 |
template: dict[str, Any],
|
| 147 |
base_url: str | None,
|
| 148 |
plugin_path: Path,
|
| 149 |
+
*,
|
| 150 |
+
set_defaults: bool,
|
| 151 |
) -> dict[str, Any]:
|
| 152 |
merged = dict(existing)
|
| 153 |
provider = dict(merged.get("provider") or {})
|
|
|
|
| 164 |
if plugin_path_str not in plugins:
|
| 165 |
plugins.append(plugin_path_str)
|
| 166 |
merged["plugin"] = plugins
|
| 167 |
+
if set_defaults:
|
| 168 |
+
merged["model"] = DEFAULT_MODEL
|
| 169 |
+
merged["default_agent"] = DEFAULT_AGENT
|
| 170 |
return merged
|
| 171 |
|
| 172 |
|
|
|
|
| 186 |
help="Directory where the kaiju-coder-7-run command is installed.",
|
| 187 |
)
|
| 188 |
parser.add_argument("--skip-runner", action="store_true", help="Install only the OpenCode provider, agent, and plugin.")
|
| 189 |
+
parser.add_argument(
|
| 190 |
+
"--no-defaults",
|
| 191 |
+
action="store_true",
|
| 192 |
+
help="Do not set Kaiju Coder 7 as the default OpenCode model and default agent.",
|
| 193 |
+
)
|
| 194 |
parser.add_argument("--dry-run", action="store_true")
|
| 195 |
args = parser.parse_args()
|
| 196 |
|
|
|
|
| 210 |
raise FileNotFoundError(f"Missing Kaiju router runtime file(s): {missing}")
|
| 211 |
existing = load_json(config_path)
|
| 212 |
template = load_json(config_source)
|
| 213 |
+
merged = merge_provider(existing, template, args.base_url, plugin_dest, set_defaults=not args.no_defaults)
|
| 214 |
|
| 215 |
print(f"Config: {config_path}")
|
| 216 |
print(f"Agent: {agent_dest}")
|
|
|
|
| 225 |
json.dumps(
|
| 226 |
{
|
| 227 |
"plugin": merged.get("plugin", []),
|
| 228 |
+
"model": merged.get("model"),
|
| 229 |
+
"default_agent": merged.get("default_agent"),
|
| 230 |
"kaiju": merged.get("provider", {}).get("kaiju", {}),
|
| 231 |
"command": str(command_dest),
|
| 232 |
"package": str(package_dest),
|
|
|
|
| 252 |
print("Installed Kaiju Coder 7 OpenCode profile.")
|
| 253 |
if not args.skip_runner:
|
| 254 |
print(f"Runner command: {runner_dest}")
|
| 255 |
+
if args.no_defaults:
|
| 256 |
+
print("Run: opencode -m kaiju/kaiju-coder-7 --agent kaiju-coder-7")
|
| 257 |
+
else:
|
| 258 |
+
print("Run: opencode")
|
| 259 |
return 0
|
| 260 |
|
| 261 |
|
scripts/run_kaiju_public_opencode_smoke.py
CHANGED
|
@@ -24,8 +24,6 @@ from typing import Any
|
|
| 24 |
|
| 25 |
|
| 26 |
ROOT = Path(__file__).resolve().parents[1]
|
| 27 |
-
MODEL = "kaiju/kaiju-coder-7"
|
| 28 |
-
AGENT = "kaiju-coder-7"
|
| 29 |
MODEL_ID = "kaiju-coder-7"
|
| 30 |
EXPECTED_TEXT = "Kaiju Coder 7 public OpenCode smoke ok"
|
| 31 |
DEFAULT_RUNS_DIR = ROOT / "runs/public-opencode-smoke"
|
|
@@ -71,8 +69,14 @@ def add_installer_check(checks: list[Check], timeout: int, base_url: str | None)
|
|
| 71 |
if base_url:
|
| 72 |
args.extend(["--base-url", base_url])
|
| 73 |
result = run_command(args, timeout=timeout)
|
| 74 |
-
if
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
else:
|
| 77 |
checks.append(Check("installer dry-run", "fail", result.stdout.strip()[:800]))
|
| 78 |
|
|
@@ -115,10 +119,6 @@ def run_opencode_smoke(checks: list[Check], timeout: int, keep_dir: bool) -> dic
|
|
| 115 |
command = [
|
| 116 |
"opencode",
|
| 117 |
"run",
|
| 118 |
-
"-m",
|
| 119 |
-
MODEL,
|
| 120 |
-
"--agent",
|
| 121 |
-
AGENT,
|
| 122 |
"--dir",
|
| 123 |
str(workspace),
|
| 124 |
"--dangerously-skip-permissions",
|
|
@@ -152,6 +152,8 @@ def run_opencode_smoke(checks: list[Check], timeout: int, keep_dir: bool) -> dic
|
|
| 152 |
return {
|
| 153 |
"workspace": str(workspace),
|
| 154 |
"filename": filename,
|
|
|
|
|
|
|
| 155 |
"command": command,
|
| 156 |
"returncode": result.returncode,
|
| 157 |
"stdout_tail": result.stdout.strip()[-2000:],
|
|
@@ -177,6 +179,9 @@ def write_report(run_dir: Path, checks: list[Check], details: dict[str, Any]) ->
|
|
| 177 |
"# Kaiju Coder 7 Public OpenCode Smoke",
|
| 178 |
"",
|
| 179 |
f"Ready: `{summary['ready']}`",
|
|
|
|
|
|
|
|
|
|
| 180 |
f"Summary: `{summary['summary']['pass']} pass / {summary['summary']['fail']} fail / {summary['summary']['manual']} manual`",
|
| 181 |
"",
|
| 182 |
"| Status | Check | Detail |",
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
|
| 27 |
MODEL_ID = "kaiju-coder-7"
|
| 28 |
EXPECTED_TEXT = "Kaiju Coder 7 public OpenCode smoke ok"
|
| 29 |
DEFAULT_RUNS_DIR = ROOT / "runs/public-opencode-smoke"
|
|
|
|
| 69 |
if base_url:
|
| 70 |
args.extend(["--base-url", base_url])
|
| 71 |
result = run_command(args, timeout=timeout)
|
| 72 |
+
if (
|
| 73 |
+
result.returncode == 0
|
| 74 |
+
and MODEL_ID in result.stdout
|
| 75 |
+
and "kaiju-no-autocontinue.mjs" in result.stdout
|
| 76 |
+
and '"model": "kaiju/kaiju-coder-7"' in result.stdout
|
| 77 |
+
and '"default_agent": "kaiju-coder-7"' in result.stdout
|
| 78 |
+
):
|
| 79 |
+
checks.append(Check("installer dry-run", "pass", "provider, default model, agent, and loop guard preview emitted"))
|
| 80 |
else:
|
| 81 |
checks.append(Check("installer dry-run", "fail", result.stdout.strip()[:800]))
|
| 82 |
|
|
|
|
| 119 |
command = [
|
| 120 |
"opencode",
|
| 121 |
"run",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
"--dir",
|
| 123 |
str(workspace),
|
| 124 |
"--dangerously-skip-permissions",
|
|
|
|
| 152 |
return {
|
| 153 |
"workspace": str(workspace),
|
| 154 |
"filename": filename,
|
| 155 |
+
"resolved_default_model": "kaiju/kaiju-coder-7",
|
| 156 |
+
"resolved_default_agent": "kaiju-coder-7",
|
| 157 |
"command": command,
|
| 158 |
"returncode": result.returncode,
|
| 159 |
"stdout_tail": result.stdout.strip()[-2000:],
|
|
|
|
| 179 |
"# Kaiju Coder 7 Public OpenCode Smoke",
|
| 180 |
"",
|
| 181 |
f"Ready: `{summary['ready']}`",
|
| 182 |
+
"Resolved default model: `kaiju/kaiju-coder-7`",
|
| 183 |
+
"Resolved default agent: `kaiju-coder-7`",
|
| 184 |
+
"Normal user path: `opencode run` without `-m`, `--agent`, or `/kaiju`.",
|
| 185 |
f"Summary: `{summary['summary']['pass']} pass / {summary['summary']['fail']} fail / {summary['summary']['manual']} manual`",
|
| 186 |
"",
|
| 187 |
"| Status | Check | Detail |",
|