---
title: ChartText
description: The Chart text (ADR-0070).
---

# `ChartText`

Type, in `@jr2/orchestrator/src/chart.ts`. The signature of an export, or a type that it names, names this type. The [Authoring surface](../authoring-surface.md) page lists each export. This type is not an export of `@jr2/orchestrator`, so a workflow module does not import it by name.

```ts
type ChartText = {
  version?: 1;
  id?: string;
  context?: Record<string, ChartJson>;
  events?: Record<string, ChartEvent>;
  agents?: Record<string, ChartAgent>;
  initial: string;
  states: Record<string, ChartState>;
  output?: ChartValue;
};
```

The Chart text ([ADR-0070](../decisions/0070-a-machine-lends-its-parts-to-a-chart.md)). Every key here is the whole grammar: the door refuses any other.

**Fields**

- `version` (optional): `1`
- `id` (optional): `string`

  The machine id. Default: the Open body's slot key. A `#` target needs it.
- `context` (optional): `Record<string, ChartJson>`

  The initial context: plain JSON, no references.
- `events` (optional): `Record<string, ChartEvent>`
- `agents` (optional): `Record<string, ChartAgent>`
- `initial`: `string`
- `states`: `Record<string, ChartState>`
- `output` (optional): [`ChartValue`](type-chartvalue.md)

  The Chart's output, resolved when the Chart is done.
