— annexes A · C · D —

Référence des builtins

879 fonctions natives · familles thématiques · généré depuis le registre stable du serveur

Chargement…

Admin & workspace

api-create

[api-create name]

Create workspace & generate API key.

clear

[clear mode?]

Vide le contexte. Modes: 'vars', 'macros', 'kb', 'all' (défaut).

file-tree

[file-tree path?]

Get JSON directory tree.

freespace

[freespace path?]

JSON {path,total,used,free,total_h,used_h,free_h,percent_used} for the disk hosting `path` (default: cwd).

log-clear

[log-clear file]

Empty a log file.

log-list

[log-list]

List available log files (name, label, size, mtime).

log-tail

[log-tail file n]

Read last n lines of log.

proadmin

[proadmin email pass]

Elevate privileges.

proai-validator

[proai-validator JSON|fichier]

Valide statiquement un fichier .proai (chemin ou JSON inline). Retourne le rapport Markdown.

role-define

[role-define name cap1 cap2 …]

crée/maj un rôle custom (ROOT). Caps du vocabulaire fermé.

role-delete

[role-delete name]

supprime un rôle custom (ROOT). Les rôles built-in sont protégés.

role-list

[role-list]

JSON {role: [caps]} de tous les rôles (built-in + custom).

sys-info

[sys-info]

Get system threads/platform info.

user-add

[user-add email pass nom prenom]

Create user.

user-delete

[user-delete email]

Delete user.

user-list

[user-list]

List all users (admin).

user-role

[user-role email]

rôle courant | [user-role email role] -> assigne le rôle (ROOT).

user-update

[user-update email pass nom prenom]

Update user.

webdriver-config

[webdriver-config]

Show machine fingerprint + profiles path. [webdriver-config path] -> Set profiles path for this machine.

workspace

[workspace list|login|go ...]

Manage workspace context.

workspace-set

[workspace-set email ws]

Grant access.

workspace-unset

[workspace-unset email ws]

Revoke access.

Algorithmes génétiques

genetic:add-counter

[genetic:add-counter $store $record $expected [$actual] [$weight=5.0]]

$store. Mutates and returns the store (chainable).

genetic:best

[genetic:best $pop]

the Individual with the highest scalar fitness.

genetic:counter-size

[genetic:counter-size $store]

integer count of stored corrections.

genetic:counter-store

[genetic:counter-store [schema?]]

empty CounterStore. Accumulates human corrections; pass to [genetic:fit-with-counter] to fold them into a fitness spec.

genetic:evolve

[genetic:evolve $pop $fitness-spec [opts-json]]

evolved Population. fitness-spec is a JSON dict {kind, dataset, label_field, ...}; opts-json supports {generations, mutation_rate, crossover_rate, elitism, tournament_k, seed, plateau_window}.

genetic:fit-with-counter

[genetic:fit-with-counter $fit-spec-json $store [weight=0.5]]

enriched JSON. Injects $store.examples + counter_weight into a fitness spec for use by [genetic:evolve]. Final fitness = (1-w)*holdout + w*counter.

genetic:fitness

[genetic:fitness $individual]

scalar fitness (or list for multi-objective).

genetic:lineage

[genetic:lineage $individual]

JSON {generation, parents, mutation_op}.

genetic:pareto

[genetic:pareto $pop]

list of Individuals on the non-dominated front. Use with multi-objective fitness specs (kind: multi_objective) to expose the trade-off frontier between objectives (e.g. precision vs parsimony vs cost).

genetic:population

[genetic:population genome1 genome2 ...]

Population. Each argument is a complete genome (typically a list of rule dicts).

Approximation

approximation:confidence

[approximation:confidence $approx]

'exact'|'high'|'moderate'|'low'.

approximation:from-ilp

[approximation:from-ilp $learn_result [value?]]

VVL_Approximation. Wraps an ILP LearnResult so its trust level propagates through arithmetic BinOps.

approximation:llm-weight

[approximation:llm-weight LOGPROB]

calibrated weight in [0, 1]. Pass an OpenAI top_logprob. Buckets: ≥-0.5 → 0.3, [-2, -0.5) → 0.7, <-2 → 1.0.

approximation:make

[approximation:make VALUE ASSUMPTIONS_JSON [QUESTION?]]

VVL_Approximation. Each assumption: {name, value, source: user|fact|LLM|computation, concept?, weight?}.

approximation:range

[approximation:range $approx]

'low - high' string sized by Σ weight_llm.

approximation:revise

[approximation:revise $approx OVERRIDES_JSON]

new VVL_Approximation. Re-runs the stored code with assumption values overridden. Keys are either bare names or 'Concept.field'. Overridden assumptions are re-tagged source='user' so confidence improves.

approximation:scalars

[approximation:scalars $approx]

JSON list of {name, value, range, confidence}. Per-field range estimates for Concept-shaped results.

approximation:sensitivity

[approximation:sensitivity $approx [pct=0.10]]

JSON list of records ranked by impact. Each LLM-source numeric assumption is perturbed by ±pct, the stored code is re-run, and the result delta is captured. Tells you which LLM estimates dominate the final answer.

approximation:trace

[approximation:trace $approx]

JSON {value, confidence, n_*, w_*, range, assumptions}.

approximation:value

[approximation:value $approx]

numeric value (or string if non-numeric).

Async & concurrence

async

[async expression]

Execute asynchronously, returns Promise

await

[await promise] [await promise ms]

Wait for promise resolution (timeout in milliseconds).

channel

[channel capacity?] | [channel name capacity?]

Create/get a channel. capacity=0 is unbuffered; capacity>0 is buffered.

channel-delete

[channel-delete name]

Delete a named channel from registry (returns 1/0)

channel-exists

[channel-exists name]

Check if a named channel exists (returns 1/0)

channel-list

[channel-list]

List all named channels (sorted alphabetically)

getTimeout

[getTimeout]

Current blocking timeout, in milliseconds.

host-continuation-proxies

[host-continuation-proxies]

Inspect VVL proxy descriptors for active host continuations

host-continuation-transfer

[host-continuation-transfer proxy_id|proxy]

Return VM transfer decision for a host-continuation proxy

host-continuation-vm-proxy

[host-continuation-vm-proxy proxy_id vm_task_id resource_kind? operation?]

Build a VM-managed continuation proxy descriptor

host-continuations

[host-continuations]

Inspect active Python host continuations created by blocking waiters

promise-all

[promise-all list ms?]

Wait for all promises (timeout in milliseconds).

promise-race

[promise-race list ms?]

First resolved promise wins (timeout in milliseconds).

promise-state

[promise-state promise]

Get promise state without blocking

promise-value

[promise-value promise]

Get value if resolved, else empty

rwait

[rwait ms]

Wait for ms milliseconds, returns signal

semaphore

[semaphore name? n?]

Create or retrieve a named/anonymous semaphore with initial count n (default: 1)

semaphore-delete

[semaphore-delete name]

Delete a named semaphore from registry (returns 1/0)

semaphore-exists

[semaphore-exists name]

Check if a named semaphore exists (returns 1/0)

semaphore-list

[semaphore-list]

List all named semaphores (sorted alphabetically)

setTimeout

[setTimeout ms]

Default timeout for blocking operations, in milliseconds (0=infinite).

signal

[signal]

Return a successful completion signal

stop

[stop]

Stop current parallel branch cleanly

task-async

[task-async queue graph params]

Enqueue task and return Promise

Atomes & policies

atom:axes

[atom:axes $x]

JSON dict of metadata axes (payload_kind, effect_kind, determinism, persistence, trust_level, provenance, cost_hint, latency_hint).

atom:capabilities

[atom:capabilities $x]

list of capability protocol names the atom satisfies (Introspectable, Identifiable, Featurizable, LLMRepresentable, Persistable, Callable, Traceable, ...).

atom:family

[atom:family $x]

string family name (SymbolicAtom/GroundedAtom/ReifiedAtom) or ''.

atom:trace

[atom:trace $x]

JSON {family, class, runtime_id, content_hash, axes, dump, ...} structured trace of any atom.

policy:check

[policy:check $policy $atom]

JSON {allowed, matched_rule, action, axis, op, values, reason}. Walks rules in order; first match wins. No-match defaults to deny.

policy:define

[policy:define [list "allow|deny" AXIS [OP] VALUES...] ...]

Policy. Axes: family, payload_kind, effect_kind, determinism, persistence, trust_level, provenance, cost_hint, latency_hint, capabilities. Ops: in (default), ==, !=, >, <, >=, <=. Default action: deny.

Autres

@

[@ "Name"]

Reify concept (free). [@ "Name" ClassName] -> Reify with class template. [@ "Name" "lazy"] -> No bootstrap.

email

[email action ...]

Protocol-level email (SMTP/IMAP/POP3). connect: [email connect name protocol host port user pass] disconnect: [email disconnect name] list: [email list] send: [email send name to subject body] or [email send name <{spec}>] folders: [email folders name] inbox: [email inbox name folder? limit?] search: [email search name criteria folder? limit?] read: [email read name uid folder?] flag: [email flag name uid flag folder?] unflag: [email unflag name uid flag folder?] move: [email move name uid dest source?] delete: [email delete name uid folder?] save: [email save name uid dir folder?] pop-list: [email pop-list name] pop-read: [email pop-read name index] pop-delete: [email pop-delete name index]

getResourceBase64

[getResourceBase64 $res]

Return base64 PNG data.

getResourceBase64ZIP

[getResourceBase64ZIP $res]

Return base64 ZIP-compressed PNG.

pis

[pis url user pass]

Client PIS (Partner Information System). Methodes: ping, partners, partner, clients, distributors, create_partner, save_partner, search_partner, change_partner, locations, location, create_location, save_location, location_state, location_parts, search_location, parts, part, create_part, create_parts, update_part, search_part, unconfirmed_parts, orders, order, client_orders, create_order, assign_order, set_order_state, search_order, systems, system, client_systems, save_system, copy_system, release_system, search_system, systems_by_parts, contacts, contact, create_contact, save_contact, remove_contact, approve_contact, send_approve_mail, user_exists, search_user, part_types, part_type, search_parttype, templates, template, search_template, countries, has_backup, backups, activate_space, me, raw

tekitisy

[tekitisy url login password]

Client de gestion de sites Tekitisy. Connexion VDOM + auto-deploiement du plugin_gateway si absent. Commandes client: [$tk "sites"] -> liste des sites/plugins [$tk "site" "NomSite"] -> selectionne un site Commandes site: [$site "pages"] -> liste des pages HTML [$site "upload" "name" $html] -> upload une page [$site "upload-file" "n" "path"] -> upload depuis fichier [$site "upload-dir" "path/"] -> upload un dossier [$site "download" "name"] -> telecharge une page [$site "delete" "name"] -> supprime une resource [$site "routing"] -> code routing actuel [$site "set-routing" $code] -> remplace le routing [$site "add-route" "/url" "f"] -> ajoute une route [$site "auto-routing"] -> genere routing auto [$site "inject" "seo" "p" $m] -> injecte SEO [$site "inject" "cookie" "p"] -> injecte cookies RGPD [$site "inject" "mobile-menu" "p"] -> menu mobile [$site "fix-links" "p" $map] -> corrige les liens [$site "deploy" "dir/" $opts] -> deploiement complet [$site "macros"] -> liste macros serveur [$site "macro-code" "name"] -> code macro [$site "set-macro" "n" $code] -> modifie macro [$site "kv"] -> KV storage [$site "kv-get" "key"] -> lire valeur [$site "kv-set" "k" "v"] -> ecrire valeur [$site "status"] -> resume complet

Bases relationnelles

db

[db action name args...]

SQLite operations (open, query, exec, tables).

mssql

[mssql action alias ...]

Execute a SQL Server operation. Actions: connect/disconnect/list/exec/query/table/begin/commit/rollback/autocommit/tables/schema. See vvl_mssql.

pg

[pg conn_string|action ...]

Execute a PostgreSQL operation. See vvl_pg for connection/query syntax.

CSV

CSV

[CSV "filename.csv"]

Create or load a CSV file (extension optional).

csv-add

[csv-add $csv record]

Add a record to the CSV.

csv-all

[csv-all $csv]

Get all records as a list.

csv-autosave

[csv-autosave $csv enabled]

Toggle per-mutation auto-save. Set false for bulk inserts (avoids O(N^2) rewrites), then [csv-save].

csv-count

[csv-count $csv]

Get the number of records.

csv-create-index

[csv-create-index $csv field]

Crée un index sur un champ pour accélérer les recherches.

csv-delete

[csv-delete $csv key]

Delete a record by primary key.

csv-erase

[csv-erase $csv]

Clear all data and schema.

csv-filter

[csv-filter $csv lambda]

Filter records using a predicate function.

csv-find

[csv-find $csv key]

Find a record by primary key.

csv-grid

[csv-grid $csv field1 val1 [field2 val2 ...] value_field]

Lookup de grille N-D rapide (natif, sans lambda) : filtre chaque axe par field>=val, retourne value_field de la ligne au plus petit palier du 1er axe.

csv-key

[csv-key $csv fieldname]

Set the primary key field.

csv-orderby

[csv-orderby $csv fieldname]

Set sort order and sort data.

csv-reload

[csv-reload $csv]

Reload data from disk.

csv-save

[csv-save $csv]

Force save to disk (auto-save by default).

csv-setfield

[csv-setfield $csv name type]

Add/modify a field in the schema.

csv-update

[csv-update $csv key updates]

Update a record by primary key.

csv-where

[csv-where $csv field op value]

Filtrage rapide sans lambda. Ops: =, !=, >, <, >=, <=, contains, startswith, endswith.

csv-where-indexed

[csv-where-indexed $csv field value]

Recherche ultra-rapide sur champ indexé (O(1)).

Calcul symbolique

proof:auto

[proof:auto P]

{status: proved|refuted|unknown, by, justification, counterexample?}.

proof:check

[proof:check GOAL TERME]

vérifie un terme de preuve (déduction naturelle ; feuilles 'auto' déchargées par l'oracle).

proof:llm

[proof:llm GOAL max?]

le LLM propose un terme de preuve, le noyau LCF le vérifie et réinjecte l'erreur (verdict kernel-checked ou échec honnête).

proof:repair

[proof:repair GOAL $proposer max?]

boucle noyau générer→vérifier→réparer (proposer = lambda [feedback] -> source d'un terme de preuve).

symbolic

[symbolic x | x y z | EXPR]

déclare un/des symbole(s) ou réifie une expression.

symbolic:assume

[symbolic:assume x "positive" …]

symbole avec hypothèses.

symbolic:det

[symbolic:det M]

déterminant.

symbolic:diff

[symbolic:diff e var n?]

dérivée.

symbolic:dsolve

[symbolic:dsolve eq func]

résout une équation différentielle.

symbolic:eq

[symbolic:eq lhs rhs]

équation.

symbolic:exact

[symbolic:exact EXPR question?]

Approximation exacte (résultat CAS).

symbolic:expand

[symbolic:expand e]

forme développée.

symbolic:factor

[symbolic:factor e]

forme factorisée.

symbolic:fn

[symbolic:fn f x [y …]]

fonction indéfinie f(x,…).

symbolic:integrate

[symbolic:integrate e var (a b)?]

primitive/intégrale.

symbolic:inv

[symbolic:inv M]

matrice inverse.

symbolic:lambda

[symbolic:lambda x [y …] body]

Lambda symbolique, appliquée via [$f arg].

symbolic:latex

[symbolic:latex e]

chaîne LaTeX.

symbolic:limit

[symbolic:limit e var to]

limite.

symbolic:matrix

[symbolic:matrix <[[...]]>]

matrice symbolique.

symbolic:numeric

[symbolic:numeric e digits?]

évaluation numérique.

symbolic:parse

[symbolic:parse "x**2-1"]

expression.

symbolic:rational

[symbolic:rational p q]

rationnel exact.

symbolic:simplify

[symbolic:simplify e]

forme simplifiée.

symbolic:solve

[symbolic:solve eq var?]

solutions de eq=0.

symbolic:solve-linear

[symbolic:solve-linear A b]

solution de A·x=b.

symbolic:solveset

[symbolic:solveset eq var]

ensemble-solution.

symbolic:string

[symbolic:string e digits?]

chaîne sympy ; avec digits, évalue d'abord à cette précision (seule voie au-delà de 17 chiffres).

symbolic:subs

[symbolic:subs e var val [var val …]]

substitution(s).

symbolic:transpose

[symbolic:transpose M]

transposée.

Catalogue génériques

generic

[generic "question" "name"?]

Generalise une resolution en keyword catalogue. Le mode trace suit ctx.trace (REPL :t).

generic:code

[generic:code name]

Retourne le code source VVL du keyword memorise.

generic:contract

[generic:contract name]

Retourne les parametres et le contrat de sortie.

generic:evolve

[generic:evolve name]

Regenere l'entree generic a partir de la question source en conservant le nom.

generic:forget

[generic:forget name]

Supprime une entree generic du catalogue et ses artefacts.

generic:info

[generic:info name]

Retourne la fiche complete d'une fonction generic.

generic:invoke

[generic:invoke "name" ...]

Helper interne pour executer un generic-generated keyword avec preservation des approximations.

generic:list

[generic:list status?]

Liste les fonctions generic du catalogue workspace.

generic:load

[generic:load name]

Charge le keyword memorise dans le contexte courant.

generic:pseudocode

[generic:pseudocode name]

Regenere un pseudo-code markdown a partir du catalogue.

generic:tests

[generic:tests name]

Retourne les tests ou cas de validation memorises.

generic:validate

[generic:validate name]

Execute les tests memorises et met a jour le score de validation.

Chaînes

contains

[contains collection item]

1 if list/string contains item.

endsWith

[endsWith string suffix]

1 if string ends with suffix.

graphemes

[graphemes string]

List of Unicode grapheme clusters (= String.graphemes/1).

instr

[instr needle haystack [start] [compare]]

Find first occurrence (1-based), returns position or 0

instrall

[instrall needle haystack [compare]]

Find all occurrences, returns list of positions (1-based)

instrrev

[instrrev needle haystack [start] [compare]]

Find last occurrence (1-based), returns position or 0

join

[join list separator]

Join list elements with separator (default empty).

lower

[lower s]

Lowercase (prefix alias of the .lower method).

mid

[mid start length string]

Extract substring (1-based, length=0 means until end).

pad-end

[pad-end s largeur motif?]

Complete s A DROITE jusqu'a `largeur` grapheme(s) (= padEnd / ljust). Motif par defaut " ".

pad-start

[pad-start s largeur motif?]

Complete s A GAUCHE jusqu'a `largeur` grapheme(s) (= padStart / rjust). Motif par defaut " ".

replace

[replace regex new string]

Regex substitution.

sha256

[sha256 string]

Lowercase hex digest of the UTF-8 bytes of string.

split

[split sep string]

List of parts (sep "" -> graphemes).

startsWith

[startsWith string prefix]

1 if string starts with prefix.

strToLowerCase

[strToLowerCase s]

Lowercase.

strToUpperCase

[strToUpperCase s]

Uppercase.

substring

[substring s start len?]

Substring; start is 1-based (negative counts from the end), optional length. Aligned with the native VM builtin.

trim

[trim s]

Strip leading/trailing whitespace (prefix alias of .trim).

upper

[upper s]

Uppercase (prefix alias of the .upper method).

Cluster de calcul distribué

cluster:audit

[cluster:audit filters?]

événements JSON ordonnés. Filtres: job_id, after_event_id >= 0, limit 1..1000 (défaut 100). Sert à parcourir le journal persistant de cycle de vie sans lire les payloads. Capability: cluster:admin.

cluster:await

[cluster:await job timeout_seconds?]

progress JSON. Attend DONE, FAILED ou CANCELED; timeout par défaut: 60 s. Un timeout interrompt seulement l'attente et ne supprime pas le job. Capability: cluster:read.

cluster:backup

[cluster:backup]

{path,status}. Crée à chaud un snapshot cohérent de la base SQLite, du code immuable et du CAS de payloads/résultats. La restauration reste une opération hors ligne. Capability: cluster:admin.

cluster:call

[cluster:call function_ref arg...]

value. Charge une fonction enregistrée par son sha256, contrôle son arité et l'exécute localement dans la VM. Utile pour valider exactement le code avant cluster:map. Rôles: standalone/master.

cluster:cancel

[cluster:cancel job]

{job_id,status}. Demande l'annulation du job visible dans le workspace courant et annule ses shards en attente ou loués selon le protocole du scheduler. Capability: cluster:submit.

cluster:drain

[cluster:drain worker_id enabled?]

worker JSON. En master, active le drain par défaut (plus de nouvelles leases) ou reprend le worker avec false/0/off. Les tâches déjà actives ne sont pas interrompues. Capability: cluster:admin.

cluster:gc

[cluster:gc min_age_seconds?]

{blobs,code}. Supprime seulement les objets CAS non référencés plus anciens que l'âge donné; défaut 3600 s, minimum 0. Retourne les bilans séparés des blobs et du code. Capability: cluster:admin.

cluster:jobs

[cluster:jobs filters?]

liste de progress JSON. Liste les jobs du workspace courant, du plus récent au plus ancien. Filtres JSON: status (PENDING|RUNNING|REDUCING|CANCELING|DONE|FAILED|CANCELED), limit (1..1000, défaut 100). Capability: cluster:read.

cluster:map

[cluster:map function_ref items options?]

job handle JSON. Soumet une liste non vide sous forme de shards persistants. Options JSON: args, parallelism, reduce/reducer (collect|sum|min|max|count|concat|none), shards ou shard_size, priority, max_attempts, task_timeout_seconds, job_timeout_seconds, required_tags. Capability: cluster:submit. Rôles: standalone/master.

cluster:metrics

[cluster:metrics]

metrics JSON. Instantané borné des jobs et tâches par état, workers, slots total/libres, tentatives, temps de calcul et objets CAS payload/result (nombre et octets). Capability: cluster:admin.

cluster:register

[cluster:register [keyword name `body]]

sha256 function_ref. Compile le keyword avec le compilateur canonique, vérifie qu'il est fermé, pur et distribuable, puis stocke son IR par contenu. Le résultat peut être passé à cluster:call ou cluster:map. Les formes natives pures incluent while, for, map, filter, take, les collections, chaînes et JSON. Capability: cluster:code. Rôles: standalone/master.

cluster:result

[cluster:result job pagination?]

value ou page JSON. Le job doit être DONE. Pour un résultat liste, pagination peut être {offset:0,limit:1000}; la page contient items, total et next_offset. Capability: cluster:read.

cluster:status

[cluster:status job]

progress JSON. Accepte un job_id ou le handle rendu par cluster:map et retourne état, progression, compteurs de shards, dates et erreur. Le job doit appartenir au workspace courant. Capability: cluster:read.

cluster:workers

[cluster:workers]

workers JSON. Retourne les workers distants enregistrés, leur descriptor, capacité, slots, heartbeat et état de santé. Sur un master, lance d'abord la maintenance des états. Capability: cluster:admin.

Compute / Optimisation

optimize

[optimize "NL description" "name"]

compile a natural-language optimization request to a [optimize:problem ...] block via LLM, parse, and register. Cached in .optimize_nl_cache.json. Inspect via [optimize:code name] before solving.

optimize:code

[optimize:code name]

dump the registered problem as a VVL [optimize:problem ...] string. Inspectable, copy-paste'able, useful for problems generated from NL via [optimize "..." name].

optimize:explain

[optimize:explain name]

human-readable rendering of the compiled CP-SAT model: variables (with source), constraints, objective.

optimize:problem

[optimize:problem name (schema class)? body...]

register a CP-SAT problem. Schema/class are optional: in pure-local mode, declare decision vars via [decision $x Type [min L] [max H]] in the body. Body forms (Sprint 1): [decision $x Type [min L] [max H]], [maximize expr], [minimize expr], [assert expr].

optimize:report

[optimize:report name]

after solving, render a human-readable summary of the assignment via LLM. Combines [optimize:code] output and the last [optimize:solve] result.

optimize:solve

[optimize:solve name [time_limit secs] [backend "cp-sat"]]

solve and return a VVL_OntologyInstance (ontology mode) or a result string (local mode). Only [backend "cp-sat"] is supported in Sprint 1.

optimize:validate

[optimize:validate name]

structural diagnosis of the registered problem. Lists every non-compilable expression with an actionable fix suggestion. Works even when [optimize:problem] returned an error.

optimize:why-infeasible

[optimize:why-infeasible name]

after [optimize:solve] returns INFEASIBLE, isolate the minimal set of [assert] constraints whose intersection is unsatisfiable, via CP-SAT assumption literals.

Configuration

config-cluster

[config-cluster <field> <value>] (admin)

écrit <CLUSTER> dans vvl.config.

config-cluster-show

[config-cluster-show] (admin)

configuration cluster, token masqué.

config-cluster-worker-token

[config-cluster-worker-token <worker-id> <token> [previous-token]] (admin)

configure un secret lié à un worker; token vide = suppression.

config-gateway-token

[config-gateway-token <token>] (admin)

écrit <GATEWAY><AUTHTOKEN>.

config-geo-key

[config-geo-key <key>] (admin)

écrit <GEO><GOOGLE-API-KEY>.

config-jev

[config-jev <field> <value>] (admin)

writes <JEV> in vvl.config. field: account-id|token|model|provider|threshold|timeout. [config-jev show] (token masked), [config-jev test] (real call).

config-llm

[config-llm <field> <value>] (admin)

écrit <LLM> dans vvl.config. field: key|model|agent|max-tokens|provider|endpoint|embedding|image|vision|temperature.

config-rest

[config-rest <host> <port>] (admin)

écrit <REST> (effet au prochain démarrage REST).

config-root-password

[config-root-password <pwd> [user]] (admin)

écrit <SECURITY> (hash root).

config-show

[config-show] (admin)

résumé de la config (secrets masqués).

setting

[setting "nom"]

valeur courante ; [setting "nom" valeur] -> la pose, l'applique et l'ecrit dans <TUNING> de vvl.config (persistant). Remplace les variables d'environnement VVL_*.

setting-reset

[setting-reset "nom"]

retire la valeur (runtime + config), retour au defaut.

settings

[settings]

inventaire des reglages : nom, valeur, defaut, origine, doc.

Contrats & vérification

contract

[contract [params] [require "…"]… [ensure "…"]… body]

fonction à contrat (pré/post vérifiées à l'appel).

contract:info

[contract:info keyword]

the contract of a [keyword] as JSON (args, require, ensure, returns, mode).

contract:mode

[contract:mode] / [contract:mode "enforce"|"warn"|"off"]

session-wide mode of keyword contracts.

contract:ontology

[contract:ontology [params] [into <abstract>] [satisfies s] [require "…"]… [ensure "…"]… [retry n] [on-fail graceful|raise] [commit] body]

producteur LLM contractuel auto-réparant : produit -> valide (satisfies_hybrid seuillé + ensure) -> si échec, réinjecte l'erreur dans le producteur et relance (retry).

contract:verify

[contract:verify $fn | keyword]

vérifie statiquement requires ⟹ ensures (exéc. symbolique + [proof:auto]).

contract:warnings

[contract:warnings] / [contract:warnings clear]

violations recorded in warn mode (keyword, kind, message).

verify:approx

[verify:approx P]

VVL_Approximation (confidence = provenance de la preuve).

verify:repair

[verify:repair $proposer max?]

boucle générer→vérifier→réparer (proposer enfichable).

Contrôle de flux

and

[and a b ...]

1 si TOUS les arguments sont vrais, sinon 0.

attempt

[attempt expr]

Return JSON {"ok":true,"value":...} or {"ok":false,"error":{type,message}}.

break

[break] ou [break valeur]

sort de la boucle [for]/[while] en cours.

continue

[continue]

passe a l'iteration suivante de la boucle [for]/[while].

delay

[delay ms]

Pause execution. Cooperative: checks stop signal every 100ms.

do

[do expr1 expr2 ...]

Sequential evaluation. Stops on stop_signal, returns last expression's value.

exit

[exit val?]

Raise the stop signal in this context (returns the value).

if

[if cond then else?]

Conditional. Returns then-branch if cond truthy, else-branch otherwise (or empty).

not

[not val]

1 si val est faux/vide, sinon 0.

or

[or a b ...]

1 si AU MOINS un argument est vrai, sinon 0.

race

[race expr1 expr2 ...]

Course concurrente : premiere valeur non-null, branches perdantes elaguees.

raise

[raise "message"] ou [raise "type" "message"]

lève une erreur, attrapable par [try] / [attempt].

silent

[silent expr1 expr2 ...]

Execute exprs but always return "".

switch

[switch val case1 body1 ... _ default?]

Match val against cases. '_' matches anything.

timeout

[timeout ms expr]

Execute with time limit. Raises StopBranchException on timeout (catchable via ~>).

try

[try try-body catch-body]

Run try-body, on exception bind $__error and run catch-body.

try:json

[attempt expr]

Return JSON {"ok":true,"value":...} or {"ok":false,"error":{type,message}}.

when

[when cond body]

Execute body only if cond is truthy.

while

[while body]

Loop while body is truthy. Hard cap at 100k iterations.

Crédits d'appels

billing-credit

[billing-credit ws amount expiry? note?]

Add credits; expiry = days (number) or "YYYY-MM-DD", default never (root).

billing-history

[billing-history ws limit?]

JSON ledger, newest first (default 100 entries) (root).

billing-list

[billing-list]

JSON overview of every workspace: mode, balance, 30-day usage and totals (root).

billing-mode

[billing-mode ws "metered"|"unlimited" low_threshold?]

Switch the billing mode of a workspace (root).

billing-reset

[billing-reset ws note?]

RAZ: the balance of the workspace drops to 0 (root).

billing-set

[billing-set ws amount expiry? note?]

Force the balance to an exact value (root).

billing-status

[billing-status ws]

JSON: mode, balance, credit lots (with expiry) and usage of a workspace (root).

billing-usage

[billing-usage ws days?]

JSON daily consumption (calls, credits spent, rejected) over N days, default 30 (root).

Diagnostic bayésien

diagnose

[diagnose kb "obs."]

Reiter-style abductive diagnosis: minimal conflicts + minimal revocation sets (hitting sets) ranked by belief cost. Functional reading p(keys..., value); `not GOAL.` supported. Only ANNOTATED clauses are revocable.

diagnose:repair

[diagnose:repair kb "obs." mode? pick?]

apply a diagnosis: facts are retracted, rules get their Beta belief degraded (mode "soft") or retracted too (mode "hard"). pick = 1-based diagnosis index.

diagnose:why-not

[diagnose:why-not kb "goal." depth?]

positive abduction: minimal missing-fact sets that would derive the goal (depth-bounded).

Divers

chr

[chr codepoint]

Single character from Unicode codepoint.

guid

[guid]

Generate a UUID (Universally Unique Identifier)

ord

[ord char]

Unicode codepoint of first character.

random

[random n]

Random integer in [0, n). Equivalent to Orc Random(n).

timestamp

[timestamp]

Return current timestamp in milliseconds (epoch).

Factur-X

Factur-X

[Factur-X $pdf <data> "out.pdf" $options?]

VVL_Pdf. Wraps a PDF into Factur-X (PDF/A-3 + CII XML). <data> is either a [Fx-Invoice ...] DSL list, a Json invoice dict, or an XML string/path. Profiles: MINIMUM, BASIC WL, BASIC, EN 16931, EXTENDED, XRECHNUNG. Options: profile, lang, auto_profile, check_xsd, additional_attachments.

Fibers

fiber-alive

[fiber-alive $fiber]

Check if a fiber is still active (1) or completed (0). Alternative: $fiber.alive. Example: [while [fiber-alive $gen] ...]

fiber-load

[fiber-load $json]

Reconstruit une fiber depuis le JSON de [fiber-save] et reprend l'exécution là où elle s'était arrêtée.

fiber-resume

[fiber-resume $fiber]

Resume execution of a fiber and return the next yielded value. Returns empty string if fiber is complete. Alternative: $fiber.resume. Example: [fiber-resume $gen]

fiber-save

[fiber-save $fiber]

Sérialise une fiber VM SUSPENDUE en JSON (continuation transportable : autre process, après redémarrage, autre machine). Reprenable via [fiber-load].

fiber-to-list

[fiber-to-list $fiber]

Collect all remaining values from a fiber into a list. Consumes the fiber completely. Alternative: $fiber.to-list. Example: [fiber-to-list $gen]

session-load

[session-load $json]

Restaure une session depuis [session-save] dans le contexte courant (variables + fibers reprises). Renvoie <{restored, dropped}>.

session-save

[session-save]

Sérialise TOUTE la session (variables + fibers en cours) en JSON transportable. Valeurs non sérialisables listées dans `dropped`. Restaurable via [session-load].

spawn

[spawn keyword args...] or [spawn lambda args...]

Create a fiber/generator from a keyword or lambda. Returns a fiber object that yields values lazily. Example: $gen = [spawn [counter 10]]

stream-pipe

[stream-pipe $fiber lambda]

Transform a fiber's values through a lambda function. Returns a new fiber with transformed values. Example: [stream-pipe $nums [lambda [$x] [* $x 2]]]

yield

[yield value]

Suspend execution and return a value from a fiber. Can only be called inside a fiber context. Example: [for $i [range 10] [yield $i]]

Filesystem

file-append-b64

[file-append-b64 "path" "base64_content"]

Append binary data (base64-decoded) to a file (creates it if absent).

file-delete

[file-delete "path"]

Delete file or directory (robust, with retries on Windows).

file-read

[file-read "path"]

Read text from workspace (jail).

file-read-b64

[file-read-b64 "path"]

Read binary file as base64 string.

file-rename

[file-rename "old_path" "new_name"]

Rename file/dir within same parent.

file-write

[file-write "path" "content"]

Write text in workspace (jail).

file-write-b64

[file-write-b64 "path" "base64_content"]

Write binary file from base64.

ls

[ls "/path"?]

JSON list of {name,type,size,modified} for directory entries.

Google APIs

calendarCreate

[calendarCreate summary startISO endISO desc?]

Create event.

calendarList

[calendarList max]

List upcoming events.

gmailList

[gmailList query max]

List unread emails (JSON).

gmailSend

[gmailSend to subject body]

Send an email.

Géo & routing

geo:coords

[geo:coords "city or address"]

{lat, lon, name, source}. source ∈ {offline, google, google-cache}. Offline first (cities-fr.csv), Google Geocoding fallback if GOOGLE_MAPS_API_KEY is set.

geo:distance

[geo:distance "src" "dst"]

integer km. Alias for haversine with string inputs.

geo:haversine

[geo:haversine A B]

integer km (great-circle). A/B are either {lat, lon} JSON or strings (resolved via [geo:coords]).

geo:store-info

[geo:store-info]

{offline_cities, google_api_key_configured}. Useful to verify the geo backend status.

route:matrix

[route:matrix [list src...] [list dst...]]

matrix of km between every (src, dst) pair. Output is a VVL list-of-lists of integers, consumable by [for] inside [optimize:problem] for distance coefficients.

HTTP

httpDELETE

[httpDELETE url headers?]

DELETE; headers optionnels (dict JSON). Retourne VVL_String sur 2xx, VVL_Json {error,status,body} sur >=400.

httpGET

[httpGET url headers?]

GET; headers optionnels (dict JSON). Retourne VVL_String sur 2xx, VVL_Json {error,status,body} sur >=400.

httpPATCH

[httpPATCH url body headers?]

PATCH avec body texte/JSON. Retourne VVL_String sur 2xx, VVL_Json {error,status,body} sur >=400.

httpPOST

[httpPOST url body headers?]

POST with text/JSON body and optional headers.

httpPUT

[httpPUT url body headers?]

PUT avec body texte/JSON. Retourne VVL_String sur 2xx, VVL_Json {error,status,body} sur >=400.

json-rpc

[json-rpc url service method args?]

Call a JSON-RPC 2.0 endpoint. Builds the envelope, POSTs, returns the parsed result or {error:msg}.

server

[server port host?]

Run a minimal VVL HTTP server (admin only).

site

[site baseUrl domain funcDef1 funcDef2 ...]

Declare HTTP-routed keywords (ODESA).

IA & agents

agent

[agent "goal" options?]

Autonomous ReAct agent. Generates VVL, executes it in the current context, receives feedback, and iterates. Use [§§ "sub-question"]/[resolve "..."] inside the goal/code for specialized neuro-symbolic solving (calculation, optimization, extraction, facts, expert systems). Options: budget (int, default 8), tools (list[str], documentation filter only), model (str), reflect (bool, default true — runs a final judge() call that can reject and grant 1 corrective step).

agentTrace

[agentTrace]

VVL_Json with the structured execution trace of the most recent [agent] call: {goal, model, steps_used, max_steps, done_signal, return_type, tool_calls[], tool_calls_count, errors[], final_code, usage_total{prompt_tokens,...}, elapsed_ms}. Returns <{}> if no [agent] call has run in this context.

architect

[architect "goal" options?]

High-level orchestrator. Generates a VVL plan (single-shot or plan-first JSON), lints it, executes with LLM auto-fix on runtime errors. Options dict: {model, budget, max_retries (default 3), plan_first (bool), session (id), temperature, use_rag}.

architect-resume

[architect-resume "session-id"]

Load a checkpointed architect session: rehydrates phase results into [mem "<sid>"] and returns {session_id, phases, plan}.

codegen

[codegen "goal"]

VVL_Json {"ok":true,"code":"<code VVL>"} ou {"ok":false,"error":...}. Génère du code VVL via le LLM (même moteur que :agent / vvl_codegen). N'altère pas la session.

intent

[intent "NL" "ProblemName"] (post-hoc)

compile a natural-language intention to a single body form (soft/assert/maximize/minimize) and add it to an existing problem. Inline form: place [intent "..."] inside an [optimize:problem ...] body.

semantic

[§ x] aka [semantic x]

VVL_Semantic for text | VVL_Semantic(description) for [§ img] (vision LLM) | VVL_Img for [§ 'desc' IMG 'WxH'] (DALL-E 3). Generated images are saved under the active user workspace.

semanticCache

[semanticCache action ...]

Cache management: 'reset' (clear all), 'delete' op left right (remove one entry), 'purge' op (remove all for operator), 'list' [op] (show entries).

semanticMode

[semanticmode mode [threshold]]

Set semantic mode: 'normal', 'advanced' (agent model for @) or 'jev' (boolean operators decided by Jev, LLM fallback when Jev is unsure; optional threshold 0.5..1)

semanticModel

[semanticModel] | [semanticModel kind] | [semanticModel kind name] | [semanticModel kind name persist]

Inspect or override LLM models. Kinds: 'model' (base, @ normal), 'agent' ([agent]/[architect], @ advanced), 'vision' ([§ img]), 'image' ([§ desc IMG size]). With 'persist' the value is also written to vvl.config (otherwise process-local).

ILP — induction logique

ilp:bias

[ilp:bias BIAS_JSON]

Bias spec. BIAS_JSON: {target, predicates:[{name,modes,role?,is_bk?}], max_body?, max_clauses?, max_vars?, types?, allow_recursion?}.

ilp:constraints

[ilp:constraints $result]

the ConstraintStore atom from a LearnResult — [atom:trace] it for the full failure log.

ilp:explain

[ilp:explain $result]

string. Pretty-prints an LFF run (program, coverage, elapsed, constraints by kind).

ilp:induce

[ilp:induce DESCRIPTION HEAD_NAME HEAD_ARITY POS NEG [OPTS?] [KB_NAME?]]

LearnResult. Full pipeline: LLM bias proposal + LLM hypothesis seeding + LFF refinement. opts: {n_seeds, max_body, max_iter, beam_width, seed}.

ilp:learn

[ilp:learn $bias HEAD_PRED POS_JSON NEG_JSON [BK_JSON] [OPTS_JSON] [KB_NAME]]

LearnResult atom. Runs Learning-From-Failures over the bias-bounded hypothesis space. opts: {max_body, max_iter, beam_width, seed}.

ilp:learn-with-counter

[ilp:learn-with-counter $bias HEAD_NAME POS NEG $store [WEIGHT?] [OPTS?] [KB_NAME?]]

LearnResult. Folds human corrections (from a [genetic:counter-store]) into the example sets for adversarial re-induction.

ilp:propose-bias

[ilp:propose-bias DESCRIPTION HEAD_NAME HEAD_ARITY POS NEG [KB_NAME?]]

Bias node. LLM proposes mode declarations + body predicates from natural language + sample examples.

ilp:refine-with-ga

[ilp:refine-with-ga $result HEAD_NAME POS NEG [OPTS?] [KB_NAME?]]

refined LearnResult. Stochastic refinement of an LFF result's winners via drop-literal and swap-variable mutations; merges new consistent clauses and re-runs greedy set-cover.

ilp:seed-hypotheses

[ilp:seed-hypotheses $bias DESCRIPTION POS NEG [N?]]

JSON list of Prolog clause strings. LLM proposes up to N candidate Horn clauses for the bias.

ilp:test

[ilp:test CLAUSES_JSON HEAD_PRED POS_JSON NEG_JSON [BK_JSON] [KB_NAME]]

JSON test outcome. Tests a candidate program against {E+, E-} without learning.

Images & dessin

addImage

[addImage $res1 $res2 x y alpha? alphacolor?]

Paste res2 onto res1.

blur

[blur $res value]

Apply Gaussian blur.

brightness

[brightness $res value]

Adjust brightness (1.0=original).

contrast

[contrast $res value]

Adjust contrast (1.0=original).

createBlackWhite

[createBlackWhite $res]

Convert to black and white.

createGrayScale

[createGrayScale $res]

Convert to grayscale.

createImage

[createImage w h bgcolor? transparency?]

Create new image (transparency: 0=opaque, 100=transparent).

createNegative

[createNegative $res]

Invert colors (negative).

cropImage

[cropImage $res x y w h]

Crop region at (x,y) with size w*h.

drawAngleArc

[drawAngleArc $res x y radius startAngle endAngle pen fill alpha?]

Draw arc.

drawBezier

[drawBezier $res points pen alpha?]

Draw Bezier curve.

drawEllipse

[drawEllipse $res x1 y1 x2 y2 pen fill alpha?]

Draw ellipse.

drawLine

[drawLine $res x1 y1 x2 y2 pen alpha?]

Draw line (pen: '#RRGGBB:width').

drawPolygon

[drawPolygon $res points pen fill alpha?]

Draw polygon.

drawRect

[drawRect $res x1 y1 x2 y2 pen fill alpha?]

Draw rectangle.

drawRoundRect

[drawRoundRect $res x1 y1 x2 y2 radius pen fill alpha?]

Draw rounded rectangle.

emboss

[emboss $res]

Apply emboss effect.

fillBezier

[fillBezier $res points pen fill alpha?]

Draw filled Bezier shape.

flipImage

[flipImage $res direction]

Flip 'horizontal' or 'vertical'.

getHeight

[getHeight $res]

Return height of image.

getImage

[getImage 'path']

Load image file into a mutable ImageRes resource.

getImageURL

[getImageURL 'url']

Download an image from a URL into a mutable ImageRes resource.

getPixel

[getPixel $res x y]

Return '#RRGGBB' color at pixel position.

getPixel32

[getPixel32 $res x y]

Return 32-bit ARGB integer at pixel position.

getWidth

[getWidth $res]

Return width of image.

imageToBase64

[imageToBase64 $res format?]

Encode as data URI (png/jpg).

resizeImage

[resizeImage $res w h]

Resize with nearest-neighbor interpolation.

resizeResampling

[resizeResampling $res w h]

Resize with Lanczos resampling.

rotateImage

[rotateImage $res angle bgcolor?]

Rotate by angle degrees.

saturation

[saturation $res value]

Adjust saturation (1.0=original).

saveImage

[saveImage $res 'path' format?]

Save image to file (format: png/jpg/bmp).

setPixel

[setPixel $res x y color]

Set pixel color at position.

sharpen

[sharpen $res value]

Sharpen image.

Inférence bayésienne

bannotate

[bannotate kb "clause" p source? label?]

Annotate one clause. p is a number or "?"; source in {user,fact,LLM,learned}; label shares one random variable across clauses.

bapprox

[bapprox kb "goal" ...]

VVL_Approximation wrapping P[goal] so it flows through VVL arithmetic and [approximation:*].

bbeliefs

[bbeliefs kb]

all clause beliefs in the KB (JSON).

bfacts

[bfacts kb "p::fact" ...]

Add probabilistic (annotated) facts. Use "0.8::rain." or "?::rain." (uniform prior, to be learned).

blearn

[blearn kb OBS_JSON iterations? seed?]

Bayesian (Gibbs) learning of clause weights from observed query-atoms. OBS_JSON: [{"goal":"wet(r1)","obs":true}, ...]. Commits posteriors to the KB.

bposterior

[bposterior kb "clause"]

current Beta belief of a clause (JSON).

bprob

[bprob kb "goal" n_outer? n_inner? seed?]

JSON {value, ci, range, confidence, assumptions}. Predictive probability with epistemic uncertainty propagation. Negation is exact (per-world boolean solve).

brules

[brules kb "p::head:-body." ...]

Add probabilistic (annotated) rules.

Introspection des variables

parse-statements

[parse-statements code]

JSON list of top-level statements {start_line, end_line, text}. Used by the IDE debugger to split a script for breakpoint / step execution.

vars

[vars all?]

JSON list of session variables {name, type, preview, value}. "all" includes $__ locals.

JSON / XML

JSON

[JSON s]

Parse JSON string s into a JSON object.

XML

[XML s]

Parse XML string.

getXMLValue

[getXMLValue xml "xpath"]

Get text content of node(s).

json-decode

[json-decode string]

Parse a JSON string into a VVL_Json object. Returns an error string on parse failure.

json-encode

[json-encode value]

JSON-encode a value (string, number...) as a JSON literal with surrounding quotes and proper escaping.

json-get-opt

[json-get-opt key json default?]

Get value by key from JSON object. Returns default (or "") if key is absent — safe for optional fields.

json-keys

[json-keys json]

Returns VVL_List of all key names from a JSON object.

json-path-get

[json-path-get json_str path]

Get nested value at dot+bracket path (e.g. 'layout.tabs[0].viewSystem.views.INIT.root'). Returns JSON string of the value, or 'null' if not found.

json-path-set

[json-path-set json_str path new_value]

Set nested value at dot+bracket path. new_value is parsed as JSON if possible. Returns updated full JSON string.

json-set

[json-set json_str key value]

Set a top-level key in a JSON object string, return updated JSON string.

jsonGetValue

[jsonGetValue key json]

Get value by key/index from JSON. Raises KeyError if missing.

jsonToList

[jsonToList jsonArray]

Convert JSON array to VVL list.

object

[object [key value ...]]

Lightweight object as VVL_Json dict; serializable with .json.

setXMLValue

[setXMLValue value xml "xpath"]

Set text content of node(s).

strToJson

[JSON s]

Parse JSON string s into a JSON object.

Listes

append

[append head|tail val list]

Add value to list.

chunk

[chunk n list]

List of n-sized chunks, last one may be shorter (= Enum.chunk_every).

collect

[collect expr1 expr2 ...]

Evaluate expressions and return values kept with [keep].

concat

[concat l1 l2 l3...]

Flatten one level — concatenate the given lists.

count-by

[count-by f serie]

paires [cle nombre] (= SELECT cle, COUNT(*) GROUP BY cle).

cycle

[cycle serie]

flux INFINI qui repete une serie FINIE (= cycle de Haskell).

dim

[dim $var value]

Assign value to variable (alternative to $var = value).

drop

[drop n list]

List without the first n items; negative n drops from the end (= Enum.drop).

exist

[exist value list]

1 if value is in list, else 0.

first

[first serie]

Premier element d'une liste, premier caractere d'une chaine ("" si vide).

getType

[getType element]

VVL type tag string ("NUM", "STRING", "LIST", "JSON", ...).

getValue

[getValue idx list]

Get element at 1-based index.

group-by

[group-by f serie]

paires [cle elements], dans l'ordre de premiere apparition (= GROUP BY).

index-of

[index-of serie valeur]

Position 1-based de la valeur dans la liste (ou de la sous-chaine), 0 si absente. Meme ordre d'arguments que [contains].

insert

[insert idx value list]

Insert value at 1-based index.

iterate

[iterate f x]

flux INFINI x, f(x), f(f(x))... (= iterate de Haskell).

keep

[keep value]

Append value to the current [collect] buffer and return it.

last

[last serie]

Dernier element d'une liste, dernier caractere d'une chaine ("" si vide).

length

[length x]

Get length of list, string, or JSON (array length, dict key count).

let

[let [[$x expr1] [$y expr2] ...] body]

Local sequential bindings (let*), evaluate body, restore prior bindings.

list

[list items...]

Variadic constructor of a VVL_List.

listMatch

[listMatch list default lambda_cons]

If empty, default; else lambda_cons(head, tail).

match

[match target pattern1 body1 ... default?]

Pattern matching with deferred body execution.

mset

[mset [$vars...] $values]

Multi-variable destructuring assignment.

pop

[pop head|tail list]

Return head/tail value of list.

put

[put type idx value list]

Insert/replace at 1-based index with typing (NUM/STRING/LIST/JSON).

remove

[remove idx list]

Delete element at 1-based index.

repeat

[repeat v]

flux INFINI de la meme valeur (= repeat de Haskell).

rest

[rest serie]

La serie privee de son premier element (liste ou chaine).

scan

[scan f init serie]

les resultats INTERMEDIAIRES du pli (= scanl / Enum.scan / +\).

slice

[slice start stop step? list]

Slice 1-based, stop inclusive. Negative step reverses.

unique

[unique list]

List without duplicates, first occurrence wins (= Enum.uniq).

unpack

[unpack list $headVar $tailVar]

Destructure list into head/tail variables. Returns 1 on success, 0 on empty.

update

[update type idx value list]

Update value at 1-based index with typing.

with

[with $source $alias expr1 expr2 ...]

Parallel eval of expressions, each with $alias = source.

zip

[zip a b]

List of pairs, stops at the shorter list (= Enum.zip).

zip-with

[zip-with f a b]

f appliquee aux paires, s'arrete a la plus courte (= zipWith).

Logique floue & expert

expert

[expert "NL describing domain AND rules" "ExpertName"]

Bootstraps a complete expert system: generates the ontology + abstracts via [fuzzy:ontology], generates a dispatcher rule via [fuzzy:rule], then registers a VVL keyword <ExpertName> that takes one NL string and returns the classified instance. The caller can then use [<ExpertName> "free-form input"] without writing any other VVL.

expert:active

[expert:active]

JSON list of experts currently registered in the session (the ones the router can dispatch to). Distinct from [expert:list] which lists experts persisted to disk via [expert:save]. Use this to inspect ctx._expert_registry — the symbolic router consults this list when classifying a question into the expert_system family.

expert:list

[expert:list]

Returns a JSON list of every saved expert.

expert:load

[expert:load "Name"]

Restore a saved expert: schema, abstracts, rules, and the keyword. Returns the schema variable for further use.

expert:save

[expert:save "Name"]

Persist a previously-built expert (schema, abstracts, rules, keyword) so it can be reloaded via [expert:load].

fuzzy:and

[fuzzy:and a b ...]

T-norm AND across all arguments. Use :family <name> to override.

fuzzy:degree

[fuzzy:degree [§ x] "spam"]

degree 0..1 that the description applies to x; [fuzzy:degree [§ x] ["low" "mid" "high"]] -> position on the scale, 0..1. Jev in [semanticMode "jev"] (LLM when Jev is unsure), else the LLM.

fuzzy:degrees

[fuzzy:degrees [§ x] `[name "predicate" name2 ["low" "high"] ...]]

JSON {name: degree 0..1}, all measured in ONE Jev call ([semanticMode "jev"]); the LLM only takes the degrees Jev is unsure about.

fuzzy:extremely

[fuzzy:extremely x]

x**4 (super-concentration).

fuzzy:family

[fuzzy:family]

current family. [fuzzy:family "name"] -> set ("zadeh"/"probabilistic"/"lukasiewicz").

fuzzy:few

[fuzzy:few values]

average of the bottom half (quantifier 'few are').

fuzzy:imp

[fuzzy:imp a b]

fuzzy implication a->b under active family.

fuzzy:most

[fuzzy:most values]

average of the top half (quantifier 'most are').

fuzzy:not

[fuzzy:not x]

1-x.

fuzzy:ontology

[fuzzy:ontology "NL description of the domain"]

Generates a full ontology (classes, attributes, abstracts, relations) from a natural-language description. The generated VVL is parsed and evaluated immediately so $<Schema> is bound and ready for use with [ontology:fromText], [fuzzy:rule], [ontology:infer], etc.

fuzzy:or

[fuzzy:or a b ...]

T-conorm OR across all arguments. Use :family <name> to override.

fuzzy:rule

[fuzzy:rule "rule in NL" $schemaVar?]

Translates the NL rule into a formal ontology:rule using ~&/~|/~!/≈> infix operators. The rule is then evaluated by [ontology:infer ...] without any further LLM calls.

fuzzy:slightly

[fuzzy:slightly x]

x**(1/3) (super-dilation).

fuzzy:somewhat

[fuzzy:somewhat x]

sqrt(x) (dilation).

fuzzy:very

[fuzzy:very x]

x**2 (concentration).

fuzzy:wmean

[fuzzy:wmean values weights]

weighted arithmetic mean of two equal-length VVL lists.

Logique propositionnelle

proposition

[proposition "p & q

r"] -> compile une proposition INFIX lisible.

proposition:and

[proposition:and P Q …]

conjonction.

proposition:entails

[proposition:entails [P …] G]

1 si les prémisses impliquent G.

proposition:eq

[proposition:eq a b]

a = b.

proposition:ge

[proposition:ge a b]

a ≥ b.

proposition:gt

[proposition:gt a b]

a > b.

proposition:iff

[proposition:iff P Q]

équivalence P<->Q.

proposition:implies

[proposition:implies P Q]

implication P->Q.

proposition:le

[proposition:le a b]

a ≤ b.

proposition:lt

[proposition:lt a b]

a < b.

proposition:ne

[proposition:ne a b]

a ≠ b.

proposition:not

[proposition:not P]

négation.

proposition:or

[proposition:or P Q …]

disjonction.

proposition:parse

[proposition:parse "p & q

r"] -> idem [proposition "…"] (forme namespacée).

proposition:sat

[proposition:sat P]

{sat, model} (satisfiabilité).

proposition:symbolic

[proposition:symbolic p [q …]]

déclare un/des symbole(s) propositionnel(s).

proposition:valid

[proposition:valid P]

1 si tautologie, 0 sinon.

proposition:xor

[proposition:xor P Q …]

ou exclusif.

Logs

log

[log msg...]

Append to context log file (and console if no workspace).

logImage

[logImage img options?]

Display image in REPL. Modes: "image" (default, term-image) or "ascii" (Pillow).

logTable

[logTable list_of_objects options?]

Display Rich table from JSON list. Options: {box, title, styles}.

print

[print arg1 arg2 ...]

Print arguments to console

MCP

mcp-call

[mcp-call $client tool_name arguments?]

Call an MCP tool. Returns JSON result.

mcp-close

[mcp-close $client]

Close MCP connection and terminate server process.

mcp-connect

[mcp-connect name command env?]

Connect to an MCP server via stdio. Returns "mcp:<name>".

mcp-list

[mcp-list $client]

List tools available on the MCP server. Returns JSON array.

mcp-resource

[mcp-resource $client uri]

Read a resource from the MCP server. Returns JSON.

mcp-servers

[mcp-servers]

List all active MCP connections. Returns JSON array.

Modules

module:def

[module:def name [export a b ...] body...]

Define a namespaced module. RAW builtin. The body executes in an isolated context. Exports: - values are read with [module:get Module name]; - keywords are installed only under qualified names such as Module:name.

module:get

[module:get module export]

Return an exported module value. RAW builtin. `module` and `export` may be words or strings.

module:info

[module:info module]

Return module metadata as JSON. RAW builtin. Result fields: name, exports, keywords, path

module:list

[module:list]

Return loaded/defined module names.

module:load

[module:load "file.vvl"]

Load a VVL module file once. The file is resolved through the current workspace path rules and usually contains one or more [module:def ...] forms. Uses ctx.module_cache: loading the same path again returns the cached result. Use [module:reload "file.vvl"] to force re-execution.

module:reload

[module:reload "file.vvl"]

Force reload of a VVL module file. Re-parses and re-executes the file, replacing qualified keyword exports for modules redefined by that file.

Méta & introspection

compute

[compute stack ops]

Uiua-style stack engine. Ex: [compute [] [5 "iota" 2 "*"]]

dump

[dump value]

Return the VVL textual dump of an evaluated value. Useful for debugging and for core value round-trips: $text = [dump `[a b 1]] -> "[a b 1]" [eval [load $text]] -> [a b 1] Round-trip is guaranteed for core readable values such as numbers, strings, lists and JSON. Platform resources may return diagnostic dumps only.

eval

[eval expr]

Short alias for [evaluate expr]. RAW builtin. Runs a STRING of source, evaluates an operator form, and reduces a BLOCK (elements evaluated, head kept). Pour LANCER un bloc charge ou quote, c'est [execute] : $form = [load "[+ 2 3]"] [eval $form] -> 5 (forme operateur) [eval [quote [print "x"]]] -> [print "x"] (bloc = donnee, rien lance) [execute [quote [print "x"]]] -> imprime x Use [load] to parse source without executing it, then [execute] to run it.

evaluate

[evaluate expr]

Evaluate VVL source, or the ELEMENTS of a form. RAW builtin. `expr` may be: - a string containing VVL source -> parsed and run; - an operator form (or any non-block node) -> evaluated; - a BLOCK -> its elements are evaluated, the head word is kept as-is. A block is DATA here: [evaluate [quote [print "x"]]] returns [print "x"] and prints NOTHING. To RUN a block, use [execute]. - a variable containing any of the above.

execute

[execute expr]

LANCE une forme, en repetant jusqu'a stabilite. RAW builtin. C'est le "do" de VVL : contrairement a [eval]/[evaluate], un bloc dont la tete est un mot connu est EXECUTE, pas reduit. [execute [print "x"]] -> imprime x $form = [quote [print "x"]] [execute $form] -> imprime x [execute [load "[+ 2 3]"]] -> 5 [execute [list 1 2 3]] -> [1 2 3] (donnee : rendue telle quelle) Repeter est necessaire parce que le builtin est RAW : dans [execute [load "..."]], le premier tour execute [load] et rend la forme chargee, le second l'execute. La boucle s'arrete des que la forme est stable, donc aucun effet de bord n'est rejoue.

form

[form value]

Return human-facing text for an evaluated value. Unlike [mold]/[dump], strings are not quoted and lists are joined as text: [form "hello"] -> "hello" [form `[a 10 b]] -> "a 10 b" Use [mold] or [dump] when you need a representation intended for [load].

help

[help name?]

List builtins or get help for specific command.

import

[import "file.vvl"]

Execute external VVL file.

inspectWord

[inspectWord name]

Check if word is builtin, keyword or other.

keyword

[keyword name template]

Define a macro.

lambda

[lambda [params] body]

Define an anonymous function.

load

[load source]

Parse VVL source string without executing it. Returns: - the single parsed node when the source has one top-level expression; - a VVL list of nodes when the source has several top-level statements.

mem

[mem db key val?]

Key-Value store (get or set).

memSearch

[memSearch db val]

Find keys by value.

mold

[mold value]

Return the readable VVL representation of an evaluated value. `mold` is the REBOL-style name for the round-trip-oriented textual form. For now it intentionally shares the same semantics as [dump]: [mold `[a b 1]] -> "[a b 1]" [eval [load [mold `[a b 1]]]] -> [a b 1] Use [form] when you want human-facing text instead of readable source.

proai-validator-json

[proai-validator-json JSON|fichier]

Structured JSON validation report. Returns JSON with score, valid, hasCritical, hasErrors, summary, and entries[] each with id/severity/category/title/message/path/fix/expected/actual.

quote

[quote expr...]

Return raw expression(s) without evaluating them. RAW builtin. - One argument: returns that raw expression. - Several arguments: returns a VVL list of the raw expressions.

sub

[sub "file.vvl" args...] or [sub graphName args...]

Call sub-script or sub-graph.

type-of

[type-of value]

Return a stable lowercase VVL type name.

version

[version]

JSON {"VAILS", "VVL", "variant"?, "branch"?, "sha"?}. "variant" appears on experimental builds; branch/sha when git is reachable.

λ

[λ [params] body]

Alias for lambda.

ODESA

odesa:call

[odesa:call URL token fonction [param valeur] …]

forwarder interne des keywords installés par [odesa:site].

odesa:site

[odesa:site URL préfixe ?token]

récupère le manifest d'un serveur ODESA et installe les keywords préfixe:fonction (appel HTTP + ré-éval VVL).

Objet (classes)

class

[class Name : Parent? [field f default :ann?]* [method m [params] body]* [mixin M]* [implements P]*]

class-of

[class-of $obj]

Name of the object's class (or Python type for non-instances).

implements-of

[implements-of $obj ProtocolName]

1 if the object implements the protocol.

is-a

[is-a $obj ClassName]

1 if instance of class, subclass, mixin, or implements protocol.

method-call

[method-call $obj "nom" args...]

appelle la methode par son NOM (envoi dynamique).

methods-of

[methods-of $obj]

liste TRIEE des noms de methodes.

new

[new ClassName arg1 arg2 ...]

Create instance. VVL classes: positional args are passed to init(). Ontology classes: pass named pairs [attr value] -> VVL_OntologyInstance.

object-class

[object-class $obj]

nom de la classe (objet ou classe). Erreur sinon.

object-fields

[object-fields $obj]

noms des champs, triés (même ordre que la VM).

object-get

[object-get $obj champ]

valeur du champ, "" si absent.

object-has

[object-has $obj champ]

1 si le champ existe, 0 sinon.

object-new

[object-new Classe] ou [object-new Classe <{...}>]

instance dotée de ces champs.

object-set

[object-set $obj champ valeur]

NOUVEL objet ; la source est intacte.

object-to-json

[object-to-json $obj]

JSON {__vvl_object__, fields, …}, forme de la VM.

protocol

[protocol Name [requires methodA] [requires methodB] ...]

Define an interface.

relation

[relation Name [domain Class] [range Class] [cardinality ...] [inverse R] [symmetric true] [transitive true]]

OWL-style relation.

Office COM

call

[call obj method args...]

Call method.

excel-chart

[excel-chart $book spec]

Insert chart from JSON spec.

excel-formula

[excel-formula $book spec]

Insert formulas from JSON spec.

excel-info

[excel-info $book]

Full workbook structure (sheets + cells) as JSON.

excel-pdf

[excel-pdf $book path]

Export workbook as PDF.

excel-style

[excel-style $book spec]

Apply styles from JSON spec.

excel-table

[excel-table $book spec]

Create table from JSON spec.

get

[get obj prop]

Get property.

office

[office app visible?]

Launch Office app (word/excel/outlook/powerpoint).

outlook-folders

[outlook-folders $outlook]

List all Outlook mail folders as JSON [{name,path,unreadCount,itemCount}...].

outlook-list

[outlook-list $outlook folder? max?]

List recent emails in folder (default Inbox, max 50). Returns JSON list.

outlook-move

[outlook-move $outlook entryId targetFolder]

Move an email to another folder by path.

outlook-read

[outlook-read $outlook entryId]

Read a single email by EntryID. Returns JSON {subject,sender,body,attachments...}.

outlook-save

[outlook-save $outlook entryId path]

Save an email as .msg file on disk.

outlook-search

[outlook-search $outlook query folder?]

Search emails matching query (DASL filter). Returns JSON list.

outlook-send

[outlook-send $outlook to subject body cc? bcc? attachments?]

Send an email via Outlook.

ppt-animate

[ppt-animate $pres slideIdx shapeIdx effect]

Add an animation effect to a shape.

ppt-chart

[ppt-chart $pres slideIdx spec]

Insert a chart from a JSON spec.

ppt-duplicate

[ppt-duplicate $pres slideIdx]

Duplicate an existing slide.

ppt-export

[ppt-export $pres path format?]

Export the presentation (default pdf, also pptx, png).

ppt-info

[ppt-info $pres]

Full presentation structure as JSON {slides:[{layout,shapes:[...]}]}.

ppt-master

[ppt-master $pres action params...]

Manipulate the slide master and layouts.

ppt-pdf

[ppt-pdf $pres path]

Export the presentation as a PDF file.

ppt-shape

[ppt-shape $pres slideIdx spec]

Create or modify a shape from a JSON spec.

ppt-slide

[ppt-slide $pres action params...]

Manage slides (add, delete, duplicate, move).

ppt-style

[ppt-style $pres slideIdx shapeIdx style]

Apply visual style (fill, border, font) to a shape.

ppt-text

[ppt-text $pres slideIdx shapeIdx text]

Set text content of a shape.

ppt-transition

[ppt-transition $pres slideIdx effect]

Set the slide transition effect.

prop

[prop obj path...]

Walk property path on COM object.

quit

[quit obj]

Quit Office app.

set

[set obj prop val]

Set property.

word-info

[word-info $doc]

Full document structure as JSON (one call).

word-pdf

[word-pdf $doc path]

Export a Word document as a PDF file.

word-table

[word-table $doc spec]

Create table from JSON spec.

word-textbox

[word-textbox $doc spec]

Create text box from JSON spec.

Ordre supérieur

every

[every lambda list]

1 if every item satisfies the predicate (= Enum.all?).

filter

[filter lambda list]

Filter list by predicate. Supports VVL_List and VVL_Json.

flat

[flat list] or [flat list depth]

Flatten nested list to single-level list. Optional depth limits flattening.

for

[for $var list body]

Loop over list/json-array. Returns list of body results.

jit

[jit]

seuil de compilation actuel | [jit N] -> règle le seuil (nb d'appels avant compilation d'une lambda chaude ; 0 = JIT désactivé, 1 = compilation immédiate). Pratique avec :t pour observer la VM dès le 1er appel.

map

[map lambda list]

Apply function to list.

pmap

[pmap lambda list]

Apply function in // to list.

reduce

[reduce lambda init? list]

Fold a list into one value (lambda takes acc, item).

some

[some lambda list]

1 if at least one item satisfies the predicate (= Enum.any?).

take

[take n serie]

les n premiers elements d'une liste, d'une chaine ou d'un flux paresseux ; les n DERNIERS si n < 0 (serie finie seulement, complement de [drop]). = Enum.take

vectorize

[vectorize]

état (1/0) | [vectorize 1|0] -> active/désactive le tier vectorisant de [map] à chaud (process-wide).

PDF (génération)

PDFMake

[PDFMake <template> $data "out.pdf" $options?]

VVL_Pdf. Template is a VVL bracket expression (DSL) or a string (Markdown); type-detected. Options: pageSize/orientation/margins/defaultStyle/title/author/input.

PDF (signature)

pdfListKeys

[pdfListKeys "users"|"guests"|"all"?]

JSON des keystores du workspace.

pdfMakeGuestKey

[pdfMakeGuestKey "email" "Nom Prénom" days?]

Crée un .p12 invité (mot de passe auto, chiffré).

pdfMakeUserKey

[pdfMakeUserKey "password" days?]

Crée un .p12 pour ctx.user dans le workspace.

pdfRevokeKey

[pdfRevokeKey "user:email"|"guest:id"]

1/0. Supprime le .p12 et trace le fingerprint.

pdfSign

[pdfSign $pdf "out.pdf" "user:email"|"guest:id" password?]

chemin relatif du PDF signé.

pdfVerify

[pdfVerify "signed.pdf"]

JSON {valid, signers:[{cn,email,trust,fingerprint,revoked,...}]}.

PDF / Images

IMG

[IMG "path"]

Crée un VVL_Img et pré-charge son base64.

PDF

[PDF "path"]

Crée un VVL_Pdf.

imgToMatrix

[imgToMatrix "path" mode?]

JSON pixel matrix (mode "RGB" or "L").

matrixToImg

[matrixToImg matrix "path"]

Save matrix as image file.

pdfMeta

[pdfMeta $pdfObj]

JSON {pages, author, ...}.

pdfText

[pdfText $pdfObj max_pages?]

Texte extrait du PDF.

pdfToImages

[pdfToImages $obj zoom?]

List of VVL_Img (one per page).

Parsing & dialectes

dialect:def

[dialect:def name grammar]

Register a named parse grammar. RAW builtin. The grammar is stored in the current context under `name`. It does not become a builtin, keyword or plugin.

dialect:list

[dialect:list]

Return registered dialect names.

dialect:parse

[dialect:parse name input]

Parse input using a registered grammar. RAW builtin. `name` may be a word or string. `input` is evaluated. Returns the same JSON shape as [parse].

parse

[parse input grammar]

Parse a string or list with the VVL parse dialect. RAW builtin. `input` is evaluated; `grammar` is read as rules. Returns JSON: {ok, position, captures, rest, expected?} Primitive rules: digit number num letter space string word list any end Combinators: [some rule] one or more [any rule] zero or more [opt rule] optional [repeat n rule] exactly n [repeat min max rule] between min and max [alt r1 r2 ...] alternatives [capture name rule] capture consumed input [literal value] match a literal value [to rule] advance up to rule without consuming it [thru rule] advance through rule and consume it [rule name grammar] define a local subrule [do expr...] execute VVL action at current parse position

Persistance objet

obj-assert

[obj-assert $instance kbname?]

Inject instance/2 + prop/3 + rel/3 facts into a Prolog KB. Without kbname, uses the default KB (see [kb default]). Returns fact count.

obj-delete

[obj-delete $instance] or [$instance.delete]

Delete instance from SQLite by its UUID.

obj-find

[obj-find ClassName field value op?]

Find instances by field value. op: '=' (default), '>=', '<=', '>', '<', '!=', 'LIKE'.

obj-join

[obj-join FromClass relField ToClass filterField filterValue]

Cross-class relational join via vvl_relations table.

obj-load

[obj-load ClassName id]

Load instance by UUID from SQLite.

obj-query

[obj-query ClassName "SQL WHERE clause"]

Raw SQL query on vvl_objects. Use with caution.

obj-retract

[obj-retract $instance kbname?]

Remove all Prolog facts for an instance from a KB. Without kbname, uses the default KB. Returns retracted count.

obj-save

[obj-save $instance] or [$instance.save]

Save instance to SQLite. Generates UUID, indexes scalar fields, stores :ref links in vvl_relations.

Planning opérationnel

planning:add-constraint

[planning:add-constraint $schema $planning_id $kind <{params}>?]

create + commit a new Constraint (kind, params), add to C, return the constraint id.

planning:add-resource

[planning:add-resource $schema $planning_id $resource_id]

add to R.

planning:add-task

[planning:add-task $schema $planning_id $task_id]

add the task to T (idempotent), bump version, normalize.

planning:assign

[planning:assign $schema $planning_id $task_id $resource_ids $start_ts $end_ts]

create + commit a new Assignment, add its id to A, return the assignment id.

planning:code

[planning:code NAME [horizon L H] body...]

returns the [optimize:problem ...] VVL code that [planning:problem ...] would generate, without registering. Inspector for the DSL desugarer.

planning:compile

[planning:compile $schema $mission_id $h_start_ts $h_end_ts]

Phase 2 bridge: read Mission/Task/Resource/Reservation from the ontology KB, compute eligibility from requirements_json + skill_ids, generate the [planning:problem ...] DSL source and register it. Returns the problem name 'PB_<mission_id>'.

planning:compile-code

[planning:compile-code $schema $mission_id $h_start_ts $h_end_ts]

returns the [planning:problem ...] DSL source generated from the ontology, without registering. Inspector for the bridge.

planning:compose

[planning:compose $schema $p1 $p2 [as $new_id]?]

union component-wise + normalize. Returns the new Planning id.

planning:diff

[planning:diff $schema $p1 $p2]

<{from, to, added: {comp:[...]}, removed: {comp:[...]}, modified}>.

planning:equivalent

[planning:equivalent $schema $p1 $p2]

1 if p1 ≡ p2 under normal form, 0 otherwise.

planning:from-mission

[planning:from-mission $schema $mission_id $h_start_ts $h_end_ts [as $id]?]

populate T (Task instances of the mission), R (active Resources), F (confirmed Reservations) from the KB.

planning:includes

[planning:includes $schema $p1 $p2]

1 if p2 ⊑ p1 (component-wise subset), 0 otherwise.

planning:install-algebra-classes

[planning:install-algebra-classes $schema]

add `Planning` and `Constraint` ontology classes to the schema (idempotent). Required before any [planning:new] / [planning:compose] / etc.

planning:meet

[planning:meet $schema $p1 $p2 [as $new_id]?]

p1 ⊓ p2 (non-empty meet => recouvrement).

planning:new

[planning:new $schema $id $mission_id $h_start_ts $h_end_ts]

commit an empty Planning instance (T=R=A=C=F=∅). Returns its id.

planning:normalize

[planning:normalize $schema $p_id]

apply PDF § 7.4 simplification rules in place : drop orphan assignments, merge duplicate constraints, cancel + drop expired reservations, drop precedence(t,t') with t ∉ T.

planning:problem

[planning:problem NAME [horizon L H] body...]

Phase 1 planning DSL. Body forms: [task ID [duration N] [window L H]?], [resource ID [kind K]? [capacity N]?], [fixed-reservation R L H], [precedence T1 T2], [on-resource-group T ROLE [resources R1 R2 ...]], [no-overlap-resource R], [objective minimize-makespan]. Desugars to [optimize:problem ...] and registers the problem. Inspect the expansion with [planning:code NAME body...]. Capacités > 1 ne sont pas supportées en V0.

planning:reify-assignments

[planning:reify-assignments $schema $problem_name]

after [planning:solve], read the solver's last solution and create Assignment instances in the KB (committed). Returns a VVL_Json list of {task_id, resource_ids, start_ts, end_ts} dicts.

planning:remove-constraint

[planning:remove-constraint $schema $planning_id $constraint_id]

retract the Constraint instance and remove from C.

planning:remove-resource

[planning:remove-resource $schema $planning_id $resource_id]

remove from R and cascade-retract every Assignment using this resource (Assignments backed by a confirmed/running Reservation in F are protected).

planning:remove-task

[planning:remove-task $schema $planning_id $task_id]

remove from T and cascade-retract every Assignment whose task_id matches.

planning:seed

[planning:seed $schema "ClassName" <{key: val, ...}>]

create and commit an ontology instance from a JSON-style dict. Bypasses [new ClassName] (which only knows OO classes, not ontology classes). List-typed planning fields (skill_ids, requirements_json, depends_on_task_ids, …) are JSON-encoded automatically. Returns the prolog id of the committed instance.

planning:snapshot

[planning:snapshot $schema $p_id [as $new_id]?]

deep-copy with version+1, parent_id chained, snapshot_ts=now.

planning:solve

[planning:solve NAME [time_limit secs]?]

solve a problem registered via [planning:problem ...]. Returns a VVL_Json with the decision values plus __status__ / __objective__. Same backend as [optimize:solve].

planning:subtract

[planning:subtract $schema $p1 $p2 [as $new_id]?]

p1 \ p2 component-wise (non-commutative).

planning:unassign

[planning:unassign $schema $planning_id $task_id]

retract every Assignment whose task_id matches and remove from A.

planning:validate

[planning:validate NAME]

structural diagnostic of a problem registered via [planning:problem ...]. Same diagnostic surface as [optimize:validate]; useful when the planning desugarer succeeded but the underlying CP-SAT model has soft issues.

Plugins

plugin-info

[plugin-info name]

Manifest + signataire + digest + statut.

plugin-inspect

[plugin-inspect "x.vvlplugin"]

Vérifie format, digest, signature et policy sans installer.

plugin-install

[plugin-install "x.vvlplugin"]

Vérifie signature + policy, écrit le .py, crée le record.

plugin-load

[plugin-load "name" as kw (mode "inproc")?]

Re-vérifie le digest vs record puis lie ctx.plugins[kw].

plugin-remove

[plugin-remove "name"]

Unbind + supprime fichier(s) + record. Idempotent.

plugin-trust-add

[plugin-trust-add id "<PEM>" tier]

Ajoute une clé publique Ed25519 de confiance (tier: standard|high). Admin.

plugin-trust-export

[plugin-trust-export id "out.pub"]

Réécrit la PEM dans plugins/_inbox. Admin.

plugin-trust-get

[plugin-trust-get id]

Détail d'une clé + PEM. Admin.

plugin-trust-import

[plugin-trust-import "author.pub" id tier]

Importe une clé .pub depuis plugins/_inbox. Admin.

plugin-trust-list

[plugin-trust-list]

JSON des clés de confiance (sans PEM brute). Admin.

plugin-trust-remove

[plugin-trust-remove id]

Révoque/supprime une clé. Admin.

plugin-trust-update

[plugin-trust-update id tier]

Change le tier d'une clé. Admin.

plugin-unload

[plugin-unload kw]

Retire la liaison de session.

plugin-workspace-trust

[plugin-workspace-trust [name] 0|1]

(Dé)active plugins_trusted (gate du mode inproc). Admin.

plugins-list

[plugins-list]

Plugins installés + chargés (statut).

Plugins (secrets)

plugin-audit

[plugin-audit n?]

Derniers événements runtime des plugins. Admin.

plugin-login

[plugin-login plugin profile json]

Stocke un profil d'auth dédié au plugin. Admin.

plugin-login-list

[plugin-login-list plugin]

Liste les profils d'auth d'un plugin. Admin.

plugin-logout

[plugin-logout plugin profile]

Supprime un profil d'auth plugin. Admin.

plugin-secret-get

[plugin-secret-get plugin key]

Lit un secret plugin. Admin.

plugin-secret-list

[plugin-secret-list plugin]

Liste les noms de secrets stockés. Admin.

plugin-secret-remove

[plugin-secret-remove plugin key]

Supprime un secret plugin. Admin.

plugin-secret-set

[plugin-secret-set plugin key value]

Stocke un secret chiffré pour un plugin. Admin.

Programmation relationnelle (miniKanren)

=/=

[=/=]

alias de [distinct] : but/terme miniKanren (valide dans [run]).

==

[==]

alias de [unify] : but/terme miniKanren (valide dans [run]).

absent

[absent]

but/terme miniKanren (valide dans [run]).

all

[all]

but/terme miniKanren (valide dans [run]).

any

[any]

but/terme miniKanren (valide dans [run]).

any-weighted

[any-weighted]

but/terme miniKanren (valide dans [run]).

bind-csv

[bind-csv Classe $csv ["pk"]]

génère la classe AVEC ses champs déduits du SCHÉMA du CSV (colonnes + types inférés) et la lie au CSV comme source de persistance/requête. Clé primaire = pk fourni > pk du CSV > colonne nommée 'id' (convention des storages tabulaires) > 1re colonne. La classe sert ensuite de relation ([Classe …]) et de couche Active-Record (new/save/delete sur les lignes).

commit

[commit]

but/terme miniKanren (valide dans [run]).

commit-once

[commit-once]

but/terme miniKanren (valide dans [run]).

conda

[conda]

alias de [commit] : but/terme miniKanren (valide dans [run]).

conde

[conde]

alias de [any] : but/terme miniKanren (valide dans [run]).

condu

[condu]

alias de [commit-once] : but/terme miniKanren (valide dans [run]).

conj

[conj]

alias de [all] : but/terme miniKanren (valide dans [run]).

cons

[cons]

but/terme miniKanren (valide dans [run]).

constrain

[constrain]

but/terme miniKanren (valide dans [run]).

defrel

[predicate nom [params] goal…]

définit une relation logique.

disj

[disj]

alias de [any] : but/terme miniKanren (valide dans [run]).

distinct

[distinct]

but/terme miniKanren (valide dans [run]).

exists

[exists]

but/terme miniKanren (valide dans [run]).

fact

[fact]

but/terme miniKanren (valide dans [run]).

fail

[fail]

but/terme miniKanren (valide dans [run]).

fresh

[fresh]

alias de [exists] : but/terme miniKanren (valide dans [run]).

kb-goal

[kb-goal]

alias de [fact] : but/terme miniKanren (valide dans [run]).

match-obj

[match-obj]

alias de [obj-match] : but/terme miniKanren (valide dans [run]).

obj-match

[obj-match]

but/terme miniKanren (valide dans [run]).

once

[once]

but/terme miniKanren (valide dans [run]).

predicate

[predicate nom [params] goal…]

définit une relation logique.

prob

[prob [vars] goal…]

probabilité MARGINALE = somme des poids de toutes les solutions (P de la requête sous le modèle probabiliste).

probability

[prob [vars] goal…]

probabilité MARGINALE = somme des poids de toutes les solutions (P de la requête sous le modèle probabiliste).

run

[run N [vars] goal…]

LISTE d'au plus N solutions (matérialisée).

run*

[run-all [vars] goal…]

LISTE de TOUTES les solutions (matérialisée ; lève si la relation est infinie — voir [run-stream]).

run-all

[run-all [vars] goal…]

LISTE de TOUTES les solutions (matérialisée ; lève si la relation est infinie — voir [run-stream]).

run-stream

[run-stream [vars] goal…]

FLUX PARESSEUX de solutions (compose avec [take]/[for]/[map] ; sûr sur les relations infinies).

run-weighted

[run-weighted [vars] goal…]

LISTE de [solution probabilité] (chaque MONDE avec sa proba = produit des poids [any-weighted]).

s#

[s#]

alias de [succeed] : but/terme miniKanren (valide dans [run]).

succeed

[succeed]

but/terme miniKanren (valide dans [run]).

u#

[u#]

alias de [fail] : but/terme miniKanren (valide dans [run]).

unify

[unify]

but/terme miniKanren (valide dans [run]).

val

[val]

but/terme miniKanren (valide dans [run]).

without

[without]

alias de [absent] : but/terme miniKanren (valide dans [run]).

≡

[≡]

alias de [unify] : but/terme miniKanren (valide dans [run]).

Prolog

facts

[facts name "fact"...]

Add facts to KB.

kb

[kb set|reset|default|dump|delete|list|save|load name?]

Manage Knowledge Bases.

prologExists

[prologExists name query]

1 if at least one solution exists, else 0.

prologFirstValue

[prologFirstValue name query var default]

First binding of var, or default.

prologSolutions

[prologSolutions name query]

List of solutions (each solution = list of [var,value] pairs).

prologValues

[prologValues name query var]

List of values bound to var across solutions.

query

[query JSON|VVL name query...]

Run queries against the KB. Returns JSON or VVL list.

rules

[rules name "rule"...]

Add rules to KB.

RAG

genius

[genius "question" mode?]

Ask VVL documentation via RAG. mode: "hybrid" (default) or "naive". Requires :genius-learn first.

ragAsk

[ragAsk kb question mode?]

Recherche sémantique. Modes: hybrid|naive|local|global (défaut: hybrid).

ragAskAdvanced

[ragAskAdvanced kb question top_k? mode?]

Recherche avancée avec contrôle fin.

ragAskSimple

[ragAskSimple kb question top_k?]

Recherche simple sans LLM (top_k=5).

ragCacheClear

[ragCacheClear]

Vide tout le cache RAG en mémoire.

ragCacheInfo

[ragCacheInfo]

Info cache (instances chargées, mémoire).

ragClear

[ragClear kb]

Supprime tout le contenu (sans détruire la base).

ragClose

[ragClose kb]

Ferme la KB (libère cache mémoire). [ragClose] sans arg ferme tout.

ragDelete

[ragDelete kb]

Supprime une KB (irréversible).

ragDocContent

[ragDocContent kb docId]

Récupère le contenu d'un document.

ragDocs

[ragDocs kb]

Liste tous les documents (id, statut, taille).

ragExtractJson

[ragExtractJson kb question schema?]

Extraction structurée en JSON.

ragInfo

[ragInfo kb]

Infos sur une KB (taille, fichiers, état cache).

ragInsert

[ragInsert kb text]

Insère du texte (retourne 'OK').

ragInsertBatch

[ragInsertBatch kb texts]

Insère plusieurs textes (liste). Plus rapide que des appels multiples.

ragInsertId

[ragInsertId kb text]

Insère et retourne l'ID (RECOMMANDÉ).

ragList

[ragList]

Liste les KB RAG disponibles dans le contexte actuel.

ragRemove

[ragRemove kb text]

Supprime par contenu (nécessite texte EXACT, préférer ragRemoveById).

ragRemoveById

[ragRemoveById kb docId]

Supprime par ID (RECOMMANDÉ).

ragRemoveEntity

[ragRemoveEntity kb entity]

Supprime une entité du graphe.

ragRemoveRelation

[ragRemoveRelation kb src tgt]

Supprime une relation entre 2 entités.

ragSearchContext

[ragSearchContext kb query mode?]

Récupère uniquement le contexte (sans génération).

ragSearchDocs

[ragSearchDocs kb query]

Recherche par mots-clés dans les documents (sans LLM).

ragUpdate

[ragUpdate kb text]

Met à jour un texte (delete+insert).

ragUpdateById

[ragUpdateById kb docId text]

Met à jour par ID.

Registre & smart contracts

ed25519:keygen

[ed25519:keygen]

{private, public}: a new Ed25519 key pair, base64 (private = 32-byte seed). Not deterministic: refused in a ledger contract.

ed25519:public

[ed25519:public private-key]

the base64 public key of a private key.

ed25519:sign

[ed25519:sign private-key "message"]

base64 signature (deterministic). For a [signed] contract clause, sign "<ledger>|<keyword>|<message>".

ed25519:verify

[ed25519:verify public-key "message" signature]

1 if the signature is valid, else 0.

ledger:anchor

[ledger:anchor name :to "rfc3161"|"opentimestamps" :url "…"?]

anchor the head of the ledger at an external witness (time-stamping authority, FreeTSA by default; Bitcoin through OpenTimestamps).

ledger:anchor-policy

[ledger:anchor-policy name :to ["rfc3161" "opentimestamps"] :every seconds? :blocks n? | :off]

declare in the chain (signed config block) how often the ledger is anchored; the server scheduler does it.

ledger:anchor-status

[ledger:anchor-status name]

anchoring policy, last anchor per witness, blocks not anchored yet, lateness.

ledger:anchor-tick

[ledger:anchor-tick]

run one pass of the anchoring scheduler now; returns what was anchored.

ledger:anchor-upgrade

[ledger:anchor-upgrade name]

fetch the Bitcoin attestation of the pending OpenTimestamps anchors.

ledger:anchors

[ledger:anchors name]

the anchors of the ledger (provider, height, status, date).

ledger:await-final

[ledger:await-final name height? :timeout seconds]

wait until the block (default: the head) is final; `final` is false if the timeout (default 30 s) expires first.

ledger:block

[ledger:block name height]

a block as JSON.

ledger:check-anchors

[ledger:check-anchors name :offline? :trust "sha256:…"?]

check every anchor against the ledger (rewritten history) and its witness (TSA signature + pinned root, Bitcoin block header, witness key).

ledger:check-checkpoint

[ledger:check-checkpoint checkpoint :key "sha256:…"?]

witness side: signature, key, and consistency with the ledger (detects a rewritten history).

ledger:check-proof

[ledger:check-proof proof :key "sha256:…"?]

check a [ledger:proof]: path to the state root, block hash, signature, key fingerprint.

ledger:checkpoint

[ledger:checkpoint name]

a checkpoint of the head signed by the ledger key, for the witness applications.

ledger:create

[ledger:create name :signer "key"? :frozen?]

create a ledger (signed genesis block) in the workspace.

ledger:destroy

[ledger:destroy $self]

in a method of a ledger class: the object is removed from the ledger when the method returns.

ledger:drop

[ledger:drop name]

delete a ledger entirely (blocks, state, code). Irreversible; journaled in contract.log.

ledger:exists

[ledger:exists name]

1 if the ledger exists in the workspace.

ledger:finality

[ledger:finality name height?]

quorum, final height, pending blocks, attested height per replica; with a height: whether that block is final.

ledger:finality-policy

[ledger:finality-policy name :quorum k :replicas {"node": "public key" …} | :off]

declare in the chain (signed config block) the replicas the ledger relies on: a block is final once k of them attested it.

ledger:follow

[ledger:follow name :key "sha256:…"? :adopt?]

on a cluster worker node: follow the ledger of the cluster master. The copy is read-only; every block is re-executed before it is applied. :adopt turns a ledger written here (a former primary) into a replica.

ledger:get

[ledger:get name "slot"]

committed value of a slot ("" if absent).

ledger:has-object

[ledger:has-object Class key…]

1 if the object exists in its ledger, else 0.

ledger:history

[ledger:history name :from h? :limit n? :slot "s"?]

block summaries (calls, writes, hash).

ledger:info

[ledger:info name]

height, head hash, configuration, deployed keyword versions.

ledger:init

[ledger:init name [["slot" value] …]]

initial state (an init block), only before the first transaction.

ledger:invariant

[ledger:invariant name inv-name "expr"]

add a ledger invariant over slot families (sum(p*), count(p*), min(p*), max(p*), old(...)), checked at every transaction; a signed config block.

ledger:invariant-drop

[ledger:invariant-drop name inv-name]

remove a ledger invariant (a signed config block).

ledger:invariants

[ledger:invariants name]

the ledger invariants {name: expression}.

ledger:list

[ledger:list]

the ledgers of the workspace.

ledger:now

[ledger:now]

time of the current block (in a ledger keyword).

ledger:object

[ledger:object Class key…]

the object of a ledger class as the ledger knows it (a snapshot; in a transaction: as the transaction sees it).

ledger:objects

[ledger:objects Class]

the keys of the objects of a ledger class.

ledger:promote

[ledger:promote name]

on a replica named in the finality policy: take the ledger over when the primary is lost (a takeover block signed with the replica's registered key). Irreversible.

ledger:proof

[ledger:proof name "slot"]

Merkle proof of the slot value (or absence) in the signed state of the head block; checkable without the server.

ledger:random

[ledger:random n]

integer in [0, n), deterministic (seeded by the previous block hash).

ledger:replica-key

[ledger:replica-key]

replica node: the Ed25519 public key (base64) it signs its attestations with; to register in the finality policy of the primary.

ledger:replica-status

[ledger:replica-status name?]

replica node: height, lag behind the primary, status (new | ok | error | diverged | detached) and the reason of a divergence.

ledger:replicas

[ledger:replicas name]

primary: the replicas that re-executed the ledger and signed its head (replica, height, lag).

ledger:state

[ledger:state name "prefix"?]

committed state as JSON.

ledger:sync

[ledger:sync name?]

replica node: pull, re-execute and apply the new blocks of the primary now.

ledger:time

[ledger:time]

time of the current block in whole seconds since the epoch (in a ledger keyword; deterministic).

ledger:tx

[ledger:tx name :tx-id "id"? [expr …]]

run the expressions (ledger keyword calls) in ONE transaction: all or nothing, one block. A known :tx-id is not replayed.

ledger:unfollow

[ledger:unfollow name]

replica node: stop following the primary; the copy stays, read-only.

ledger:verify

[ledger:verify name :chain-only?]

check hashes, signatures and replay every transaction; {ok, error, …}.

ledger:witness

[ledger:witness name checkpoint witness-name public-key signature]

record the countersignature of a checkpoint by a witness application as an anchor.

oracle

[oracle "label" expression]

in a ledger keyword: evaluate a non-deterministic expression (LLM, Jev, REST, random) once, record its answer in the block, read it back on replay.

state:del

[state:del alias]

delete a declared state slot.

state:get

[state:get alias]

value of a declared state slot in the current transaction.

state:has

[state:has alias]

1 if the declared slot exists.

state:put

[state:put alias value]

write a declared state slot (committed with the transaction).

Réification de concepts

concept:approx

[concept:approx $concept "field"]

Wrap a concept field as a VVL_Approximation carrying its recorded provenance (LLM/fact/user). Propagates confidence through (+ - * /). LLM-discovered field -> "moderate"; user-set field -> "exact".

concept:method

[concept:method $concept "name" [lambda [$params] body]]

Define a user method on a concept (overrides LLM-generated).

concept:reset

[concept:reset] or [concept:reset "Name"]

Clear concept cache (all or specific).

concepts

[concepts "/path"] or [concepts "/path" as "prefix_"]

Load concepts persisted by VAILS Agents under kb/neuro/, expose each as $<prefix><slug>. Idempotent: re-runs report {status, loaded, updated, unchanged, skipped} based on the DB updated_at of each concept.

concepts:available

[concepts:available]

Returns every storage index under kb/neuro/ (loaded or not). Each entry has a "loaded" flag.

concepts:info

[concepts:info]

Session summary. [concepts:info "/path"] -> Full index of a storage (+ session block if currently loaded).

concepts:list

[concepts:list]

Returns the paths loaded in the current session via [concepts "/..."] (path, mode, prefix, variables, count, last_loaded_at).

Résolution NL→VVL

resolve

[resolve "question NL"] or [§§ "question"]

Neuro-symbolic resolver. Classifies a natural-language sub-question and dispatches to the right specialist (calculation, optimization, relational/Prolog query, rule induction, factual retrieval, structured extraction, expert system). Use inside [agent] when a sub-task needs a formula, solver, extraction, facts, or auditable Approximation instead of hand-rolled code.

resolve:classify

[resolve:classify "question NL"]

{family, sub_kind, confidence, reasoning} - Pure classifier, no dispatch.

resolve:trace

[resolve:trace "question NL"]

{classification, events[], result} - Same as resolve but returns structured trace JSON.

resolveV

[resolveV "question NL"] or [§§? "question"]

Same as resolve but logs routing and generated VVL code; use for debugging.

Système ontologique

ontology:abstract

[ontology:abstract concept]

Mark a concept as abstract (cannot be instantiated directly).

ontology:ask

[ontology:ask query]

Raw Prolog query.

ontology:askMagic

[ontology:askMagic question]

Free-form natural-language query against the ontology with LLM-assisted resolution.

ontology:clear-rules

[ontology:clear-rules $schema]

Remove ALL rules from a schema (e.g. before re-emitting a canonical list). Returns the count cleared.

ontology:clearInstances

[ontology:clearInstances concept?]

Remove all instances of a concept (or all instances if no concept given).

ontology:commit

[ontology:commit instance]

Write instance to Knowledge Base.

ontology:comprehend

[ontology:comprehend text]

LLM-driven extraction of concepts/relations from natural-language text.

ontology:concept-add

[ontology:concept-add name attrs?]

Add a new concept to the active ontology.

ontology:consistent

[ontology:consistent $schema]

{consistent, instances, violations}. Detects contradictions (required attrs, [assert]/[validate]/[check] constraints, relation cardinality) WITHOUT LLM.

ontology:context

[ontology:context name?]

Switch to or return the current ontology context.

ontology:debugLog

[ontology:debugLog on|off]

Toggle verbose ontology debug logging.

ontology:define

[ontology:define name definitions...]

Define classes and relations.

ontology:entails

[ontology:entails $schema "goal"]

1 if the schema's KB proves the Prolog goal, else 0.

ontology:export

[ontology:export path format?]

Export the active ontology to disk (JSON/TTL/Gherkin).

ontology:fromImage

[ontology:fromImage image]

Build/extend the ontology from an image via vision LLM.

ontology:fromText

[ontology:fromText onto class text debug?]

AI extraction.

ontology:identify

[ontology:identify entity]

Identify the closest concept matching the given entity description.

ontology:in-world

[ontology:in-world world body]

Evaluate body in a specific possible-world context (Zalta).

ontology:infer

[ontology:infer query]

Run a single inference step on the ontology.

ontology:infer-fixpoint

[ontology:infer-fixpoint]

Run inference repeatedly until reaching a fixed point.

ontology:json

[ontology:json]

Serialize the active ontology to JSON.

ontology:learn

[ontology:learn examples]

Learn new rules/concepts from labelled examples.

ontology:listStores

[ontology:listStores]

List all named ontology stores currently loaded.

ontology:load

[ontology:load path]

Load an ontology from disk (replaces the active store).

ontology:loadGherkin

[ontology:loadGherkin path]

Load an ontology from Gherkin (.feature) syntax.

ontology:loadNamed

[ontology:loadNamed name path]

Load an ontology under a named slot (multi-store).

ontology:merge

[ontology:merge source target]

Merge concepts/instances from source store into target.

ontology:printKB

[ontology:printKB]

Dump all Prolog facts to console.

ontology:reset

[ontology:reset]

Clear all facts.

ontology:retract-rule

[ontology:retract-rule "Name" $schema]

Remove a named rule from the schema, recompile the T-Box. Returns the count removed.

ontology:rule

[ontology:rule name body]

Define an inference rule.

ontology:satisfies

[ontology:satisfies instance concept]

Check whether an instance satisfies a concept's predicates.

ontology:save

[ontology:save path?]

Save the active ontology to disk (default path = current store path).

ontology:saveAs

[ontology:saveAs name path]

Save a named ontology store to a specific path.

ontology:select

[ontology:select query]

Select instances matching a structural query.

ontology:set

[ontology:set instance attr value]

Set an attribute on an ontology instance.

ontology:storePath

[ontology:storePath name?]

Get/set the on-disk path for a named ontology store.

ontology:toVVL

[ontology:toVVL]

Serialize the active ontology back to VVL source code.

ontology:world

[ontology:world name]

Switch to a possible world (Zalta-style modal logic).

Tests intégrés

test:assert

[test:assert condition message?]

Assert that condition is truthy. Returns JSON {ok, name, detail?}. Also appends the result to the current context test log used by [test:summary].

test:equals

[test:equals expected actual message?]

Assert structural equality. VVL numbers, strings, lists and JSON are compared by plain value. Returns JSON {ok, name, detail?} and records the result for [test:summary].

test:suite

[test:suite name body...]

Run test expressions and return a summary. RAW builtin. The suite body is evaluated in order in the current context. Use [test:assert] and [test:equals] inside the body.

test:summary

[test:summary]

Return JSON summary for the current context. Result fields: total, passed, failed, ok, results.

Traitement par lots

BATCH

[BATCH "name" "template"]

Create a batch for RAG-formatted data with {placeholders}.

batch-add

[batch-add $batch record]

Add a record to the batch. Alternative: [$batch.add record]

batch-data

[batch-data $batch]

Get formatted strings list. Alternative: $batch.data

batch-erase

[batch-erase $batch]

Clear all records from the batch. Alternative: [$batch.erase]

Types & Math

BINARY

[BINARY s]

Typed binary value encoded as base64. mold/load form: <BINARY:base64>.

BOOL

[BOOL x]

Convert to boolean (1/0).

DATE

[DATE s]

Validate YYYY-MM-DD and return a typed DATE value. mold/load form: <DATE:YYYY-MM-DD>.

DATETIME

[DATETIME s]

Validate ISO 8601 and return a typed DATETIME value. mold/load form: <DATETIME:...>.

DURATION

[DURATION s]

Validate ISO 8601 duration (PT30M) or seconds. mold/load form: <DURATION:PT30M>.

EMAIL

[EMAIL s]

Validate and return a typed EMAIL value. mold/load form: <EMAIL:value>.

FILE

[FILE s]

Typed file path value. Backslashes normalize to /. mold/load form: <FILE:...>.

FLOAT

[FLOAT x]

Convert/Extract float from string/number.

INT

[INT x]

Convert/Extract integer from string/number.

MONEY

[MONEY currency amount]

Typed money value. mold/load form: <MONEY:EUR 1200>.

PATH

[PATH s]

Typed portable path value. Backslashes normalize to /. mold/load form: <PATH:...>.

STRING

[STRING x]

Convert to string.

TAG

[TAG s]

Typed symbolic tag value. Allowed chars: letters, digits, _, ., :, -. mold/load form: <TAG:name>.

TIME

[TIME s]

Validate HH:MM[:SS] and return a typed TIME value. mold/load form: <TIME:HH:MM:SS>.

URL

[URL s]

Validate and return a typed URL value. mold/load form: <URL:https://...>.

UUID

[UUID s]

Validate and return a typed UUID value. mold/load form: <UUID:...>.

abs

[abs x]

Absolute value of x.

average

[avg list]

Moyenne arithmétique des éléments numériques.

avg

[avg list]

Moyenne arithmétique des éléments numériques.

ceil

[ceil x]

Smallest integer >= x.

convert

[convert type val]

Cast to 'string','int','float','bool','date','json','xml','list'.

count

[count list]

Nombre d'éléments (alias ergonomique de [length]).

floor

[floor x]

Largest integer <= x.

max

[max list]

Largest element by numeric key.

mean

[avg list]

Moyenne arithmétique des éléments numériques.

min

[min list]

Smallest element by numeric key.

pow

[pow base exp]

base raised to the power exp.

range

[range start stop step]

List of integers (step != 0).

reverse

[reverse list]

Reverse list order.

round

[round x [ndigits=0]]

x rounded to ndigits decimal places.

sort

[sort list "desc"?|key_lambda?]

Natural sort, optional desc/key.

sqrt

[sqrt x]

Square root of x.

sum

[sum list]

Somme des éléments numériques. Compose avec [run-all].

UI & dialogues

_switch

[_switch x]

Evaluate first arg if present, else empty string. Internal flow helper.

alert

[alert msg]

Show alert dialog (60s timeout).

alertOC

[alertOC msg]

Show OK/CANCEL alert.

alertYN

[alertYN msg]

Show YES/NO alert.

cancelableDialog

[cancelableDialog msg fields...]

Dialog with Cancel option.

code

[code lang instruction init]

Request code from user.

dialog

[dialog msg fields...]

Complex form dialog.

input

[input title default?]

Interactive input field in REPL terminal. Use [inputs] for multi-field forms.

inputs

[inputs title1 title2 ...]

Multi-field form in REPL with nice table display (guaranteed order).

markdown

[markdown text]

Render markdown in client.

prompt

[prompt msg]

Ask user for text input.

question

[question msg type]

Chat bubble question.

response

[response value]

Capture the value as the task's response (ctx.task_response).

task-param

[task-param key?]

Get task parameter by key, or all params (JSON) if no key.

VDOM

hypervisor

[hypervisor action ...]

Manage Docker infrastructure via Portainer API. Connection: connect, connect-saved, save, disconnect, list, use System: status, info, resources Containers: containers, container, start, stop, restart, logs, exec Stacks: stacks, stack, stack-file, stack-env, stack-deploy, stack-update, stack-start, stack-stop, stack-remove Images: images, pull, image-remove Volumes: volumes, volume, networks, network Templates: templates, template, template-create, template-update, template-remove ProSuite: ps-deploy, ps-update, ps-health, ps-instances, ps-scale

vdomAdmin

[vdomAdmin url login password]

Client d'administration VDOM. Retourne un objet callable pour gérer le serveur VDOM. Commandes: info, apps, app, types, objects, libs, actions, export, dump, sql, exec, raw, plugins... Plugin Manager (via [$admin "plugins" $app $api_obj macros_db_id]): list, plugin, macros, macro, setMacro, createMacro, deleteMacro, reloadMacro, reloadEngine, timers, createTimer, updateTimer, deleteTimer, events, createEvent, deleteEvent, kv, kvGet, kvSet, kvDelete, resources, downloadResource, uploadResource, deleteResource, renameResource, databases, downloadDb, uploadDb, deleteDb, queryDb, call, webhook, dump, push

vdomCall

[vdomCall app funcName params?]

Appel d'une fonction API sur l'application VDOM. Retourne JSON ou String.

vdomConnect

[vdomConnect url login password]

Connexion SOAP à un serveur VDOM. Retourne un objet Connection.

vdomGetApp

[vdomGetApp connection appName]

Récupère une application VDOM par son nom. Retourne un objet App.

VM & compilation

compile

[compile expr|file]

Compile VVL to the Rust VM subset. Returns a compiled program with .run, .ir, .bytecode, .coverage.

vm-coverage

[vm-coverage]

JSON summary of native/host/expand/unsupported VM coverage.

vm-csv-writeback

[vm-csv-writeback $csv table-or-plan]

Apply a VM-owned CSV table/writeback plan to a Python CSV object and persist it.

vm-inventory

[vm-inventory]

JSON runtime inventory for Rust VM coverage planning.

vm-inventory-export

[vm-inventory-export path?]

Write VM inventory JSON and coverage Markdown. Defaults to sibling VAILS-SERVER-VM/inventory.

vm-oo-store-writeback

[vm-oo-store-writeback plan]

Apply a VM-owned OO store writeback plan to the Python object store.

VScript embarqué

use

[use $lib1 $lib2 ...]

marqueur de bibliothèques pour [vscript "code" [use ...]]. Chaque $lib est une référence [vscript "..."].

vscript

[vscript "code"]

compile le code VScript et renvoie une référence appelable. Puis [$ref a b ...] exécute (args 0-based via args(0)/UBound(args)/argc ; la variable `result` est la valeur de retour). Bibliothèques : [vscript "code" [use $lib1 $lib2]] injecte les définitions (Function/Sub/Class/Const) de chaque $lib (lui-même un [vscript ...]).

Voice

voice

[voice support]

Check if voice is supported [voice config "name" "client" [...options]] - Create a voice configuration [voice start "config" "instructions" "project"] - Start a voice session [voice stop $session] - Stop a voice session [voice decode type $event] - Decode an event (transcript, tools, audio) [voice list] - List active sessions [voice get "session_id"] - Get a session by ID

WebDriver

attr

[attr el name]

Get attribute.

click

[click el]

Click element.

find

[find driver ['css'|'xpath' sel]]

Find element.

go

[go driver url]

Navigate.

jsExec

[jsExec driver script args...]

Execute JavaScript in browser.

profile-info

[profile-info name]

Detailed JSON info for a profile: size, Preferences size, lock files, Chrome activity.

profile-list

[profile-list]

List all Chrome profiles (name, size_mb, prefs_mb, locked) as JSON strings.

profile-purge

[profile-purge name "force"]

Delete entire profile directory. Requires "force" as 2nd arg.

profile-repair

[profile-repair name ?mode]

Repair oversized (>10MB) Default/Preferences. mode="keep" (default) renames to .bak; mode="clean" deletes corrupted Preferences and all existing Preferences.bak.* files. Cookies/SSO preserved.

profile-unlock

[profile-unlock name]

Remove stale lock files if no Chrome process owns the profile. Returns count removed.

scrape

[scrape "url" "mode"?]

Light HTTP fetch (no browser). mode = "text" (default) or "html".

scrapeLinks

[scrapeLinks url]

Sorted, deduplicated list of absolute hrefs (excludes self/anchors/asset extensions).

screenshot

[screenshot driver path]

Save screen.

switchFrame

[switchFrame driver target]

Switch to iframe (element or 'default').

text

[text el]

Get element text.

type

[type el text clear?]

Type text.

wait

[wait driver 'ready'|['css' sel] ms]

Wait for condition.

webQuit

[webQuit driver]

Close browser.

webdriver

[webdriver browser ?profile ?flags ?"auto-correct"]

Launch Chrome (uc) or Edge with stealth + profile mgmt.

Écosystème ProSuite

proai

[proai "question" mode?]

Ask ProAI Builder documentation via RAG. mode: "hybrid" (default) or "naive". Requires :proai-learn first.

procontact

[procontact url user pass]

Client ProContact.

promail

[promail url user pass]

Client ProMail. Sous-commandes: mailboxes, mails, send, fetch, archives.

proplanning

[proplanning url user pass]

Client ProPlanning.

prosearch

[prosearch url user pass]

Client ProSearch.

proshare

[proshare url user pass] or [proshare url user pass <{client: "pdv"}>] Connect to ProShare. Returns a client with commands: FILES: ls, upload, uploadFile, mkdir, delete STORAGE: storages, storage, docs, doc, view, metafields WORKFLOW: submit, submitMulti, lock, unlock PLUGINS: macro ADMIN: users, groups, rules, updateRules, logoff Navigation: [$ps "storage" "X"] -> [$storage "ContainerY"] -> [$container "DocStorageZ"] -> $ds.docs

revolut

[revolut action ...]

Revolut Merchant API. connect: [revolut connect api_key mode?] — mode: sandbox|live (default: live) order: [revolut order client amount currency description? metadata?] get: [revolut get client order_id] list: [revolut list client limit?] capture: [revolut capture client order_id amount?] refund: [revolut refund client order_id amount? reason?] cancel: [revolut cancel client order_id]