/**
 * Declarative authoring API. Each `define*` returns a branded plain object that
 * doubles as a typed handle (e.g. an {@link EntityType} can be passed to
 * {@link defineRelationshipType}, an {@link Agent} to {@link defineWatcher}).
 *
 * These are pure data producers with no side effects — `lobu apply` imports the
 * entrypoint, reads the {@link Project} default export, and maps it to the
 * server's desired state. Executable handlers (connector `sync`/`execute`,
 * watcher reactions) live in their own modules; these objects only declare
 * config and references.
 */
export function defineEntityType(config) {
    return { ...config, kind: "entityType" };
}
export function defineRelationshipType(config) {
    return { ...config, kind: "relationshipType" };
}
export function defineAuthProfile(config) {
    return { ...config, kind: "authProfile" };
}
export function defineConnection(config) {
    return { ...config, kind: "connection" };
}
/**
 * Reference a local connector source file to compile + ship at apply time.
 *
 * Pass the connector's module type via the generic for go-to-def / rename and a
 * `tsc` error if the module's default export drifts from
 * {@link ConnectorClassExport} (a {@link ConnectorRuntime} subclass):
 *
 * ```ts
 * import type StripeCharges from "./stripe-charges.connector.ts";
 * connectorFromFile<typeof StripeCharges>("./stripe-charges.connector.ts"),
 * ```
 *
 * The `import type` is erased at compile time (zero runtime cost; jiti drops it),
 * so the connector module is never imported during config eval.
 */
export function connectorFromFile(path) {
    return { kind: "connectorSource", path };
}
/**
 * Reference a local reaction source file to compile + ship at apply time.
 *
 * Pass the handler's module type via the generic for go-to-def / rename and a
 * `tsc` error if the module's default export drifts from {@link ReactionHandler}:
 *
 * ```ts
 * import type triage from "./inbound-triage.reaction.ts";
 * reaction: reactionFromFile<typeof triage>("./inbound-triage.reaction.ts"),
 * ```
 *
 * The `import type` is erased at compile time (zero runtime cost; jiti drops it),
 * so the handler module is never imported during config eval.
 */
export function reactionFromFile(path) {
    return { kind: "reactionSource", path };
}
export function defineWatcher(config) {
    return { ...config, kind: "watcher" };
}
export function defineAgent(config) {
    return { ...config, kind: "agent" };
}
/** Declare a skill inline — `content` is the body, the rest is JSON frontmatter. */
export function defineSkill(config) {
    return { ...config, kind: "skill" };
}
/**
 * Reference a skill stored as a `SKILL.md` file. `path` is a directory holding
 * `SKILL.md` (or a `.md` file directly), relative to the config file. The
 * loader reads it at apply time; pass `name` to override the frontmatter name.
 */
export function skillFromFile(path, opts) {
    return { kind: "skill", path, ...(opts?.name ? { name: opts.name } : {}) };
}
export function defineConfig(config) {
    return { ...config, kind: "project" };
}
//# sourceMappingURL=define.js.map