← Commit history

Publish 0.5.81

John Lauer ·279f36c279 · ·parent f9a3d04
3 files changed +64−2
install.sh+62
@@ -353,6 +353,68 @@ if [ -n "$KV" ] && ! printf '%s' "$KV" | grep -qE '(^|[^0-9.])[2-9]\.[0-9]'; the   fi fi +# 4e2. Kimi default model (John 2026-10-26: "make k3.1 pro the default for kimi ... for all+#      adom users"). The extension and the CLI both read default_model and the [models.*]+#      list from ~/.kimi-code/config.toml, and that list is only written at sign-in, so a+#      model Moonshot ships later never shows in the picker. Add any model the user's own plan+#      lists at /coding/v1/models that the config lacks, then move default_model to+#      KIMI_DEFAULT once. The marker records that move, so a user who then picks another model+#      keeps it; bumping KIMI_DEFAULT moves everyone once more.+KIMI_DEFAULT="k3.1-pro"+if [ -f "$HOME/.kimi-code/config.toml" ] && grep -q 'managed:kimi-code' "$HOME/.kimi-code/config.toml"; then+  out="$(KIMI_DEFAULT="$KIMI_DEFAULT" python3 - <<'PY' 2>&1 || true+import glob, json, os, re, urllib.request+home = os.path.expanduser('~/.kimi-code')+cfg, marker, want = home + '/config.toml', home + '/.adom-default-model', os.environ['KIMI_DEFAULT']+tok = None+for f in sorted(glob.glob(home + '/credentials/kimi-code*.json')):+    try: tok = json.load(open(f)).get('access_token') or tok+    except Exception: pass+if not tok: raise SystemExit+try:+    req = urllib.request.Request('https://api.kimi.com/coding/v1/models', headers={'Authorization': 'Bearer ' + tok})+    served = json.load(urllib.request.urlopen(req, timeout=15)).get('data', [])+except Exception:+    raise SystemExit  # offline or token expired: the next sweep retries+s = open(cfg).read()+added = []+for m in served:+    mid = m.get('id')+    if not mid or f'[models."kimi-code/{mid}"]' in s: continue+    # Same shape Kimi 2.x writes at sign-in.+    caps = (['thinking'] if m.get('supports_reasoning') else []) + (['always_thinking'] if m.get('supports_thinking_type') == 'only' else []) \+         + (['image_in'] if m.get('supports_image_in') else []) + (['video_in'] if m.get('supports_video_in') else []) \+         + ['tool_use'] + (['dynamically_loaded_tools'] if m.get('supports_dynamic_tools') else [])+    eff = m.get('think_efforts') or {}+    block = (f'[models."kimi-code/{mid}"]\nprovider = "managed:kimi-code"\nmodel = "{mid}"\n'+             f'max_context_size = {int(m.get("context_length") or 262144)}\ncapabilities = {json.dumps(caps)}\n'+             f'display_name = {json.dumps(m.get("display_name") or mid)}\n')+    if eff.get('support') and eff.get('valid_efforts'):+        block += f'support_efforts = {json.dumps(eff["valid_efforts"])}\ndefault_effort = {json.dumps(eff.get("default_effort") or "high")}\n'+    block += '\n'+    i = s.find('[providers.')+    s = s[:i] + block + s[i:] if i >= 0 else s + '\n' + block+    added.append(mid)+moved = ''+done = open(marker).read().strip() if os.path.exists(marker) else ''+if done != want and f'[models."kimi-code/{want}"]' in s:+    cur = re.search(r'^default_model\s*=\s*"([^"]*)"', s, re.M)+    if cur and cur.group(1) != f'kimi-code/{want}':+        s = s[:cur.start()] + f'default_model = "kimi-code/{want}"' + s[cur.end():]+        moved = f'default {cur.group(1)} -> kimi-code/{want}'+    open(marker, 'w').write(want)+if added or moved:+    import tomllib+    try: tomllib.loads(s)+    except Exception as e: raise SystemExit(f'kimi models: edit would not parse ({e}); left config.toml alone')+    open(cfg + '.adom-bak', 'w').write(open(cfg).read())+    open(cfg, 'w').write(s)+    print('kimi models: ' + ', '.join(filter(None, ['added ' + ' '.join(added) if added else '', moved])))+PY+)"+  [ -n "$out" ] && echo "  $out"+fi+ # 4f. Claude Remote Control on by default (John 2026-09-23: "have hydrogen-bootstrap enable #     claude-rc on an ah container by default ... a fresh install has remote control from day #     one without anyone answering a prompt"). adom/hook ships claude-rc; `ensure` is the
package.json+1−1
@@ -4,7 +4,7 @@   "type": "bootstrap",   "title": "Adom Hydrogen (platform base)",   "brief": "Layer Hydrogen's workspace onto a standard Adom workstation.",-  "version": "0.5.80",+  "version": "0.5.81",   "description": "Hydrogen's PLATFORM-GENERIC workspace layer on top of adom/core. Installs adom/core for the full Adom ecosystem, then adds everything common to running inside Hydrogen on ANY platform: the runtime-neutral hydrogen-* skills and the generic editor configuration (Claude Code CLI + extension, VS Code settings, trusted domains). Platform-specific layers depend on THIS: adom/hydrogen-windows-bootstrap (WSL2), adom/hydrogen-mac-bootstrap, adom/hydrogen-ubuntu-bootstrap. The reference design other orgs copy to build their own bootstrap on adom/core.",   "org": "adom",   "tags": [
page.json+1−1
@@ -4,7 +4,7 @@   "type": "bootstrap",   "title": "Adom Hydrogen (platform base)",   "brief": "Layer Hydrogen's workspace onto a standard Adom workstation.",-  "version": "0.5.80",+  "version": "0.5.81",   "description": "Hydrogen's PLATFORM-GENERIC workspace layer on top of adom/core. Installs adom/core for the full Adom ecosystem, then adds everything common to running inside Hydrogen on ANY platform: the runtime-neutral hydrogen-* skills and the generic editor configuration (Claude Code CLI + extension, VS Code settings, trusted domains). Platform-specific layers depend on THIS: adom/hydrogen-windows-bootstrap (WSL2), adom/hydrogen-mac-bootstrap, adom/hydrogen-ubuntu-bootstrap. The reference design other orgs copy to build their own bootstrap on adom/core.",   "org": "adom",   "tags": [