Dsl

From Pandaala/Edgion · View interactive version

Dsl is an AI agent skill from the GitHub repository Pandaala/Edgion. DSL plugin implementation skills for Edgion — builtin development, path/uri variable reference, redis/http builtin guides. Use when adding or modifying a `req.*`, `http.*`, or `redis.*` builtin, or wiring DslRuntime fields for a new namespace.

How to use this skill

Skill file

DSL Plugin Implementation

Implementation-level guides for the EdgionDSL plugin: how to use the existing builtins from script-author and gateway-developer viewpoints, and how to add a new function inside an existing namespace.

Engine-internal architecture (VM, bytecode, panic isolation, DslRuntime lifecycle) lives in CODE0; user-facing syntax and the full function catalogue live under docs/en/user-guide/http-route/filters/edgion-plugins/dsl/.

Ownership is deliberately split across three layers:

Keep new code in the lowest layer that has the required dependencies; never move Gateway

runtime dependencies into the leaf DSL crate.

Body runtime policy belongs in Gateway-local lang/body_ops.rs, with one

execution-local account in lang/body_scan_budget.rs. Reuse that boundary for

new body scans; keep owned DSL JSON/regex scanners in lang/body_scanners.rs

and generic storage/range/UTF-8 mechanics in request_body. Mutations must

continue through PluginSession, and ordinary Body aliases must resolve the

current generation rather than retaining a snapshot or implicit cursor.

File list

| File | Topic |

|------|-------|

| builtins-path.md | req.path / req.uri / req.query and related path/uri/query variables: views, behavior, rewrite interaction, allocation cost |

| builtin-error-semantics.md | Error-handling contract for DSL builtins — which functions return nil / "" / false silently vs raise RuntimeError::ApiError; lock-in tests and "adding a new builtin" decision flow |

| http-call.md | http.call() builtin: async outbound HTTP, Value::Map return shape, SSRF guard, config fields, test patterns |

| redis-builtin.md | redis.* builtins: async LinkSys Redis interaction, named alias lookup, Map { ok, value, error } return shape, "Adding new redis.* functions" 5-step recipe |

Cross-references

When to use which file

Strict JSON reconstruction is owned by edgion-dsl/src/json.rs (shared strict

DOM/raw policy) and Gateway lang/json_builtins.rs / lang/body_ops.rs (body

policy/publication). Read the JSON ownership guard

before changing those primitives or their allocation/error contracts.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.