# SourceMapping (/docs/api/interfaces/SourceMapping)



Defined in: [packages/core/src/sourcemap.ts:18](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/sourcemap.ts#L18)

Source maps are reconstructed at emit time rather than threaded through the
passes. Provenance lives in the typed IR's `ctx.origins` side-table: passes
pin each original job/step/fragment's origin before mutating, and carry it
onto clones/derived nodes, so a node that a macro moves still points at its
true source. We never re-derive provenance here — we re-parse the emitted body
for line numbers and resolve each node through the IR.

`makeResolveOrigin(ctx)` is the single resolution seam: it returns the lone
`(path) => Range | undefined` function `buildSourceMap` resolves through.

## Properties [#properties]

### generated [#generated]

```ts
generated: object;
```

Defined in: [packages/core/src/sourcemap.ts:20](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/sourcemap.ts#L20)

1-based line in the generated workflow (including any banner).

#### line [#line]

```ts
line: number;
```

***

### original [#original]

```ts
original: Position;
```

Defined in: [packages/core/src/sourcemap.ts:24](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/sourcemap.ts#L24)

1-based position in the original `.actio.yml`.

***

### path? [#path]

```ts
optional path?: string;
```

Defined in: [packages/core/src/sourcemap.ts:26](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/sourcemap.ts#L26)

Dotted data path of the node — a debugging aid and IR hook.

***

### source [#source]

```ts
source: number;
```

Defined in: [packages/core/src/sourcemap.ts:22](https://github.com/austenstone/actio/blob/2b01e694a0f76521d8c073f3c6a2e48917d2c9d9/packages/core/src/sourcemap.ts#L22)

Index into `SourceMap.sources`.


## Sitemap

Browse the full documentation: [Markdown sitemap](https://austenstone.github.io/actio/sitemap.md) · [XML sitemap](https://austenstone.github.io/actio/sitemap.xml)