bootstrap
Adom Hydrogen (platform base)
Public Made by Adomby adom
Layer Hydrogen's workspace onto a standard Adom workstation.
← Commit history
0.5.5: split settings into MANAGED (policy, re-asserted) and SEEDED (defaults set once, then the user owns them). initialPermissionMode, colorTheme and fontSize are the user's choice; 0.5.4 would have reset a deliberate bypassPermissions back to auto every hook window.
2 files changed
+28−10
install.sh+27−8@@ -125,16 +125,32 @@ import json, os, shutil, sys path = sys.argv[1] -# The managed set: what ah needs true for the product to behave. Anything not in-# here belongs to the user and is never written, reordered or removed by us.+# TWO CLASSES, and the difference is whose decision the key represents.+#+# SEEDED: a default we set ONCE if the key is absent, then never touch again,+# because it is the user's to change. Ray Kholodovsky set+# claudeCode.initialPermissionMode to "bypassPermissions" by hand after working+# out for himself that ~/.claude/settings.json defaultMode does NOT govern the+# VS Code extension (the extension passes --permission-mode explicitly on the+# command line, and an explicit flag beats defaultMode). If that key were+# managed, this bootstrap would have reset his deliberate choice back to "auto"+# on the very next hook window, which is the same class of harm as the `cat >`+# it replaced: quieter, and aimed at exactly the users who know what they want.+SEEDED = {+ "claudeCode.initialPermissionMode": "auto",+ "workbench.colorTheme": "Adom Studio Dark (Brighter Text)",+ "editor.fontSize": 15,+}++# MANAGED: what ah needs true for the product to behave at all. These are+# re-asserted every run. Anything in NEITHER set belongs entirely to the user and+# is never written, reordered or removed by us. MANAGED = { "security.workspace.trust.enabled": False, "security.workspace.trust.untrustedFiles": "open", "workbench.startupEditor": "none", "workbench.activityBar.location": "default", "workbench.activityBar.iconClickBehavior": "toggle",- "workbench.colorTheme": "Adom Studio Dark (Brighter Text)",- "editor.fontSize": 15, "workbench.statusBar.visible": False, "workbench.navigationControl.enabled": False, "workbench.secondarySideBar.visible": False,@@ -144,7 +160,6 @@ MANAGED = { # Auto stays the default via initialPermissionMode, and Claude Code still # shows its own one-time consent dialog before bypass takes effect. "claudeCode.allowDangerouslySkipPermissions": True,- "claudeCode.initialPermissionMode": "auto", "claudeCode.preferredLocation": "panel", "chat.agent.enabled": False, "chat.commandCenter.enabled": False,@@ -184,7 +199,10 @@ if unreadable and os.path.exists(path): existing = {} merged = dict(existing)-merged.update(MANAGED)+for k, v in SEEDED.items():+ if k not in merged: # seed only when absent; the user owns it after that+ merged[k] = v+merged.update(MANAGED) # policy: re-asserted every run if merged != existing: # One-time safety net for anyone who still has settings from before the merge.@@ -196,8 +214,9 @@ if merged != existing: f.write("\n") os.replace(tmp, path) # atomic: never a half-written settings file kept = [k for k in existing if k not in MANAGED]- print(" merged %d managed key(s); preserved %d of the user's own: %s"- % (len(MANAGED), len(kept), ", ".join(sorted(kept)[:6]) or "none"))+ print(" asserted %d managed key(s), seeded %d default(s) if absent; "+ "preserved %d of the user's own: %s"+ % (len(MANAGED), len(SEEDED), len(kept), ", ".join(sorted(kept)[:6]) or "none")) else: print(" settings.json already correct, nothing written") PYSETTINGS
package.json+1−2@@ -4,10 +4,9 @@ "type": "bootstrap", "title": "Adom Hydrogen (platform base)", "brief": "Layer Hydrogen's workspace onto a standard Adom workstation.",- "version": "0.5.4",+ "version": "0.5.5", "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",- "platform": "any", "tags": [ "bootstrap", "hydrogen",