29inline const std::vector<std::pair<std::string_view, ReloadCapability>>&
31 static const std::vector<std::pair<std::string_view, ReloadCapability>> table = {
71 return (
c >=
'a' &&
c <=
'z') || (
c >=
'A' &&
c <=
'Z') ||
72 (
c >=
'0' &&
c <=
'9') ||
c ==
'_' ||
c ==
'$';
78 while ((pos = src.find(name, pos)) != std::string_view::npos) {
80 const std::size_t after = pos + name.size();
82 if (left_ok && right_ok)
return true;
101 std::vector<std::string> names;
A granted-capability set.
Definition reload_capabilities.hpp:74
void grant(ReloadCapability c)
Definition reload_capabilities.hpp:85
bool contains_call_token(std::string_view src, std::string_view name)
Whole-token match: name occurs bounded by non-identifier chars (so exec matches pulp....
Definition reload_autocaps.hpp:76
bool is_js_ident_char(char c)
Definition reload_autocaps.hpp:70
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
std::vector< std::string > infer_capability_names_from_js(std::string_view js_source)
The capability NAMES a scripted UI needs, sorted + de-duplicated — ready to drop into a manifest's de...
Definition reload_autocaps.hpp:99
const std::vector< std::pair< std::string_view, ReloadCapability > > & autocaps_function_table()
Effectful bridge function name → the capability that gates it.
Definition reload_autocaps.hpp:30
CapabilitySet infer_capabilities_from_js(std::string_view js_source)
Scan js_source and return the granted set it needs.
Definition reload_autocaps.hpp:90
@ c
Definition input_events.hpp:39
std::string_view capability_name(ReloadCapability c)
Stable wire name for a capability (used in the SIGNED pack manifest + config).
Definition reload_capabilities.hpp:45
@ RuntimeImport
evaluate a runtime-imported JS bundle (dynamic code load)
Definition reload_capabilities.hpp:38
@ Clipboard
read/write the system clipboard
Definition reload_capabilities.hpp:34
@ Ai
AI-CLI bridge.
Definition reload_capabilities.hpp:37
@ Storage
persistent key/value + preset temp files
Definition reload_capabilities.hpp:36
@ Exec
shell exec/execAsync — ALSO compiled out unless the PULP_DEV_BRIDGE_EXEC CMake option is ON (release/...
Definition reload_capabilities.hpp:32
@ Filesystem
read arbitrary file paths (asset file loads, native dialogs)
Definition reload_capabilities.hpp:35
@ Network
outbound network (reserved; used by remote-UX-push, not the bridge today)
Definition reload_capabilities.hpp:39