Skip to main content

Module wasm

Module wasm 

Source
Expand description

WASM-based intent classifier stub.

This module provides an adapter for WASM components that implement the intent classification interface. The actual WASM component loading is not implemented yet; this is a placeholder for future use.

§WIT Interface (proposed)

package intent:classifier;

interface classifier {
    /// Classifies the input query and returns JSON with scores.
    /// Returns: [{ "label": "skill_id", "score": 0.87 }, ...]
    classify: func(input: string) -> string;
}

world intent-classifier {
    export classifier;
}

§Future Implementation

When implemented, this will:

  1. Load a WASM component from the configured path
  2. Call the classify function via the WIT interface
  3. Parse the JSON response into IntentScore structs
  4. Enforce memory/time limits for sandboxing

Structs§

WasmClassifier
WASM-based intent classifier.

Constants§

WIT_INTERFACE
Proposed WIT interface for intent classifiers.