summaryrefslogtreecommitdiff
path: root/panto-agent/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'panto-agent/init.lua')
-rw-r--r--panto-agent/init.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/panto-agent/init.lua b/panto-agent/init.lua
new file mode 100644
index 0000000..017f4ee
--- /dev/null
+++ b/panto-agent/init.lua
@@ -0,0 +1,20 @@
+-- panto-agent: the agent.* extension suite for pantograph.
+--
+-- Returns the list of extension entries this rock provides. Works both
+-- installed as a rock (`require("panto-agent")`, submodules namespaced)
+-- and as a directory source via `extensions.paths` (siblings on
+-- `package.path`).
+
+local function sub(name)
+ -- Truncate to one value: require returns (module, loaderdata) and a
+ -- trailing multi-value would expand inside the entries list below.
+ local ok, mod = pcall(require, "panto-agent." .. name)
+ if ok then return mod end
+ local fallback = require(name)
+ return fallback
+end
+
+return {
+ sub("rules"),
+ sub("skill"),
+}