axint.compile
Compiles TypeScript defineIntent() calls into native Swift App Intent code, returning generated Swift, Info.plist, and entitlements as strings without writing files. On validation failure, returns detailed diagnostics with fix suggestions.
Instructions
Compile TypeScript source (defineIntent() call) into native Swift App Intent code. Returns { swift, infoPlist?, entitlements? } as a string — no files written, no network requests. On validation failure, returns diagnostics (severity, AX error code, position, fix suggestion) instead of Swift. Use: use when TypeScript DSL source should become Swift; use validate for cheaper preflight only. Effects: read-only generated Swift/diagnostics; writes no files and uses no network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | When true (default), pipes generated Swift through swift-format with Axint's. | |
| source | Yes | Full TypeScript source code containing a defineIntent() call. Must be a complete file starting with an axint import, not a fragment. | |
| fileName | No | Optional file name used in diagnostic messages, e.g., 'SendMessage.intent.ts'. | |
| emitInfoPlist | No | When true, returns an Info.plist XML fragment declaring the intent's. | |
| emitEntitlements | No | When true, returns an .entitlements XML fragment for the intent's declared. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| isError | No |