vigiles API reference
    Preparing search index...

    Function result

    • Declare a subagent's success/error result contract.

      result( { files: "string[]", summary: "string" }, // rich success { reason: "string", retryable: "boolean" }, // rich error )

      (Distinct from a skill's result: postcondition gate — this types a subagent's return value, the success/error tracks of the railway.)

      The literal field shapes are PRESERVED in the return type (const inference), not erased to Record<string, OutputFieldType> — this is what lets pipe cross-reference one agent's ok against the next agent's needs at tsc time. The return is still an OutputContract, so every existing consumer (the output: field, renderOutputContract, parseAgentResult) is unchanged.

      Type Parameters

      Parameters

      Returns OutputContract<Ok, Err>