Generated TypeScript Clients

UXC ships a daemon client package for local app integration:

npm install @holon-run/uxc-daemon-client

The package can also generate typed TypeScript clients from the exported host-scoped runtime codegen schema.

Export Host-Scoped Codegen Input

From CLI:

uxc <host> --codegen-schema

This returns a codegen_host_schema envelope that describes:

Generate A Typed Client

From Node/TypeScript:

import { UxcDaemonClient } from "@holon-run/uxc-daemon-client";

const runtime = new UxcDaemonClient();
const source = await runtime.generateTypeScriptClient({
  endpoint: "https://petstore3.swagger.io/api/v3",
  options: { no_cache: true },
  emitter: { className: "PetstoreClient" },
});

The generated client targets the UXC daemon/runtime surface rather than a protocol-native direct client.

Daemon Email RPC Helpers

The package also ships typed helpers for the daemon email RPCs:

import { UxcDaemonClient } from "@holon-run/uxc-daemon-client";

const runtime = new UxcDaemonClient();

const body = await runtime.emailBodyRead({
  input: { kind: "inline_mime", mimeBase64, originalBytes, complete: true },
});
// body.text holds normalized plain text; body.completeness reports
// "complete" | "partial" | "unverified".

const attachment = await runtime.emailAttachmentGet({
  handle,
  outputPath: "/tmp/report.pdf",
});

await runtime.emailSend({
  smtpUrl: "smtp://smtp.example.com:587",
  from: "bot@example.com",
  to: ["user@example.com"],
  subject: "Hello",
  text: "Hi",
});

See Daemon API for the RPC-level contract.

Current V1 Boundaries

The first emitter generation keeps a narrow scope:

See Daemon API for the local runtime contract.