Skip to content
Changelog

Report a bug

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
{
"name": "Hourly check",
"description": "Record the scheduled time in run history",
"entrypoint": "src/main.ts"
}
FieldRequiredDefaultRules
nameYes—1 to 200 characters. Must be unique in the Space.
descriptionNo—At most 2,000 characters.
entrypointNosrc/main.tsThe file that exports deployment and the default class. Ends in .ts, .js, .mts, or .mjs.
expirationNoThe source valueAn 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.

The CLI reads the folder and uploads only source files.

RuleDetail
File typesOnly .ts, .js, .mts, .mjs, and .json. The CLI skips other files, for example .md, .tsx, and .yaml.
Hidden filesNames that start with . are skipped, for example .env and .type/.
Symbolic linksSkipped.
Ignore filesThe CLI follows .gitignore and .typeignore in each folder.
Foldersnode_modules, dist, build, coverage, generated, and vendor are skipped at all levels.
Config and secretstype.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.jsonRead as test cases, not uploaded as code. A fixtures.json in a subfolder is uploaded as a normal module.
  • 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.

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.

An optional array of test cases. Type runs them during each deploy. If one fails, the deploy fails. See Test with Fixtures.

fixtures.json
[
{
"name": "records the scheduled time",
"subscriptionId": "hourly",
"payload": { "scheduledAt": "2026-10-07T12:00:00.000Z" },
"toolResponses": [],
"expectedOutput": { "checkedAt": "2026-10-07T12:00:00.000Z" }
}
]
FieldRequiredRules
nameYes1 to 120 characters. Unique in the file.
subscriptionIdYesThe subscription key to run.
payloadYesThe event, in the same shape as a live event.
checkpointNoThe value of ctx.checkpoint.value for this case.
matcherNoSimulated matcher results: { decision?: "match" | "skip", ownSlackUserId?, jev?: { model, answers } }.
toolResponsesNoAt most 128 { request, response } pairs for ctx.tools.call, ctx.read.call, and ctx.write.call.
integrationResponsesNoAt most 128 { request, response } pairs for ctx.read.request and ctx.write.request.
expectedOutputNoThe exact JSON value that the method passes to ctx.setOutput.
expectedErrorNoText that the error message must contain. 1 to 2,000 characters.
  • A file can have at most 20 cases.
  • Do not set both expectedOutput and expectedError in one case.
  • Omit both for an event that a matcher filters out.
{ "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.

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.