https://gitlab.synchro.net/main/sbbs/-/commit/e9e5884dba659e4eec2e8ee0
Modified Files:
.claude/skills/javascript/SKILL.md
Log Message:
skills/javascript: load() caller-scope trap + uselect/printfile/directory gotchas
Lessons captured from Synchronet door work:
- load('file') runs in the CALLER's scope, so its top-level vars become locals of
whatever function called load() -- a top-level / on_exit handler can't see a
value load()ed inside main(); capture it into a reachable scope (the silent
"quetzal is not defined" ReferenceError).
- console.uselect: the title is auto-prefixed with "Select " (pass "a Game", not
"Select a Game"); the display call's number argument is the DEFAULT item index.
console.line_counter = 0 discards a pending auto-pager prompt before a clear. - console.printfile renders Ctrl-A codes + ANSI/CP437 by default; P_PCBOARD is
only for PCBoard @X codes (it would misread a literal @).
- directory() defaults to GLOB_MARK, so directory entries come back with a trailing
'/' (self-identifying). The CWD is process-global (always ctrl/, since sbbs is
multi-threaded) -- which is why no chdir is exposed to BBS JS; build absolute
paths from js.exec_dir / system.*_dir.
Co-Authored-By: Claude Opus 4.8 <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net