Luigit
repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by admin

wit/smith-plugin.wit

Raw
package smith:plugin@0.1.0;

interface tooling {
    record tool-declaration {
        name: string,
        description: string,
    }
}

interface plugin {
    use tooling.{tool-declaration};

    /// Static declaration pass: runs at instantiation, before publication,
    /// and may not perform host effects.
    declare-tools: func() -> list<tool-declaration>;

    /// Invoke one declared tool by name; input and output are canonical JSON.
    invoke: func(name: string, input-json: string) -> result<string, string>;
}

world plugin-world {
    export plugin;
}