Project Files
A code automation project is a folder. You deploy it with type-cli automations deploy.
Directorymy-automation/
- type.json the project settings
- fixtures.json optional test cases
Directorysrc/
- main.ts the entrypoint
- format.ts other modules
Directory.type/ made by the CLI; never uploaded
- project.json
- deployment.json
type.json
Section titled “type.json”{ "name": "Hourly check", "description": "Record the scheduled time in run history", "entrypoint": "src/main.ts"}| Field | Required | Default | Rules |
|---|---|---|---|
name | Yes | — | 1 to 200 characters. Must be unique in the Space. |
description | No | — | At most 2,000 characters. |
entrypoint | No | src/main.ts | The file that exports deployment and the default class. Ends in .ts, .js, .mts, or .mjs. |
expiration | No | The source value | An expiration that overrides the deployment export. null removes the expiration. |
type.json must be a regular file smaller than 64 KiB. Type rejects unknown fields.
Which files Type uploads
Section titled “Which files Type uploads”The CLI reads the folder and uploads only source files.
| Rule | Detail |
|---|---|
| File types | Only .ts, .js, .mts, .mjs, and .json. The CLI skips other files, for example .md, .tsx, and .yaml. |
| Hidden files | Names that start with . are skipped, for example .env and .type/. |
| Symbolic links | Skipped. |
| Ignore files | The CLI follows .gitignore and .typeignore in each folder. |
| Folders | node_modules, dist, build, coverage, generated, and vendor are skipped at all levels. |
| Config and secrets | type.json, package.json, package-lock.json, tsconfig*.json, credential*.json, secret*.json, and service-account*.json are skipped. |
| Tests | *.test.*, *.spec.*, *.generated.*, and *.d.ts are skipped. |
Root fixtures.json | Read as test cases, not uploaded as code. A fixtures.json in a subfolder is uploaded as a normal module. |
Size limits
Section titled “Size limits”- At most 256 files.
- At most 1 MiB for all files together, including
fixtures.json. - Each file path is 1 to 255 characters. Paths must be relative, with no
..parts. - These paths are reserved:
node_modules,.type-installed, and.type-contract.
Dependencies
Section titled “Dependencies”Type does not install packages. A package.json file is not uploaded. Your code can import only the allowed modules and relative files in the project.
fixtures.json
Section titled “fixtures.json”An optional array of test cases. Type runs them during each deploy. If one fails, the deploy fails. See Test with Fixtures.
[ { "name": "records the scheduled time", "subscriptionId": "hourly", "payload": { "scheduledAt": "2026-10-07T12:00:00.000Z" }, "toolResponses": [], "expectedOutput": { "checkedAt": "2026-10-07T12:00:00.000Z" } }]| Field | Required | Rules |
|---|---|---|
name | Yes | 1 to 120 characters. Unique in the file. |
subscriptionId | Yes | The subscription key to run. |
payload | Yes | The event, in the same shape as a live event. |
checkpoint | No | The value of ctx.checkpoint.value for this case. |
matcher | No | Simulated matcher results: { decision?: "match" | "skip", ownSlackUserId?, jev?: { model, answers } }. |
toolResponses | No | At most 128 { request, response } pairs for ctx.tools.call, ctx.read.call, and ctx.write.call. |
integrationResponses | No | At most 128 { request, response } pairs for ctx.read.request and ctx.write.request. |
expectedOutput | No | The exact JSON value that the method passes to ctx.setOutput. |
expectedError | No | Text that the error message must contain. 1 to 2,000 characters. |
- A file can have at most 20 cases.
- Do not set both
expectedOutputandexpectedErrorin one case. - Omit both for an event that a matcher filters out.
.type/project.json
Section titled “.type/project.json”{ "projectId": "0b5a8f2e-7c1d-4e3f-9a6b-2c4d6e8f0a1b" }The CLI makes this file at the first deploy. Type uses the project ID and the Space to find the automation.
- Keep this file, and commit it to version control.
- If you delete it, the next deploy makes a new automation.
- If you copy the folder, also make a new project ID, or the two folders update the same automation.
.type/deployment.json
Section titled “.type/deployment.json”The CLI writes this file at each deploy. It records the last attempt:
{ "projectId": "0b5a8f2e-...", "deploymentId": "3f6c2a4e-...", "automationId": "atask_01k...", "serverUrl": "https://api.type.com", "space": "engineering"}Use deploymentId with type-cli automations deployment to read the result of an interrupted deploy. The CLI does not read this file to continue a deploy.