Skip to content

Code state ​

declareCodeState ​

File: parameters/codeStates/<name>/index.ts

What is in /workspace when the agent starts. Takes only the shared options.

ts
export default declareCodeState({
  config: { repo: "https://github.com/acme/app.git", commit: "a1b2c3d" },
  applyParameter: (config) => `RUN git clone --quiet ${config.repo} /workspace \\
    && git -C /workspace checkout --quiet --detach ${config.commit}`,
});