Skip to main content

Crate dist_agent_lang

Crate dist_agent_lang 

Source

Re-exports§

pub use ffi::security::FFIInputValidator;
pub use ffi::security::FFIResourceLimits;
pub use http_server_security::InputValidator;
pub use http_server_security::RateLimiter;
pub use http_server_security::RequestSizeLimiter;
pub use http_server_security::SecurityLogger;
pub use ffi::FFIConfig;
pub use ffi::FFIInterface;
pub use ffi::InterfaceType;
pub use lexer::tokens::Token;
pub use lexer::Lexer;
pub use parser::ast;
pub use parser::collect_warnings;
pub use parser::error::ParserError;
pub use parser::ParseWarning;
pub use parser::Parser;
pub use runtime::values::Value;
pub use runtime::Runtime;
pub use module_resolver::resolve_imports;
pub use module_resolver::ModuleResolver;
pub use module_resolver::ResolveError;
pub use module_resolver::ResolvedImport;
pub use module_resolver::ResolvedImportEntry;
pub use testing::MockBuilder;
pub use testing::MockFunction;
pub use testing::MockRegistry;
pub use testing::TestCase;
pub use testing::TestConfig;
pub use testing::TestResult;
pub use testing::TestRunner;
pub use testing::TestStatus;
pub use testing::TestSuite;

Modules§

agent_context_schema
Canonical agent context schema for P0 (Structured Prompt Context).
cli
CLI framework using clap (Phase 11: 09_CLI_EXPANSION_PLAN.md). Provides structured parsing, help layout, and §21 design hooks.
cli_design
CLI design: branding, help layout, and AI-ready structure.
compile
CT1/CT2/CT3/CT4: Compiler pipeline — driver, CompileBackend; blockchain, wasm, native, edge = real codegen. Wire: module resolution so dal build works with imports and multi-file projects. See docs/development/implementation/COMPILE_TARGET_IMPLEMENTATION_PLAN.md.
dal_summary
DAL summary for agent context (P3). Produces a serializable summary from parsed DAL (services, top-level functions, imports, capabilities) for inclusion in the prompt.
ffi
fleet
Fleet: named set of agents, optionally created from a mold (N instances). Off-chain only. Storage: in-memory; when base path is provided, also persisted to .dal/fleets.json. See COMPREHENSIVE_AGENT_AND_MOLD_PLANS.md §5.
http_server
http_server_converters
http_server_handlers
http_server_integration
http_server_middleware
http_server_security
http_server_security_middleware
ide
IDE backend: orchestration API, run backend, agent API, and LSP diagnostics. See docs/development/IDE design/.
lexer
manifest
M3: dal.toml and lockfile — parse [dependencies], resolve path deps, read/write dal.lock. Path-only resolution first; no registry fetch.
module_resolver
Module resolution (M2/M3): resolve import paths to stdlib, relative files, or packages.
mold
observability
Process-wide tracing (tracing + tracing-subscriber) and lightweight HTTP counters for operations (Prometheus text when DAL_METRICS=1).
parser
performance
project_init
Project init: run dal init logic from code (CLI and agent dal_init tool). Templates: general (main.dal), chain (chain.dal), iot (iot.dal), agent (agent.dal + evolve).
rag_retrieval
Lexical RAG MVP (BM25) over pre-built chunks.jsonl. See docs/development/RAG_MVP_SPEC.md.
registry
Package registry client (R1/R2/R4): fetch package tarball from HTTP URL or IPFS, unpack, cache; publish.
registry_paths
Path and name validation for the dal-registry HTTP server (src/bin/registry_server.rs). Kept in the library so unit tests and mutation testing can target this logic without the binary.
reporting
Central error formatting for production-grade diagnostics.
runtime
skills
Agent skills: extensible skill registry, .skill.dal loader, and prompt builder. See docs/SKILLS_DESIGN_PLAN.md.
solidity_converter
stdlib
testing
venv
First-class venv: named execution environment with root, deps, and security profile. See docs/VENV_FIRST_CLASS_DESIGN.md.

Macros§

nonreentrant
Macro for easy re-entrancy protection
profile
profile_end
profile_start

Constants§

MAX_PARSE_SOURCE_BYTES
Maximum DAL source size accepted by parse_source (bytes).
MAX_PARSE_TOKEN_COUNT
Maximum number of lexer::tokens::TokenWithPosition entries allowed after lexing (including the final EOF). The lexer uses this same value; it checks tokens.len() >= before each new non-EOF token, then appends EOF once. parse_source rejects len > MAX_PARSE_TOKEN_COUNT on the finished vector as defense in depth.

Functions§

execute_dal_and_extract_handlers
Execute DAL source and return (user_functions, scope) for HTTP server runtime factory. Use when you need to serve HTTP routes whose handlers are defined in DAL. The returned runtime state can be used with create_router_with_runtime_factory.
execute_dal_and_extract_handlers_with_path
Like execute_dal_and_extract_handlers but resolves imports using entry_path. Use this for dal serve <file> so that handlers and their imports (e.g. workflows.dal) load correctly and all @route handlers are registered. The third and fourth tuple values are stdlib import aliases and per-alias module exports; dal serve copies them into each per-request runtime.
execute_dal_file
Execute a DAL file (e.g. agent.dal for serve behavior). Resolves imports when present. Used by dal agent serve --behavior path so the script can spawn an agent and call agent::set_serve_agent(agent_id).
execute_dal_with_scope
Execute DAL code with pre-set scope variables (e.g. agent_id for lifecycle hooks).
execute_source
parse_source