defineConfig
Function, in @jr2/orchestrator/src/config.ts. It is an export of @jr2/orchestrator, on the Authoring surface page, in Config.
ts
function defineConfig(c: JR2Config): JR2ConfigDeclare the config of an Instance: the default export of jr2.config.ts. It gives back the object that you pass. Its only work is to check that object against JR2Config where you write it, at every depth, a misspelled key included. jr2 up typechecks the file before it converges.
Parameters
c: The Instance's config. SeeJR2Configfor every field.
Returns: The same object.
Example
ts
import { defineConfig } from "@jr2/orchestrator";
export default defineConfig({
name: "my-instance",
secrets: [{ name: "ANTHROPIC_API_KEY", value: process.env.ANTHROPIC_API_KEY }],
git: { credentials: [{ match: "github.com/you/", token: "GITHUB_TOKEN" }] },
});See also