vigiles API reference
    Preparing search index...

    Variable experimental_stubConst Experimental

    experimental_stub: (
        name: string,
        rules: readonly [StubRule, StubRule],
    ) => ToolStub & {
        called: (
            name: string,
            argv: ArgvPattern,
            bounds?: StubCalledBounds,
        ) => Check<Trace>;
        rest: ArgvRest;
    } = ...

    A stub for the binary name: a non-empty list of rules over its argv, first match wins. An invocation no rule answers fails the eval — name each command the agent runs; do not answer everything with one output.

    const { rest } = experimental_stub;
    const gh = experimental_stub("gh", [
    { argv: ["issue", "create", rest], reply: { kind: "always", stdout: "https://github.com/o/r/issues/9001\n" } },
    { argv: ["api", /^repos/o/r/issues\?/], reply: { kind: "always", stdout: "[]" } },
    ]);

    experimental_stub.rest — "any further tokens", last position only. experimental_stub.called(name, argv, { min, max, contains }) — a check over the run's recorded calls.

    Type Declaration