Skip to content

v0.5.2

Choose a tag to compare

@johnefemer johnefemer released this 24 Nov 05:47
· 1 commit to main since this release

Fixes from running the "Build an AI product in a day" tutorial end to end. Every kit stays a preview: pin the exact version.

Upgrading from 0.5.1: the catalog snapshot gains actor_confirm, and actor_start's version follows its list of actors; both are additive, so accept them with OMAZY_UPDATE_SNAPSHOTS=1. A tenant isolation check that skips the actor tools should skip actor_confirm too. A project made with create-omazy-app 0.5.1 or earlier should add /core to OMAZY_BASE_URL in wrangler.jsonc. Everything else is unchanged in name and shape.

  • create-omazy-app: the generated wrangler.jsonc sets OMAZY_BASE_URL to https://mw.omazy.ai/api/v1/core. Before, it said /api/v1, so every model call went to /api/v1/ai/complete and answered 404.
  • actorTools: actor_start's version is the number of actors it offers when actors lists them. Adding an actor to the door is now an additive change in the catalog snapshot (a new value and a higher version), accepted with OMAZY_UPDATE_SNAPSHOTS=1; before, it was breaking ("schema changed but version is still 1") and the kit fixed the version, so nothing but deleting the snapshot fixed it. Removing an actor is still breaking. Without a list, actor_start stays at version 1.
  • actorTools has a fourth capability, actor_confirm (R2), and the card's submit names it with the session and the card id instead of the target call. Over MCP the client calls it once the person agrees; the guard asks the person (an elicitation or a confirm token, its preview the card's summary and rows), and the runtime submits the card as a click on it does. The session then sees the outcome, so actor_status reads done or pending_approval. Before, the client called the target itself and the session never learned of it: actor_status read confirm for good. A confirm given for a card that changed since is refused as stale. A client that still calls the target directly makes the change, but the session does not see it. The copilot keeps actor_confirm from its model, as it does the other three. Upgrading: the catalog snapshot gains actor_confirm (an additive change), and a tenant isolation check that skips the actor tools should skip it too.
  • fakeCore().on(match, answer) says in its JSDoc and on the testing kit page what it always did: without { times } a rule answers every later request it matches, so a second on() for the same unit never fires. Give each turn's reply { times: 1 }. The behaviour is unchanged.
  • create-omazy-app: the generated npm run setup builds the page (npm run build:page) before it touches Cloudflare, so its deploy ships the current page. Before, it deployed whatever public/app.js held, which was nothing on a fresh checkout that had not run npm run dev. A build error now stops setup before anything is created.
  • ui kit: an approver can ask for a step-up code from the page. uiRoutes takes approvals.codes (the guard's codeStepUp, the same one given to createGuard) and serves POST <base>/approvals/<id>/code, which sends a code to whoever may decide the approval now and answers { channels, method, expiresAt }. It answers 404 to someone who may not see the approval, 403 to someone who may see it but not decide it, 409 once it is decided, and 400 when its policy asks for another method. uiClient().approvals.sendCode(id) calls it. CodeStepUpForm from @omazyai/sdk/ui/react is a ready stepUp slot for ApprovalsInbox and ApprovalDetail: a button that sends the code, a field for each channel, and the proof passed to the decide call. New words in UiText, English and Bangla: codeSend, codeSent, codeLabel, codeResend, codeSubmit, codeRequired. Before, a product had to write its own route and form, and the scaffold had neither.
  • create-omazy-app: every preset wires the guard's codeStepUp. AppParts takes sendCode, the app returns codes, and the guard gets it as its stepUp; with the copilot, uiRoutes serves the code route and the page's ApprovalsInbox has CodeStepUpForm in its stepUp slot, so an owner approves in the page. src/index.ts prints the code to the wrangler dev console when .dev.vars has STEP_UP_LOG=1 (written there by the scaffolder, never in wrangler.jsonc) and refuses otherwise until you wire a mail or SMS sender. The test harness records each code in h.codes. A product adds a policy that names stepUp: 'code' and nothing else.