Package Exports
Use this when choosing imports. Import package subpaths for contracts and factories; copy files only from @bnomei/emdash-mika/templates/astro/*.
| Subpath | Use this when… | Do not use this for… |
|---|---|---|
@bnomei/emdash-mika |
Registering Mika’s descriptor-safe EmDash plugin with mikaPlugin({ entrypoint, maintenance, assertWired }). |
Runtime API wiring or browser code. |
@bnomei/emdash-mika/acp |
Projecting Mika catalog and checkout semantics into host-owned ACP endpoints. | Claiming Mika ships a hosted ACP server. |
@bnomei/emdash-mika/agent |
Building public agent manifests or host-owned protocol projections from operation descriptors. | Publishing protected tools without host auth/policy. |
@bnomei/emdash-mika/admin |
Creating EmDash action provider config and field button options. | Public storefront mutations. |
@bnomei/emdash-mika/astro |
Astro pages/endpoints that need createMika(Astro), formatting, redirect, hidden-input, or purchase helpers. |
Long-lived browser clients. |
@bnomei/emdash-mika/astro-actions |
src/actions/mika.ts and action registration. |
Direct route handlers or plugin JSON routes. |
@bnomei/emdash-mika/client |
Public catalog or stock JSON reads from framework islands. | Protected cart, checkout, account, webhook, admin, or agent-tool mutations. |
@bnomei/emdash-mika/email |
Built-in email renderer helpers. | Email transport, queues, credentials, or deliverability policy. |
@bnomei/emdash-mika/provider |
Provider registry and provider-neutral contracts. | A real payment/tax/shipping provider implementation by itself. |
@bnomei/emdash-mika/react |
Optional React bindings exported by the package. | Astro page routing or provider SDK wiring. |
@bnomei/emdash-mika/server |
Runtime plugin activation, trusted backend API composition, server clients, maintenance, and overrides. | Browser bundles. |
@bnomei/emdash-mika/server/ports |
Focused repository port and repository-operation contracts for host persistence implementations. | Importing Mika’s internal storage implementation. |
@bnomei/emdash-mika/server/maintenance |
Focused maintenance runner contracts and createMikaMaintenanceRunner(). |
Scheduling cron or provisioning host infrastructure. |
@bnomei/emdash-mika/server/email |
Focused email outbox runner, sender, delivery, and EmDash pipeline contracts. | Mail transport, credentials, or deliverability policy. |
@bnomei/emdash-mika/stripe |
Optional Stripe provider adapter wiring in server-only host modules. | Making Stripe mandatory or exposing Stripe SDK clients publicly. |
@bnomei/emdash-mika/types |
DTOs, branded primitives, provider capabilities, and public input/result types. | Internal storage repository imports. |
@bnomei/emdash-mika/types/primitives |
Branded ids, domain enums, JSON value types, constructors, and guards without the full type barrel. | Aggregate, document, or operation DTO imports. |
@bnomei/emdash-mika/types/aggregates |
Commerce aggregate payloads and indexed record projections. | Runtime helpers or persistence adapters. |
@bnomei/emdash-mika/types/documents |
Persisted catalog, session, account, ledger, and ops document shapes. | Treating Mika’s reference repository layout as mandatory host storage. |
@bnomei/emdash-mika/types/operational |
Stock, token, workflow, entitlement, webhook, and other operational record shapes. | Runtime helpers or browser code. |
@bnomei/emdash-mika/templates/astro/* |
Copying host-owned Astro template files into an app. | Runtime imports for hidden package-owned pages. |
Do not import internal src/api or src/storage modules as public API.
See Client and React for the browser-safe read boundary.
Root Export Details
Section titled “Root Export Details”The root @bnomei/emdash-mika export is for descriptor-safe EmDash plugin registration:
mikaPlugin()builds the static EmDash plugin descriptor forastro.config.mjs;mikais an alias formikaPlugin;MIKA_PLUGIN_ID,MIKA_PLUGIN_VERSION, andMIKA_PACKAGE_NAMEidentify the plugin and default package entrypoint;MIKA_MAINTENANCE_CRON_TASKandMIKA_MAINTENANCE_CRON_SCHEDULEidentify the built-in maintenance task;MikaDescriptorOptions,MikaDescriptorPluginOptions, andMikaMaintenancePluginOptionstype descriptor-safe options.
Runtime activation and live API wiring live on @bnomei/emdash-mika/server: use createMikaPlugin() from a host entrypoint module that exports createPlugin(), and import MikaCreatePluginOptions, MikaApiOverrides, and MikaOperationPolicy from that subpath.
Runtime And Peer Ranges
Section titled “Runtime And Peer Ranges”- Node engine:
>=22.12.0. - Astro peer range:
^7.0.0. - EmDash peer range:
>=0.22.0 <1.0.0. - Optional peer packages:
@cloudflare/kumo,@phosphor-icons/react,react,react-dom, andstripe. - Published package files are
distplussrc/templates; copyable templates are exposed by./templates/astro/*.
Source Anchors
Section titled “Source Anchors”- ⓟ
../emdash-mika/package.json - ⓟ
../emdash-mika/src/index.ts - ⓟ
../emdash-mika/src/plugin.ts - ⓟ
../emdash-mika/test/package-exports.ts