axint.compile
Compile TypeScript defineIntent() calls into native Swift App Intent code. Returns generated Swift or diagnostics on validation failure.
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. Inputs: source is TypeScript DSL text; options add sandbox, format, plist, or entitlement proof without writing files. 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 |