Client behavior shared by the Mike web app (frontend/) and the Word add-in
(word-addin/) that has nothing to do with rendering:
userError.ts,toastStore.ts,errorNotifier.ts: one classification of a thrown value and one toast store, so a failure reads the same in Word as on the web.CODE_KINDSis the table of servercodes a client acts on.modelCatalog.ts: the model catalog both pickers are built from, kept in line withbackend/src/lib/llm/models.tsbyfrontend/src/wordAddin/catalogParity.test.ts.uploadSessionClient.ts(withsettleWithConcurrency.ts,secureUuid.ts): the upload-session protocol.messageExcerpts.ts: the wire format for quoting a passage of a response.sentryEvent.ts,sentryPrivacy.ts: Sentry event hygiene.sentryPrivacy.tsis byte-identical tobackend/src/lib/observability/sentryPrivacy.ts; the sync test guards it.
Application code imports the package's src/index.ts entry point:
import { describeError, MODELS, serializeExcerpts } from "@mike/client";The Word webpack config also loads src/releaseName.cjs, the CommonJS twin
of the exported release identity helper, by its source path: TypeScript and
webpack aliases are not active while loading that config. Other files under
src/ that index.ts does not re-export are internal.
- Framework-free. No React (type-only imports excepted), no DOM access at
module scope, nothing from
frontend/src/app/orword-addin/src/. The add-in's Playwright suite loads this package directly in Node. @mike/uimay depend on this package; this package never depends on@mike/ui.
This is a source package with no build step and no node_modules. Each
application maps the name to src/index.ts with a tsconfig paths entry (and,
for the add-in, a webpack alias). Both Dockerfiles copy this directory to
/packages/client, the path the aliases resolve to in the image;
frontend/src/__tests__/architecture.test.ts checks that the alias and the
copy agree.
Tests are colocated (src/*.test.ts) and run with the frontend's Vitest:
npm test --prefix frontend -- ../packages/client