# a-transformation (adapter system)

Input-typed transformation registry: 55 adapters keyed "<inputType>.<name>" across 26 input types (string, hex, base64, bytes, json, yaml, csv, url, html, markdown, code, env, geo, vector...


Input-typed transformation **registry**. Ported from `leumas-middleware/lib/a.transformation` — 52
adapters across 26 input types. Stripped: `server.js` + static server, `frontend/`, `src/cli`,
`src/server`, `src/core` runner/registry (the SDK/CLI/HTTP shells), `bin/`, `fixtures/`.

Each source adapter (`export async function run(input, ctx)` + `meta.json`) is preserved under
[`./adapters/<inputType>/<name>/`](./adapters). Tools are keyed `"<inputType>.<name>"` and called as
`adapters[id] = (args) => run(args.input, { options: args.options ?? args })`. All 52 use only Node
builtins — **no external dependencies**.

Port fixes: deprecated import assertions (`assert { type: 'json' }`) rewritten to import attributes
(`with { type: 'json' }`); `code.stripComments` had corrupted regex literals (`//*[sS]*?*//g`) — fixed
to correct block/line-comment stripping.

## Input types (26)

archive, audio, base64, bytes, cli-args, code, config, csv, dataset, env, files, folders, geo, hex,
html, image, json, markdown, stream, string, timestamps, url, vector, video, webhook, yaml.

## Examples

| tool | args | result |
|------|------|--------|
| `string.slugify` | `{ input: 'Hello World!', options: { separator: '-' } }` | `"hello-world"` |
| `string.base64` | `{ input: 'hi' }` | base64 string |
| `hex.normalize` | `{ input: '0xAA bb cc' }` | normalized hex |
| `json.parse` / `json.stringify` | `{ input }` | parsed / stringified |
| `code.stripComments` | `{ input: 'a//x\nb/*y*/c' }` | comment-free source |

The exported `inputTypes` array lists all input-type groups. Each adapter's `meta.json`
(options / inputFields / returns) lives beside its `adapter.js`.


---
Source: shared/engines/adapters/domain/a-transformation/README.md
Canonical: https://docs.leumas.tech/p/adapters/domain/a-transformation
