Cotal TypeScript packages
    Preparing search index...

    Function loadTrustCheckedPersona

    • Read a persona file for a launch and say whether its launchOptions may apply. A file in a project folder that is not trusted may name none, since the connector renders each key into the host's own flags or config. The path is resolved one symbolic link at a time and every spelling met is judged: the path as written, each link and the path it leads to, and the file reached. Any of them under the .cotal/agents of a folder that is not trusted refuses. The persona is then read from the file the walk reached, so the file judged is the file whose definition is returned. A file outside any project, and one reached only through trusted projects, may declare launch options.

      as picks the parser: launch refuses a Mesh manifest as loadLaunchPersonaFile does, agent parses as loadAgentFile. A missing file throws ENOENT and a loop ELOOP, as a read would.

      Parameters

      • file: string
      • as: "launch" | "agent"
      • OptionalbeforeTrustCheck: () => void

      Returns { def: AgentDef; refusal?: string }