---
title: "Dex app manifest and repository layout"
description: "The files, manifest fields, YAML rules, limits, rules S1 to S8, and import findings of a repository that Dex Cloud imports as a Managed Dex App."
canonical_url: "https://docs.superdurable.io/reference/dex-app/manifest/"
source: "docs/reference/dex-app/manifest.mdx"
locale: "en"
---

> Index of every page for AI agents: https://docs.superdurable.io/llms.txt

<a id="dex-app-manifest-and-repository-layout"></a>

# Dex app manifest and repository layout

This page lists the files, the manifest fields, the YAML rules, the limits, the rules S1 to S8, and the import findings of a [Managed Dex App](https://docs.superdurable.io/components/managed-dex-app.md) repository. Use it to prepare a repository for import and to fix a refused import.

The minimal example [`superdurable-apps/cloud-dex-app-example`](https://github.com/superdurable-apps/cloud-dex-app-example) meets every rule. It is a TypeScript process.

This version of the page describes manifest schema v1: `schemaVersion: dex.superdurable.io/dex-app/v1` in `dex-app.yaml` and `"schemaVersion": 1` in `.dex/template.json`. The limits are Dex Cloud's current values for that schema.

<a id="repository-layout"></a>

## Repository layout

Every repository has these files at its root:

| Path                   | What it holds                                                                                                                                  |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `.dex/template.json`   | The template manifest: build profile, kind, stack, and commands ([S1](https://docs.superdurable.io/reference/dex-app/manifest.md#s1))          |
| `dex-app.yaml`         | The deployment manifest: port, health path, Flow sources, and connectors ([S2](https://docs.superdurable.io/reference/dex-app/manifest.md#s2)) |
| `Makefile`             | The targets that the template manifest's commands name ([S4](https://docs.superdurable.io/reference/dex-app/manifest.md#s4))                   |
| `AGENTS.md`            | Instructions for coding agents that work in the repository, such as how to build and test it                                                   |
| `openapi/openapi.yaml` | The OpenAPI document of the application's HTTP API                                                                                             |

The build profile adds its own files ([S3](https://docs.superdurable.io/reference/dex-app/manifest.md#s3)). A Go process with the `go-react-v1` profile looks like this:

```text
.dex/template.json
dex-app.yaml
Makefile
AGENTS.md
openapi/openapi.yaml
go.mod
go.sum
cmd/server/                 the web server and the Worker
internal/process/*.go       the Flow sources that dex-app.yaml declares
tools/openapi/go.mod
tools/openapi/go.sum
web/package.json            with generate and build scripts
web/package-lock.json
```

A TypeScript process or agent with the `node-ts-v1` profile keeps `package.json` and `package-lock.json` at the root instead of the Go and `web/` files. Its `package.json` has a `build` script and a `main` entry.

Dex Cloud builds the application from the build profile. Your repository needs no Dockerfile.

<a id="template-manifest"></a>

## Template manifest

`.dex/template.json` is a JSON object of at most 64 KiB:

```json
{
  "schemaVersion": 1,
  "buildProfile": "go-react-v1",
  "kind": "process",
  "stack": "go",
  "openapiSpec": "openapi/openapi.yaml",
  "agentInstructions": "AGENTS.md",
  "commands": {
    "bootstrap": "make bootstrap",
    "checkStatic": "make check-static",
    "testApplication": "make test-app"
  }
}
```

Every field is required at import.

| Field                      | Type    | Allowed values                                                                        |
| -------------------------- | ------- | ------------------------------------------------------------------------------------- |
| `schemaVersion`            | integer | `1`                                                                                   |
| `buildProfile`             | string  | `go-react-v1` or `node-ts-v1`                                                         |
| `kind`                     | string  | `process` (an application of Flows) or `agent` (an application built with Dex Agents) |
| `stack`                    | string  | `go` or `typescript` for a `process`; `pi` for an `agent`                             |
| `openapiSpec`              | string  | `openapi/openapi.yaml`, and the file exists                                           |
| `agentInstructions`        | string  | `AGENTS.md`, and the file exists                                                      |
| `commands.bootstrap`       | string  | `make <target>`                                                                       |
| `commands.checkStatic`     | string  | `make <target>`                                                                       |
| `commands.testApplication` | string  | `make <target>`                                                                       |

Dex Cloud reads the fields above and ignores any other field.

The stack decides the build profile:

| `stack`      | `kind`    | `buildProfile` |
| ------------ | --------- | -------------- |
| `go`         | `process` | `go-react-v1`  |
| `typescript` | `process` | `node-ts-v1`   |
| `pi`         | `agent`   | `node-ts-v1`   |

Agent frameworks that Dex Cloud does not build yet are refused as not yet supported, such as `claude-agent-sdk`, `vercel-ai`, `mastra` and `openai-agents`.

Each command is the word `make`, one space, and one target. A target starts with a lowercase letter and holds lowercase letters, digits, and `-`. The pattern is `^make [a-z][a-z0-9-]*$`. Dex Cloud runs `bootstrap` when it prepares the coding workspace, which Preview uses.

When you ask the coding agent for a change, it commits to `main`. Dex Cloud checks those commits against these rules, and runs `checkStatic` and `testApplication` on them. This page calls them commit checks. Commit checks read only `schemaVersion`, `buildProfile`, `checkStatic`, and `testApplication`, and they read a missing `buildProfile` as `go-react-v1`.

Commits you push yourself are checked when Preview or a Live build reads them, and not before. The coding agent's output shows commit checks as "Source gate".

<a id="dex-app-yaml"></a>

## Deployment manifest

`dex-app.yaml` declares how the application is served, which Flows it defines, and which connectors it uses. This Go process sends email through the Gmail connector:

```yaml
schemaVersion: dex.superdurable.io/dex-app/v1
application:
  port: 8080
  healthPath: /api/health
flowDefinitions:
  - sourcePath: internal/process/lead_follow_up_flow.go
connectors:
  - connectionName: gmail
    connectorId: gmail
    modulePath: github.com/superdurable/dex-connectors-library/connectors/google/gmail/go
    version: v0.25.2
    authMethodId: google-oauth
    operations: [sendMessage]
```

An application without connectors declares an empty list:

```yaml
schemaVersion: dex.superdurable.io/dex-app/v1
application:
  port: 8080
  healthPath: /api/health
flowDefinitions:
  - sourcePath: src/greeting-flow.ts
connectors: []
```

Dex Cloud checks the fields below at import, in commit checks, and when Preview and Live read the manifest. The checks of each Flow source file (the 1,000-entry limit, that the file exists, `node_modules`, and the size limits) run at import and in the build. A field that this page does not list is an error.

<a id="top-level-fields"></a>

### Top-level fields

| Field             | Type    | Required | Rule                                                                                                                                                   |
| ----------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `schemaVersion`   | string  | yes      | Exactly `dex.superdurable.io/dex-app/v1`.                                                                                                              |
| `application`     | mapping | yes      | How the application is served. See [`application`](https://docs.superdurable.io/reference/dex-app/manifest.md#application).                            |
| `flowDefinitions` | list    | yes      | At least 1 and at most 1,000 entries. See [`flowDefinitions`](https://docs.superdurable.io/reference/dex-app/manifest.md#flow-definitions).            |
| `connectors`      | list    | yes      | May be empty (`[]`). An absent or `null` value is an error. See [`connectors`](https://docs.superdurable.io/reference/dex-app/manifest.md#connectors). |

<a id="application"></a>

### `application`

| Field           | Type    | Required | Rule                                                                                                                                                                                                                  |
| --------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `port`          | integer | yes      | 1024 to 65535. The application runs as an unprivileged user, so it binds only ports from 1024 up.                                                                                                                     |
| `healthPath`    | string  | yes      | Starts with exactly one `/`, such as `/api/health`. It holds no `?`, `#`, carriage return, or line feed.                                                                                                              |
| `workerSlots`   | integer | no       | 1 to 64. How many Steps and RPCs the Worker runs at once. The default is 4.                                                                                                                                           |
| `environment`   | list    | no       | The environment variables the application reads. At most 128 entries. See [`application.environment`](https://docs.superdurable.io/reference/dex-app/manifest.md#application-environment).                            |
| `requiredOneOf` | list    | no       | Requirements that one of several groups of environment variables meets. At most 8 entries. See [`application.requiredOneOf`](https://docs.superdurable.io/reference/dex-app/manifest.md#application-required-one-of). |

<a id="application-environment"></a>

### `application.environment`

Each entry declares one variable that the application reads. You set the value in Dex Cloud. The entry holds no value.

| Field       | Type            | Required | Rule                                                                                                                                                     |
| ----------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`      | string          | yes      | Matches `^[A-Z][A-Z0-9_]{0,127}$`. Unique in the list. Reserved names are refused (below).                                                               |
| `required`  | boolean         | no       | `true` when the application needs a value. The default is `false`.                                                                                       |
| `secret`    | boolean         | no       | `true` for a credential. The default is `false`. A secret has no `enum`.                                                                                 |
| `minLength` | integer         | no       | 0 to 32768 characters. The default is 0.                                                                                                                 |
| `enum`      | list of strings | no       | The allowed values. At most 128 distinct values. Each holds at most 32768 bytes of valid UTF-8, has no NUL, and is at least `minLength` characters long. |

These names are reserved:

- Names that start with `SUPERVERSE_`, `DEX_`, `AWS_`, `LD_`, `GIT_`, or `GO`, which also covers names such as `GOOGLE_API_KEY`.
- `PATH`, `HOME`, `PORT`, `HOST`, `NODE_OPTIONS`, `SSL_CERT_FILE`, `SSL_CERT_DIR`, `PUBLIC_BASE_URL`, `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, and `NO_PROXY`.

```yaml
application:
  port: 8080
  healthPath: /api/health
  workerSlots: 8
  environment:
    - name: SUPPORT_INBOX
      required: true
    - name: CRM_API_TOKEN
      required: true
      secret: true
    - name: REGION
      enum: [eu, us]
```

<a id="application-required-one-of"></a>

### `application.requiredOneOf`

Each entry declares one requirement that any one of several groups of environment variables meets, such as a model API key or the settings of a custom endpoint. Use it when the application needs any one of several alternatives.

| Field    | Type                     | Required | Rule                                                                                   |
| -------- | ------------------------ | -------- | -------------------------------------------------------------------------------------- |
| `label`  | string                   | no       | 1 to 64 characters without control characters. Unique in the list. **Setup** shows it. |
| `groups` | list of lists of strings | yes      | 2 to 4 groups. Each group holds 1 to 8 names.                                          |

Each name in a group is declared in [`application.environment`](https://docs.superdurable.io/reference/dex-app/manifest.md#application-environment) with `required: false`, which is the default. A name declared `required: true` is an error, because the requirement decides when the variable is needed. A name appears once in its requirement. Two requirements may share a name. A rule that a `requiredOneOf` entry breaks is reported like any other manifest error: the import or publish says the manifest is invalid, and the message names the rule.

The requirement is met when every variable of one group is set to a value its declaration accepts. Give each member `minLength: 1` so that an empty value does not meet a group. Declare a credential member with `secret: true`. Dex Cloud shows an unmet requirement as a gap in **Setup**, with the code `ENVIRONMENT_ONE_OF_REQUIRED`. The gap blocks **Publish** and **Preview** start, like a missing required value.

```yaml
application:
  port: 8080
  healthPath: /api/health
  environment:
    - {name: ANTHROPIC_API_KEY, secret: true, minLength: 1}
    - {name: OPENAI_BASE_URL, minLength: 1}
    - {name: OPENAI_API_KEY, secret: true, minLength: 1}
  requiredOneOf:
    - label: Model
      groups:
        - [ANTHROPIC_API_KEY]
        - [OPENAI_BASE_URL, OPENAI_API_KEY]
```

<a id="flow-definitions"></a>

### `flowDefinitions`

Each entry names one Flow source with its only field, `sourcePath`.

| Field        | Type   | Required | Rule                                                   |
| ------------ | ------ | -------- | ------------------------------------------------------ |
| `sourcePath` | string | yes      | The path of a committed file from the repository root. |

A `sourcePath`:

- Is relative and clean: it has no leading `/`, no `.` segment, no `//`, and no trailing `/`. It holds no `..` anywhere, even inside a file name.
- Ends in `.go`, `.ts`, or `.json`. The build profile narrows this: `go-react-v1` takes `.go` files, and `node-ts-v1` takes `.ts` files or committed `.json` graphs.
- Appears once in the list.
- Names a committed regular file outside every `node_modules` directory.
- Names a file of at most 8 MiB for a `.json` graph and at most 32 MiB for any other source.

A `.json` source is a committed Flow Definition Graph (FDG) 2.0, such as a Dex Agents session graph. Dex Cloud renders the graph of a `.go` or `.ts` source from the code.

<a id="connectors"></a>

### `connectors`

Each entry declares one connection to a released connector of the [Dex connector library](https://github.com/superdurable/dex-connectors-library). The application's lockfile pins the same release: `go.mod` and `go.sum` for Go, `package-lock.json` for TypeScript. The build resolves the version from the lockfile.

| Field             | Type            | Required   | Rule                                                                                                                                                                                                    |
| ----------------- | --------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `connectionName`  | string          | yes        | Not empty. Unique in the list.                                                                                                                                                                          |
| `connectorId`     | string          | yes        | The connector's ID, such as `gmail`.                                                                                                                                                                    |
| `modulePath`      | string          | Go         | The published Go module, under `github.com/superdurable/dex-connectors-library/connectors/`.                                                                                                            |
| `package`         | string          | TypeScript | The npm package `@superdurable/connector-<name>`.                                                                                                                                                       |
| `version`         | string          | yes        | Go: the module version, such as `v0.25.2`. TypeScript: the exact npm release, such as `"0.7.0"`, quoted, with no `v` and no range.                                                                      |
| `authMethodId`    | string          | yes        | The authentication method of the release. Use `""` when the release has one method.                                                                                                                     |
| `optional`        | boolean         | no         | `true` lets Preview and Live start while no connection is chosen for it; once a connection is chosen it must be valid. The application must handle the connection being absent. The default is `false`. |
| `operations`      | list of strings | see below  | The operations the application calls. Each is a non-empty string.                                                                                                                                       |
| `triggerBindings` | list            | see below  | The Triggers the application binds.                                                                                                                                                                     |

An entry names either a `modulePath` or a `package`. It has at least one operation or one Trigger binding.

A `modulePath` names a connector with lowercase letters, digits, `-`, and `_` in each path segment. It may end in `/go`.

Each `triggerBindings` entry has two fields:

| Field         | Type   | Required | Rule                                                                                               |
| ------------- | ------ | -------- | -------------------------------------------------------------------------------------------------- |
| `triggerName` | string | yes      | The Trigger of the connector. Not empty.                                                           |
| `bindingName` | string | yes      | The binding's name. Not empty. The pair of `triggerName` and `bindingName` is unique in the entry. |

A TypeScript connector looks like this:

```yaml
connectors:
  - connectionName: slack
    connectorId: slack
    package: "@superdurable/connector-slack"
    version: "0.7.0"
    authMethodId: ""
    operations: [postThreadReply]
```

A TypeScript application installs each connector package with `npm install --save-exact`, at the `version` its entry names:

```bash
npm install --save-exact @superdurable/connector-slack@0.7.0
```

`package-lock.json` (`lockfileVersion` 2 or later) then holds the package at that version with a `sha512-` integrity. Preview and Live fetch that package's metadata from the public npm registry and verify it against the lockfile. A Flow source builds Steps from the package only when it passes that check. See [Connector Steps must be static](https://docs.superdurable.io/reference/dex-app/troubleshooting.md#connector-steps-must-be-static).

A Trigger binding is configurable when a Flow of the application declares it with configuration enabled, in its graph's `v2.connectorTriggerBindings`, at the release that `dex-app.yaml` pins. The first matching entry in Flow type order counts. When you use Preview, it starts after every declared Trigger binding is configured (for connectors that are not optional or have a chosen connection). The import checks this only when every Flow source is a committed `.json` graph, because a `.go` or `.ts` source has a graph only after it is rendered.

<a id="yaml-rules"></a>

## YAML rules

`dex-app.yaml` is strict YAML. YAML 1.1 and YAML 1.2 libraries read every accepted file the same way. JSON is accepted, because JSON is YAML.

The file holds:

- Exactly one YAML document, whose root is a mapping.
- Mappings whose keys are strings, each key once.
- Sequences.
- Strings in any style. A quoted or block scalar is always a string.
- Unsigned decimal integers up to 2147483647, written without a leading zero.
- `true` and `false`, also written `True`, `TRUE`, `False`, or `FALSE`.
- `null`, `~`, or an empty value, which reads as absent.

The decoder refuses the following, with the line and column where it can:

- Anchors (`&name`), aliases (`*name`), merge keys (`<<`), and tags such as `!!str`.
- A repeated key.
- A key that reads as something other than a string, such as `1` or `true`.
- A second document after `---`.
- A floating-point number, such as `1.5` or `1e3`, and a signed number, such as `-1` or `+1`.
- A date, such as `2026-11-16`.
- A plain value that YAML 1.1 and YAML 1.2 read differently: `yes`, `no`, `on`, `off`, `y`, and `n` in any case, `=`, a number with a leading zero such as `0123`, a version such as `0.6.0`, a hexadecimal, octal, or binary number such as `0x1F`, and a time such as `12:30`.

The errors for a file over the size limit, an empty file, and a second document carry no line and column.

Quote a value that must be a string:

```yaml
version: "0.7.0"
authMethodId: ""
enum: ["yes", "no"]
```

<a id="limits"></a>

## Limits

| What                                                                                        | Limit      |
| ------------------------------------------------------------------------------------------- | ---------- |
| `dex-app.yaml`                                                                              | 1 MiB      |
| Nesting in `dex-app.yaml`                                                                   | 64 levels  |
| Values in `dex-app.yaml` (each key, value, and item)                                        | 100,000    |
| One scalar in `dex-app.yaml`                                                                | 64 KiB     |
| One integer in `dex-app.yaml`                                                               | 2147483647 |
| `flowDefinitions` entries                                                                   | 1,000      |
| One committed `.json` Flow graph                                                            | 8 MiB      |
| One other Flow source                                                                       | 32 MiB     |
| `application.environment` entries                                                           | 128        |
| `application.requiredOneOf` entries                                                         | 8          |
| `.dex/template.json`                                                                        | 64 KiB     |
| Root `Makefile`                                                                             | 4 MiB      |
| `package.json` and `package-lock.json` of `node-ts-v1`; `web/package.json` of `go-react-v1` | 4 MiB each |
| Files in the repository                                                                     | 5,000      |
| One file                                                                                    | 10 MiB     |
| All files together                                                                          | 100 MiB    |
| Files plus distinct directories plus 1                                                      | 20,000     |
| The source archive in the worst case                                                        | 128 MiB    |

<a id="when-checked"></a>

## When each rule is checked

The import checks S1, S2, S3, S4, and S8. It lists every rule the repository breaks before you create the project. Dex Cloud checks the other rules in commit checks, when it builds Preview or Live, or when it runs the application.

| Rule                                                                | At import                                                               | Later                                                                                                                                                |
| ------------------------------------------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| [S1](https://docs.superdurable.io/reference/dex-app/manifest.md#s1) | Every field                                                             | Commit checks read `schemaVersion`, `buildProfile`, `checkStatic`, and `testApplication`                                                             |
| [S2](https://docs.superdurable.io/reference/dex-app/manifest.md#s2) | The manifest, every Flow source, and Trigger bindings of `.json` graphs | Commit checks read the manifest. The build checks the Flow sources. Preview and Live render every Flow and refuse an invalid one.                    |
| [S3](https://docs.superdurable.io/reference/dex-app/manifest.md#s3) | That each file is present                                               | The Live build compiles them                                                                                                                         |
| [S4](https://docs.superdurable.io/reference/dex-app/manifest.md#s4) | The root `Makefile`                                                     | Commit checks run the targets. Dex Cloud runs `bootstrap` when it prepares the coding workspace, which Preview uses. Preview runs `generate` for Go. |
| [S5](https://docs.superdurable.io/reference/dex-app/manifest.md#s5) | Not checked                                                             | Commit checks run `make test-app`                                                                                                                    |
| [S6](https://docs.superdurable.io/reference/dex-app/manifest.md#s6) | Not checked                                                             | Preview and Live run the application                                                                                                                 |
| [S7](https://docs.superdurable.io/reference/dex-app/manifest.md#s7) | Not checked                                                             | Commit checks of Go code; every Go Live build                                                                                                        |
| [S8](https://docs.superdurable.io/reference/dex-app/manifest.md#s8) | All of it                                                               | The Live build refuses links, unclean paths, and archives over its limits                                                                            |

The license of the repository is its owner's choice. Dex Cloud leaves it unchecked.

<a id="import-report"></a>

## Read an import report

Each finding names where it is, what is wrong and how to fix it, with a link to its rule; the code identifies it on this page. Each code has its own section below, with the anchor `#<code>`, such as [`flow_source_missing`](https://docs.superdurable.io/reference/dex-app/manifest.md#flow_source_missing).

The report lists at most 10 findings of each rule and counts the rest.

If the import says the repository cannot be read, give the SuperDurable Dex Cloud GitHub App access to the repository on GitHub. That case is outside the finding list.

[Troubleshooting and FAQ](https://docs.superdurable.io/reference/dex-app/troubleshooting.md) covers common problems outside the finding list, and refusals of older repositories.

<a id="s1"></a>

## S1: Template manifest

`.dex/template.json` exists at the root, is at most 64 KiB, and is a JSON object with the fields of the [template manifest](https://docs.superdurable.io/reference/dex-app/manifest.md#template-manifest). `schemaVersion` is `1`. `buildProfile`, `kind`, and `stack` are supported and agree with each other. `openapiSpec` is `openapi/openapi.yaml` and `agentInstructions` is `AGENTS.md`, and both files exist. `commands` declares `bootstrap`, `checkStatic`, and `testApplication`, each as `make <target>`.

<a id="template_manifest_missing"></a>

### `template_manifest_missing`

The repository lacks `.dex/template.json`.

Add `.dex/template.json` at the repository root, starting from the [example](https://docs.superdurable.io/reference/dex-app/manifest.md#template-manifest), and set `buildProfile`, `kind`, and `stack` to your application's.

<a id="template_manifest_too_large"></a>

### `template_manifest_too_large`

The template manifest is larger than 64 KiB.

Reduce `.dex/template.json` to the fields the example shows. Dex Cloud reads at most 64 KiB of it.

<a id="template_manifest_invalid"></a>

### `template_manifest_invalid`

The template manifest fails to decode as a JSON object with the template manifest's fields.

Fix the JSON at the line shown, often a missing comma or quote, and give each field the type the example shows.

<a id="template_schema_version"></a>

### `template_schema_version`

`schemaVersion` is missing, or it holds a value other than `1`.

Set `schemaVersion` to the number `1`, the only template manifest version Dex Cloud reads:

```json
"schemaVersion": 1
```

<a id="build_profile_unknown"></a>

### `build_profile_unknown`

`buildProfile` is missing or names a build profile that Dex Cloud does not build.

Set `buildProfile` to `go-react-v1` for a Go process with a React web UI, or to `node-ts-v1` for a TypeScript process or agent.

<a id="kind_unknown"></a>

### `kind_unknown`

`kind` holds a value other than `process` and `agent`.

Set `kind` to `process` for an application of Flows, or to `agent` for an application built with Dex Agents.

<a id="stack_unknown"></a>

### `stack_unknown`

`stack` names an unknown stack.

Set `stack` to the language or harness the application is written in: `go` or `typescript` for a process, `pi` for an agent.

<a id="stack_unsupported"></a>

### `stack_unsupported`

`stack` names a stack that Dex Cloud does not build yet, such as `claude-agent-sdk`, `vercel-ai`, `mastra` and `openai-agents`.

Build the application on a stack Dex Cloud builds today, `go` or `typescript` for a process or `pi` for an agent, and set `stack` to it.

<a id="stack_kind_mismatch"></a>

### `stack_kind_mismatch`

The stack belongs to the other kind.

Make `kind` and `stack` agree: set `kind` to the kind the stack belongs to, or choose a stack of the kind you set.

```json
"kind": "process",
"stack": "go"
```

<a id="stack_profile_mismatch"></a>

### `stack_profile_mismatch`

The build profile builds another stack.

Set `buildProfile` to the profile that builds the stack: `go-react-v1` for `go`, `node-ts-v1` for `typescript` and `pi`.

```json
"buildProfile": "node-ts-v1",
"stack": "typescript"
```

<a id="context_path_field"></a>

### `context_path_field`

`openapiSpec` or `agentInstructions` names another path.

Set `openapiSpec` to `openapi/openapi.yaml` and `agentInstructions` to `AGENTS.md`, the fixed paths Dex Cloud reads, and move the files there.

<a id="openapi_document_missing"></a>

### `openapi_document_missing`

The repository lacks `openapi/openapi.yaml`.

Commit the OpenAPI document of the application's HTTP API at `openapi/openapi.yaml`. The build generates the server from it.

```yaml
openapi: 3.1.0
info:
  title: Orders
  version: 1.0.0
paths:
  /api/health:
    get:
      operationId: getHealth
      responses:
        "200":
          description: The application is healthy.
```

<a id="agent_instructions_missing"></a>

### `agent_instructions_missing`

The repository lacks `AGENTS.md`.

Commit `AGENTS.md` at the repository root with the instructions a coding agent follows in this repository, such as how to build and test it.

<a id="command_missing"></a>

### `command_missing`

`commands` lacks `bootstrap`, `checkStatic`, or `testApplication`.

Add the command under `commands` in `.dex/template.json` as `make <target>`, and define that target in the root `Makefile`.

<a id="command_not_make"></a>

### `command_not_make`

A command has another form than `make <target>`.

Move what the command runs into a target of the root `Makefile`, and write the command as `make <target>`, the only form Dex Cloud runs.

```json
"testApplication": "make test-app"
```

<a id="s2"></a>

## S2: Deployment manifest

`dex-app.yaml` exists at the root, is at most 1 MiB, follows the [YAML rules](https://docs.superdurable.io/reference/dex-app/manifest.md#yaml-rules), and passes every field rule of the [deployment manifest](https://docs.superdurable.io/reference/dex-app/manifest.md#dex-app-yaml). It declares at most 1,000 Flow sources. Each is a committed regular file outside `node_modules`, at most 8 MiB for a `.json` graph and 32 MiB for any other source. A Flow declares each Trigger binding at the pinned release. The import checks that last rule only when every Flow source is a committed `.json` graph.

<a id="app_manifest_missing"></a>

### `app_manifest_missing`

The repository lacks `dex-app.yaml`.

Add `dex-app.yaml` at the repository root to declare the application's port and health path, its Flow sources, and its connectors. Start from the [example](https://docs.superdurable.io/reference/dex-app/manifest.md#dex-app-yaml).

<a id="app_manifest_too_large"></a>

### `app_manifest_too_large`

`dex-app.yaml` is larger than 1 MiB.

Keep `dex-app.yaml` within 1 MiB by declaring only the Flow sources and connectors the application uses.

<a id="app_manifest_invalid"></a>

### `app_manifest_invalid`

Dex Cloud refuses `dex-app.yaml`. The message names the field or the YAML rule.

Correct the part of `dex-app.yaml` that the message names, comparing it with the [example](https://docs.superdurable.io/reference/dex-app/manifest.md#dex-app-yaml), the [field rules](https://docs.superdurable.io/reference/dex-app/manifest.md#top-level-fields), and the [YAML rules](https://docs.superdurable.io/reference/dex-app/manifest.md#yaml-rules).

<a id="flow_definitions_too_many"></a>

### `flow_definitions_too_many`

`dex-app.yaml` declares more than 1,000 Flow sources.

Declare at most 1,000 Flow sources: merge small Flows, or remove the Flows the application no longer runs.

<a id="flow_source_node_modules"></a>

### `flow_source_node_modules`

A Flow source is under `node_modules`.

Move the Flow source into the application's own source tree, such as `src/`, and point its `sourcePath` there.

```yaml
flowDefinitions:
  - sourcePath: src/order-flow.ts
```

<a id="flow_source_missing"></a>

### `flow_source_missing`

A declared Flow source is missing as a committed regular file.

Commit the Flow source at this path, or correct its `sourcePath` in `dex-app.yaml` to the file's path from the repository root.

<a id="flow_source_too_large"></a>

### `flow_source_too_large`

A Flow source is larger than the build reads.

Split the Flow into smaller Flows, or move helper code into other files. A committed `.json` graph may hold 8 MiB, and any other Flow source 32 MiB.

<a id="flow_graph_invalid_json"></a>

### `flow_graph_invalid_json`

A committed `.json` graph has invalid JSON or a field of the wrong type.

Export the graph again as the FDG 2.0 JSON that Dex writes instead of editing it by hand, and check the line shown for a syntax error.

<a id="flow_graph_invalid"></a>

### `flow_graph_invalid`

A committed `.json` graph fails the FDG 2.0 checks.

Export the graph again from Dex so that it is a valid FDG 2.0 graph, and fix the part the message names.

<a id="flow_bundle_invalid"></a>

### `flow_bundle_invalid`

The declared graphs conflict, for example because two graphs define one Flow type.

Resolve the conflict the message names between the declared graphs, so that they load together.

<a id="trigger_binding_undeclared"></a>

### `trigger_binding_undeclared`

`dex-app.yaml` declares a Trigger binding that no Flow declares.

Declare the Trigger binding in a Flow with configuration enabled (`v2.connectorTriggerBindings`), or remove it from `dex-app.yaml`.

<a id="trigger_binding_release_mismatch"></a>

### `trigger_binding_release_mismatch`

The Flow that declares the Trigger binding pins another connector release.

Pin the same connector release, its `modulePath` and `version`, in `dex-app.yaml` and in the Flow that declares the Trigger binding.

<a id="s3"></a>

## S3: Build profile files

The repository holds the files its build profile needs. Each Flow source has a suffix the profile accepts. A file that S1 already reported, such as `openapi/openapi.yaml`, is reported once.

`go-react-v1` needs:

| Requirement                                                                         | Why                                                                              |
| ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `go.mod` and `go.sum`                                                               | The build downloads the modules offline, so every dependency needs its checksum. |
| A Go package `cmd/server`                                                           | The build compiles `./cmd/server`.                                               |
| `openapi/openapi.yaml`                                                              | The build generates the server from it.                                          |
| `tools/openapi/go.mod` and `tools/openapi/go.sum`                                   | The modules of the OpenAPI code generator.                                       |
| `web/package.json` with `generate` and `build` scripts, and `web/package-lock.json` | The build runs `npm ci`, `generate`, and `build` in `web/`.                      |
| A `generate` target in the root `Makefile`                                          | Preview runs `make generate`.                                                    |
| `.go` Flow sources                                                                  | The profile renders Go Flows only.                                               |

The Live build also runs `go vet ./...` and `go test ./...`, and it needs the Dex Go SDK `github.com/superdurable/dex/sdk-go` at `v1.16.0` or later. The build checks these. The import leaves them unchecked.

`node-ts-v1` needs:

| Requirement                                                | Why                                                              |
| ---------------------------------------------------------- | ---------------------------------------------------------------- |
| `package.json` and `package-lock.json`, each at most 4 MiB | The build runs `npm ci`.                                         |
| A `build` script in `package.json` that writes `dist`      | The build and Preview run `npm run build`.                       |
| `main` in `package.json`                                   | Node.js starts the module that `main` names.                     |
| `.ts` Flow sources or committed `.json` graphs             | The profile renders TypeScript Flows and reads committed graphs. |

The build runs Node.js 22.19 or later, or Node.js 24. A `tsconfig.build.json` is needed only when your `build` script reads it.

<a id="flow_source_suffix"></a>

### `flow_source_suffix`

A Flow source has a suffix that the build profile rejects.

Write the Flow in the build profile's language: `.go` files for `go-react-v1`; `.ts` files or committed `.json` graphs for `node-ts-v1`.

<a id="profile_file_missing"></a>

### `profile_file_missing`

A file the build profile needs is missing, such as `go.sum` or `package-lock.json`.

Commit this file, which the build copies. Create a lockfile with its tool, such as `npm install` for `package-lock.json` or `go mod tidy` for `go.sum`.

<a id="profile_file_too_large"></a>

### `profile_file_too_large`

An npm manifest is larger than the build reads.

Shrink the file below the size the message names, for example by dropping unused dependencies.

<a id="go_package_missing"></a>

### `go_package_missing`

The repository lacks the Go package `cmd/server`.

Add the Go package `cmd/server` with the `main` function that starts the application, as the Go template does. The build compiles `./cmd/server`.

```go
// cmd/server/main.go
package main

func main() {
	// Start the web or the worker mode from os.Args[1].
}
```

<a id="npm_package_invalid"></a>

### `npm_package_invalid`

`package.json` has invalid JSON or a field of the wrong type.

Fix the JSON of `package.json` at the line shown. `npm pkg fix` or a JSON linter points at the error.

<a id="npm_script_missing"></a>

### `npm_script_missing`

`package.json` lacks a script that the build runs.

Add the script under `scripts` in `package.json`. The build runs it with `npm run`.

```json
"scripts": {
  "build": "tsc -p tsconfig.build.json"
}
```

<a id="npm_main_missing"></a>

### `npm_main_missing`

`package.json` lacks `main`.

Set `main` in `package.json` to the compiled entry module, which Node.js starts.

```json
"main": "dist/main.js"
```

<a id="s4"></a>

## S4: Make targets

The root `Makefile` defines a rule for every target that `commands` names, and for `generate` with `go-react-v1`. The import reads only the file named `Makefile` at the root. It takes a target from each line that starts in the first column with `target:`, and a line may name several targets. A target that only an included file defines counts as missing. The root `Makefile` is at most 4 MiB.

<a id="makefile_missing"></a>

### `makefile_missing`

The repository lacks a root `Makefile`.

Add a `Makefile` at the repository root that defines a target for every make command of `.dex/template.json`.

```makefile
bootstrap:
	./scripts/bootstrap.sh
check-static:
	go vet ./...
test-app:
	go test ./internal/apptest
```

<a id="makefile_too_large"></a>

### `makefile_too_large`

The root `Makefile` is larger than 4 MiB.

Keep the root `Makefile` within 4 MiB by moving long recipes into scripts that it calls.

<a id="make_target_missing"></a>

### `make_target_missing`

A make target is missing, or only an included file defines it.

Define the target in the root `Makefile` itself. Dex Cloud reads only the root `Makefile`, without the files it includes.

```makefile
generate:
	./scripts/generate-openapi.sh
```

<a id="s5"></a>

## S5: Application tests

`make test-app` runs the application's API tests against a Dex Server that exists only for that run, with the mock packages of the connectors. Commit checks run it when the template manifest declares `testApplication`. Preview and Live start without it. The import leaves it unchecked, so it has no findings.

<a id="s6"></a>

## S6: Runtime contract

One build runs in two modes, chosen by its first argument:

- `web` serves the application and its `healthPath` on the port in the `PORT` environment variable.
- `worker` runs the Worker. It answers `GET /readyz` on the readiness address of the runtime settings once its slots are registered.

Both modes read the runtime settings file that Dex Cloud places under `/tmp`. They write only under `/tmp`. The application runs as an unprivileged user on a read-only root file system.

On SIGTERM, the web process finishes its open requests. The Worker drops readiness, drains its running tasks within the drain timeout, and exits.

Dex Cloud renders and publishes the Flow definitions from the declared Flow sources, so the Worker uploads none.

Preview and Live check this rule by running the application. The import leaves it unchecked, so it has no findings.

<a id="s7"></a>

## S7: Connector mocks stay in tests

Only test code imports a connector mock package.

Commit checks enforce this for Go code. Every Go Live build enforces it too, and fails with `connector-mock-in-production`. TypeScript code is outside this check. The import leaves it unchecked, so it has no findings.

<a id="s8"></a>

## S8: Repository shape

The repository:

- Is active (not archived), and is your own repository rather than one Dex Cloud created for a project.
- Has the default branch `main`, and `main` has a commit.
- Belongs to one project at most: this one.
- Has a complete tree listing on GitHub.
- Holds only regular files: submodules and symbolic links are refused, even a link that points inside the repository.
- Holds no committed secret file. The match ignores letter case:
  - `.env` and `.env.*`, except `.env.example`, `.env.sample`, and `.env.template`.
  - SSH private keys `id_rsa*` and `id_ed25519*`, except their `.pub` files.
  - `*.pem` files outside a `testdata` directory.
- Fits the file and archive [limits](https://docs.superdurable.io/reference/dex-app/manifest.md#limits): 5,000 files, 10 MiB per file, 100 MiB in total, 20,000 files and directories, and a source archive of 128 MiB in the worst case.

The secret file check matches only these names. A secret inside another file goes undetected.

After the import, only the Live build rechecks part of S8. It refuses links, unclean paths, and archives over its limits.

<a id="tree_truncated"></a>

### `tree_truncated`

GitHub returned an incomplete tree, so the import reports only this finding.

Remove generated, vendored, and build output files from `main`, and list them in `.gitignore`, so that the repository stays within the file limit.

```text
# .gitignore
node_modules/
dist/
.local/
```

<a id="submodule"></a>

### `submodule`

The repository has a Git submodule.

Replace the submodule with its files: remove it with `git rm`, then copy its files into the repository and commit them.

```bash
git rm <path>
cp -R <its files> <path>
git add <path>
```

<a id="symbolic_link"></a>

### `symbolic_link`

The repository has a symbolic link.

Replace the link with a copy of what it points to, or change the code to read the target path directly.

<a id="unsupported_entry_mode"></a>

### `unsupported_entry_mode`

An entry has a Git mode other than a regular file.

Commit a regular file at this path instead.

<a id="repository_file_too_large"></a>

### `repository_file_too_large`

A file is larger than 10 MiB.

Remove the file from `main`, and keep large data outside the repository, such as in object storage, loading it at run time.

<a id="secret_file"></a>

### `secret_file`

A secret file is committed, such as `.env`.

Delete the file from `main`, add it to `.gitignore`, and rotate every credential it held, which the Git history keeps. Commit an example such as `.env.example` instead.

```text
# .gitignore
.env
.env.*
!.env.example
```

<a id="too_many_files"></a>

### `too_many_files`

The repository has more than 5,000 files.

Remove generated, vendored, and build output files from `main`, and list them in `.gitignore`.

<a id="repository_too_large"></a>

### `repository_too_large`

The files hold more than 100 MiB in total.

Remove large generated or binary files from `main`, list them in `.gitignore`, and keep large data outside the repository.

<a id="archive_too_many_entries"></a>

### `archive_too_many_entries`

The files and their directories make more than 20,000 archive entries.

Reduce the files and directories of `main`: remove generated and vendored trees, and list them in `.gitignore`.

<a id="archive_too_large"></a>

### `archive_too_large`

The source archive may exceed 128 MiB with its headers.

Remove large or generated files from `main`, or shorten very long paths, so that the source archive fits the release build.

<a id="repository_archived"></a>

### `repository_archived`

The repository is archived.

Unarchive the repository in its settings on GitHub, then check it again.

<a id="repository_managed"></a>

### `repository_managed`

Dex Cloud created this repository for a project.

Open the project Dex Cloud created this repository for, or import a repository of your own.

<a id="repository_bound_elsewhere"></a>

### `repository_bound_elsewhere`

Another project already uses the repository.

Open the project that already uses this repository, or delete that project first. A repository belongs to one project at a time.

<a id="default_branch_not_main"></a>

### `default_branch_not_main`

The default branch has another name than `main`.

Make `main` the repository's default branch in its settings, renaming the current one if needed, then check again.

```bash
git branch -m master main
git push -u origin main
```

<a id="main_branch_missing"></a>

### `main_branch_missing`

The repository is empty, or it lacks a `main` branch.

Push the application to the branch `main`, then check again.

```bash
git push -u origin main
```

<a id="next"></a>

## Next

- [Run Dex in Production](https://docs.superdurable.io/components/production.md): the checklist items for your Flow code and code changes apply to a Managed Dex App too.
- [Managed Dex App](https://docs.superdurable.io/components/managed-dex-app.md): import a repository and publish it to Live, with an optional Preview.
