personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

observe: warn when creating observers in localhost-only mode

Print an explicit localhost-only warning around observer creation so remote-device setup failures are explained at the moment the key is minted. JSON output stays unchanged, and the reminder is repeated after the success block for terminal users who scroll past the banner.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+21 -1
+21 -1
observe/observer_cli.py
··· 33 33 save_observer, 34 34 ) 35 35 from apps.utils import log_app_action 36 - from think.utils import now_ms, require_solstone, setup_cli 36 + from observe.copy import ( 37 + OBSERVER_LOCALHOST_BANNER_LINE_1, 38 + OBSERVER_LOCALHOST_BANNER_LINE_2, 39 + OBSERVER_LOCALHOST_BANNER_LINE_3, 40 + OBSERVER_LOCALHOST_BANNER_LINE_4, 41 + OBSERVER_LOCALHOST_REMINDER, 42 + ) 43 + from think.utils import get_config, now_ms, require_solstone, setup_cli 37 44 38 45 logger = logging.getLogger(__name__) 39 46 ··· 140 147 print(json.dumps({"name": name, "key": key, "prefix": key[:8]})) 141 148 return 0 142 149 150 + allow_network_access = bool( 151 + get_config().get("convey", {}).get("allow_network_access", False) 152 + ) 153 + if not allow_network_access: 154 + print() 155 + print(OBSERVER_LOCALHOST_BANNER_LINE_1) 156 + print(OBSERVER_LOCALHOST_BANNER_LINE_2) 157 + print(OBSERVER_LOCALHOST_BANNER_LINE_3) 158 + print(OBSERVER_LOCALHOST_BANNER_LINE_4) 159 + print() 143 160 print("Observer created:") 144 161 print(f" Name: {name}") 145 162 print(f" Prefix: {key[:8]}") 146 163 print(" server url: (set during server configuration)") 147 164 print(f" api key: {key}") 165 + if not allow_network_access: 166 + print() 167 + print(OBSERVER_LOCALHOST_REMINDER) 148 168 return 0 149 169 150 170