feat(core): add example plugin with declarative and imperative API examples

This commit is contained in:
Prad Nukala
2026-07-13 11:43:33 -04:00
parent cf75df6d5a
commit 79f0bce1a9
6 changed files with 333 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
--!nonstrict
-- Headless [[service]] entry: runs in the background with no UI, ticking once a
-- second and publishing an incrementing counter to the plugin's shared state.
-- Any of this plugin's entries (the hello widget) can read it with
-- noctalia.state.get / noctalia.state.watch.
local count = 0
-- Drive this service's own tick rate
noctalia.setUpdateInterval(1000)
function update()
count += 1
noctalia.state.set("tick", count)
end