# Changelog

## 0.17.0

- Create up to 200 copies of a plate with `quantity` in `printJobs.createFromSource`, multipart `printJobs.create`, or a source request in `printJobs.send`. Copies share the prepared artifacts and get their own job IDs in `createdJobIds`. One send or send batch can contain up to 200 copies across its requests.
- Pause job pickup with `printers.pausePickup(printerId)` and a `control` API key. A job that holds the printer lock or is still printing or paused returns 409 `printer_busy` with its ID and stored status. A pending device-file start also returns 409 and reports the reservation deadline. Once the pause succeeds, Hive holds new claims and web device-file starts until `printers.attestOperatorReady` confirms the bed is clear.
- Read a managed Bambu print's recovery context with `printJobs.getRecoveryContext`. Read the fault’s allowed actions, then use `printJobs.recover` to ignore the fault or resume after resolving it.
- Use `printJobs.hmsStop` with a dangerous key to stop a print with a reported HMS fault. It uses the existing Stop receipt and `printJobs.getStop`. Job recovery requires an updated Hive Link. See “Recover a managed Bambu print” in the API reference.
- `printJobs.stop` continues to work with existing Hive Link versions. HMS Ignore and Resume return 409 `stop_unresolved` while a legacy Stop has an unknown outcome. They return 409 `stop_pending` while an HMS Stop is still settling or while an acknowledged Stop awaits confirmation that the print ended. A proven refusal before sending clears that Stop immediately.
- If HMS Ignore or Resume expires before it is sent, the API returns 409 `recovery_action_expired`. Refresh the recovery context before trying again.
- Creating a print job for a named Bambu printer now fails with `422 printer_material_incompatible` when that printer model can never print the chosen material, with the profile evidence.

## 0.16.0

- `printers.commands.send` adds Bambu air filter stop, maintenance calibration, filament calibration, and calibration profile commands. These commands require a `dangerous` key.
- Hive Link checks fresh idle status before calibration starts or profile writes. The API checks tray-to-extruder compatibility and model-specific temperature limits. Bed leveling and vibration in laser mode return 409 `fdm_mode_required`. Older Hive Link versions return upgrade guidance for the public air filter stop. See the [Bambu command reference](docs/reference.md#bambu-calibration-and-air-purification).
- Flow-rate and pressure-advance calibration accept valid H3C AMS-3H trays and packed external holder IDs. Setting, selecting, or deleting a profile on a printer with a nozzle rack returns 409 `command_unsupported`. Profile selection with an explicit nozzle position requires a tray that feeds that nozzle. Refs [#6295](https://github.com/PrintHive/hive/issues/6295).

## 0.15.0

- `printers.commands.send` adds raw G-code, axis jogging and homing, bed leveling, manual extrusion, dual-nozzle temperature control, Snapmaker named fans, and additional Bambu AMS commands. See the [command reference](docs/reference.md#send-a-printer-command) for scopes and family limits.
- Raw G-code, jogging, both homing commands, auto leveling, manual extrusion, and AMS calibration require a fresh idle report from the device. Busy, stale, or unknown status returns 409 `printer_busy`. Older Hive Link versions return 409 `command_unsupported` with upgrade instructions. API-key MCP G-code uses the same admission and audit with a maximum of 8 lines.
- A managed Print Job or pending bound Stop blocks raw AMS settings. For AMS 2 Pro and AMS HT, stop drying with `amsFilamentDrying` and `mode: 0`.
- `setNozzleTempNew` accepts up to 350 °C on H2C, H2D, and H2D Pro, and up to 300 °C on X2D. If an older Hive Link rejects a setpoint above 300 °C, the API records the refusal and returns 409 `command_unsupported` with upgrade instructions.

## 0.14.0

- `printers.commands.send` accepts all 15 mobile printer commands, with typed parameters validated before sending. `refreshPrinterState`, `stopBuzzer`, and `updateLight` accept `control` keys. The other commands require `dangerous`. See [the command reference](docs/reference.md#send-a-printer-command) for parameters, confirmation, and replay rules.
- Raw `stop` returns 409 `managed_print_active` when a managed Print Job owns the printer or has a pending bound Stop. Use [job Stop](docs/reference.md#cancel-queued-work-and-stop-an-active-attempt) for active managed Bambu prints. Use the printer controls in PrintHive for other families.
- `amsFilamentDrying` accepts AMS 2 Pro and AMS HT IDs. To start drying, pass `durationHours` as a whole number from 1 to 72.
- `updateTemp` accepts a nozzle `extruder` index on Snapmaker, Klipper, and OctoPrint. Unsupported commands or parameters return 409 `command_unsupported` before dispatch. Hive Link refusals, including Snapmaker load checks before motion, return 409 `command_failed`.
- Deploy the command fingerprint migration before deploying the API and using the new commands. Existing pause, resume, and clear-error requests can replay their original receipts. Reusing an idempotency key with changed command parameters returns 409 `idempotency_key_reused`.

## 0.13.0

- Publish `POST /v1/printers/{id}/commands` as `sendPrinterCommand`. Add `printers.commands.send({ printerId, command, idempotencyKey })` for `pause`, `resume`, and `cleanPrintError`. The route requires a dangerous-scope organization API key and refuses Host credentials. The API records a durable attempt and returns its ID in the receipt. Replay with the original API key and idempotency key to retrieve the receipt. Another API key in the organization gets 409. Explicit device refusals and unsupported commands return 409 `command_failed`. An unconfirmed outcome, including a lost or unrecognized reply, returns 502 `command_unconfirmed` with the attempt ID. The SDK validates the printer UUID before sending and the attempt UUID on receipt. Deploy the database migration and API before using the SDK method.

- A `prepared` API-key attempt expires to `refused` after 45 seconds. A `dispatched` attempt without a recorded outcome becomes `indeterminate` after 5 minutes without a resend. The 15-minute readiness fence ends 20 minutes after dispatch for a recovered attempt. If the API records `indeterminate` earlier after losing the acknowledgement, the fence starts at that write. [#6232](https://github.com/PrintHive/hive/issues/6232) tracks the end-to-end command deadline gap.

## 0.12.0

Deploy the API before you release this version. An API that predates the webhook event types accepts only `model.created` and `model_file.uploaded`, and answers the new `event_types` with 400.

- Publish `POST /v1/print-jobs/reorder` and `PATCH /v1/print-jobs/{id}/assign` with the `control` scope. Add `printJobs.reorder` to move one or more jobs to the front of a queue while preserving the order of unlisted jobs. Add `printJobs.assign` to append a queued job to a printer's queue or unassign it. The assignment route now returns 409 `job_not_queued` for a job that has left the queue. Deploy the database migration and API before using the SDK calls. The assignment guard accepts `expectedPrinterId: null` to require an unassigned job.
- Add `hive.webhooks` for the webhook routes, now published in `openapi.json`: `list`, `get`, `create`, `update`, `delete`, `attempts`, and `test`. They send `GET`, `POST`, `PATCH`, and `DELETE` requests to `/v1/webhooks` and `/v1/webhooks/{id}`. Reads (`list`, `get`, `attempts`) need `read` or `webhooks:read`. Writes need `webhooks:write`: in **Settings > API Keys**, **Create API Key** has **Manage webhooks** under **Webhooks**. `create` returns `signing_secret` once, and so does `update` with `rotate_secret: true`. The client checks `create` and `update` inputs against the schema and throws `TypeError` before it sends, so an unknown event type or field never reaches the API. It never retries `create`, `test`, `delete`, or an `update` with `rotate_secret: true`, and it retries any other `update` as it retries a read. Add the `Webhook`, `WebhookEventType`, `CreateWebhookInput`, `CreatedWebhook`, `UpdateWebhookInput`, `UpdatedWebhook`, `DeletedWebhook`, `WebhookAttempt`, and `QueuedWebhookTest` types.
- Add `verifyWebhookSignature({ rawBody, signatureHeader, secret, toleranceSeconds? })`, which resolves to `true` only for a delivery that Print Hive signed, that arrived unaltered, and whose `X-Hive-Signature` timestamp is within `toleranceSeconds` (300 by default) of now. It signs `<timestamp>.<rawBody>` with HMAC-SHA256, compares every byte of the digest, resolves to `false` for a missing, malformed, old, future, or wrong signature, and throws `RangeError` for a negative or non-finite tolerance. Pass the request body as it arrived, before any JSON parsing. It uses Web Crypto, so it also runs in Bun, Deno, and edge runtimes. Add the `VerifyWebhookSignatureInput` and `WebhookEvent` types. `WebhookEvent` is the delivery body, typed by `type`. For a job or printer type, `data` is the `payload` of the `events.subscribe` item for the same event.
- Webhooks now carry job and printer events. An endpoint can subscribe to `job.created`, `job.assigned`, `job.started`, `job.paused`, `job.resumed`, `job.recovered`, `job.completed`, `job.failed`, `job.cancelled`, `printer.ready`, `printer.online`, and `printer.offline`, as well as `model.created` and `model_file.uploaded`. An endpoint may list all of them. The delivery's `id` is the Farm Event's id, so a delivery matches the item that `events.subscribe` and the events replay endpoint return for the same event. Print Hive stores an event only for an endpoint that subscribes to its type at that moment. See "Receive webhooks" in `docs/reference.md`.
- Add the durable Farm Events `printer.online` and `printer.offline`, in `events.json` and in the types of `events.subscribe`. Each fires once when a printer's connection changes, from a report of the printer's Host or from a Host that stops answering and whose 90-second lease expires, so `printer.offline` can arrive up to about two minutes after the Host stopped. They carry `printerId`, `printerName`, `observedAt`, and `lastSeenAt` on `printer.offline`. Name them in `kinds`, because `*`, `printer.*`, and a selector with no `kinds` leave them out, as they leave out `printer.telemetry.sampled`. The key needs `events:read` or `events:read:printer`.
- Add `name` and `buildSurface` to each `plates[]` entry of a library `PrintSource`. `name` is the plate's name in the project, or `null` for an unnamed plate. `buildSurface` is the value Bambu Studio saved for the surface the plate prints on, such as `Textured PEI Plate`: the plate's own bed type, else the project's. It is `null` when the project names neither. Both are absent from a source inspected before the fields existed until Hive reads its plates again. That read starts when the source is next opened, and `status` is `reading` for up to a minute while it runs. If the read fails, the fields stay absent. A partner source's `inspection` and `status` do not change.

## 0.11.0

- Migration for type-checked fixtures and mocks. Runtime behavior does not change. `CatalogFilament` now requires `bambuFilamentId: string | null`, so add the field to fixtures and cached objects. `printers.list` and `printers.get` now return `PrinterPage` and `Printer`, so a mock that returns a partial object, such as `{ id }`, must return the full shape.
- The API now adds `request.error.message` to a creation request that fails with `no_qualified_target_model` or `plate_not_found`, saying what to change. This is API behavior and is already live. Requests that failed before that API change keep their stored error without a message.
- Document the live event stream where agents start. `llms.txt` gains "Watch printers and jobs live": the live-events scopes (`events:read:printer`, `events:read:job`, `events:read`), a `printers.watch` example, an `events.subscribe` example that resumes after a saved cursor, and the keys Pulse refuses. The README gains "Watch printers live" and lists the live-events scopes.
- Add `bambuFilamentId` to `filamentCatalog.upsert`, and return it on `CatalogFilament` as `bambuFilamentId: string | null`. A catalog color now links to a stock filament profile, so a job that matches the color with `exact_material` slices that slot with the profile of the filament loaded on the printer, and not with the 3MF's. Hive stores the link on every upsert. It changes slicing and assignment only for an organization with the `hiveslice_loaded_filament_profiles` flag, which stays off until the runtime is qualified, and until then the color assigns as one with no link. Name the profile with its Bambu filament ID, such as `GFG02`. It must be in the bundled stock catalog and its formulation must accept `material`. `GFG02` accepts `PETG` and `PETG HF`. Omit it and Hive takes the stock default for the material type: `PLA` takes `GFA00`, `PETG` takes `GFG00`, and `TPU` takes `GFU99`. `bambuFilamentId` is `null` for an unlinked color: a material type the stock catalog does not name, a default profile with no usable database row yet, or a color created before profile linking that you have not upserted again. The request alone decides the link: repeating a call writes the same row, and an upsert that omits the field selects the default again, even for a color that had an ID. Colors created before this change have no link until you upsert them again. The upsert adds 400 `unknown_filament_profile`, 400 `filament_profile_material_mismatch`, and 503 `filament_profile_unavailable`, which means a profile you named has no usable database row yet, so retry after the next release. An upsert that names no profile and finds no row saves the color without a link. `filamentCatalog.list` and `get` return `bambuFilamentId` too.
- Add `filamentProfiles.compatible({ material, printerId }, signal?)` for `GET /v1/filament-profiles/compatible` (`read` scope). It lists the stock profiles that accept a material type and that the printer's model and nozzle take, ordered by `bambuFilamentId`, each with the printer's `settingId` and `isDefault` for the profile an upsert would take. Pass a listed `bambuFilamentId` to `filamentCatalog.upsert`. A printer from another organization answers 404 `printer_not_found`, and one with no known model or nozzle diameter answers 409 `printer_target_unknown`. Add the `CompatibleFilamentProfiles`, `CompatibleFilamentProfile`, and `CompatibleFilamentProfilesInput` types.
- Say where Live events is and show connection state in the watch examples. `llms.txt` says that Live events is a section of the Create API Key form, and that to add a live-events scope in the web app you create a new API key and select the scope under **Live events**, because **Change access** on an existing key covers only MCP tool access and webhooks. The `printers.watch` examples in `llms.txt` and the README log `connection` items, so `reconnecting` reads differently from `connected`. `connected` confirms that Pulse accepted the subscription, and only a `printer` item confirms that telemetry arrived.
- Add `printJobs.send(input, signal?)` for `POST /v1/print-jobs/sends` (`control` scope). One send atomically creates 1 to 32 print requests for one existing source version, under one `submissionId`, and the SDK never splits a group. A larger input throws `TypeError` locally. Resending the same input returns the original send with `replayed: true`. A changed body under the same `submissionId` returns 409 `idempotency_conflict`, with the standing send in `PrintHiveApiError.body.accepted`. Persist the input before the first call and resend it unchanged to recover. Add `printJobs.listSends({ sourceVersionId }, signal?)` for `GET /v1/print-jobs/sends` (`read` scope). It returns `{ batches }`, the newest 20 for that source version. It is not a lookup by `submissionId`. Add the `PrintJobSendInput`, `PrintJobSendResult`, `PrintJobSendRefused`, `PrintJobSendList`, and `ListPrintJobSendsInput` types. See "Send a group of source requests" in `docs/reference.md`.
- Publish `POST /v1/print-jobs/{id}/start` (`startPrintJob`, `control` scope) in the OpenAPI document, so `paths` has it. It requests dispatch of a queued job to its assigned printer.
- Add `printJobs.start(jobId, { expectedPrinterId?, organizationId? }, signal?)` for `startPrintJob`. It resolves with `StartedPrintJob`, `{ id, printer_id, queue_rank, global_queue_rank, status, dispatch: "requested" }`, and every field is present. A resolved call means Print Hive accepted the dispatch request, not that printing began: the job stays `QUEUED` until the printer's Hive Link host claims it, so read it with `printJobs.get`. A failed check throws `PrintHiveApiError` with status 404, 409, or 500, and `body.reason` names it, such as `model_file_not_ready` or `job_assignment_changed`. Add the `PrintJobStartFailureReason`, `PrintJobStartError`, and `StartPrintJobInput` types. The client never retries `start`, because repeating a print start is the caller's decision. A started print uses printer time and filament, so ask the person who owns the job first.
- Type `printers.list` and `printers.get`. They returned `Promise<unknown>`, so `page.printers[0].id` failed under `strict`. They now return `PrinterPage` and `Printer`, derived from the OpenAPI schema, and `printers.list` takes `ListPrintersInput`. Code that cast the old `unknown` result keeps compiling when the cast names fields the schema has.
- Rewrite the README as a quickstart: install, `PRINTHIVE_API_KEY`, creating a key in Settings > API Keys, `printers.list`, `printJobs.plan`, `create`, `waitUntilCreated`, and `start`, and error handling. The per-method reference moves to `docs/reference.md`, and the partner operator-ready guide to `docs/partner-operator-ready.md`. Both ship in the package.
- Ship `llms.txt` and `docs/` in the package, so an agent can read `node_modules/@printhive/api/llms.txt`. Add `homepage`, `bugs`, and `keywords` to `package.json`.
- Add `releaseActions` to `material_change_requires_qualification` holds. It lists `restore_project_material`, which means amend `materialMappings` so each held slot keeps the project's material, and `submit_source_with_material_preset`, which means save the project with the requested material's preset and submit it as a new source version. Holds stored before the field existed omit it. HiveSlice now holds a changed slot with `reason: "custom_filament_gcode"` when the slot's filament start or end G-code is not its own preset's stock text, because that G-code was written for the old material. With stock text, the slot slices with the loaded preset's G-code.

## 0.10.1

- Add `type` to each `inspection.materialSlots[]` entry of a partner source and to each `slots[]` entry of a library `PrintSource`. It is the project's own filament type for the slot, such as `PLA`, where `material` joins the vendor and the type, such as `Bambu Lab PLA`. Map a slot with `type` to keep the file's material. A mapping that echoes `material` reads as a material change and holds the plate with `material_change_requires_qualification`, which a Slice job cannot approve or amend. `type` is `null` when the project names no type, and absent from sources inspected before the field existed. `material` is unchanged.

## 0.10.0

- Add `printJobs.amendCreateRequest(requestId, amendment)`, which amends a held creation request with the `materialMappings`, `printerId` or `sourceVersionId` that clear its holds, with the `plateVersion` that the holds report. Hive plans the request again under the same `requestId`. A `printerId` also clears an unqualified conversion hold on a request that names its printer, and Hive qualifies the new printer when it plans again. A `sourceVersionId` whose inspection lists no plate of the request's number returns 422 `plate_not_found` and changes nothing. Add the `PrintJobCreateRequestAmendment` type for the body. Each hold in `requiredActions` gains `resolvedBy`, the fields that can clear it, and `allowedActions` can list `amend`.
- Add `allowedActions` and `plateVersion` to each hold in a creation request's `requiredActions`. `allowedActions` lists `approve` and `cancel` from facts the database reports with the rule that approval enforces, so read it instead of deriving it from the hold code. `plateVersion` is the digest of the held plates that an inspection approval echoes. A request from an API ahead of its database migration reports an empty `allowedActions`.
- Let `printJobs.approveReview` approve `inspection_review_required` holds with reason `material_usage_unresolved`, for a request with a printer and for a Smart Queue request without one. Send `{ inspection: { plateVersion } }`, or send it beside the engine setting review fields for a request held for both. The other inspection reasons (`custom_instructions`, `geometry_only`, `project_metadata_ambiguous`) and every other hold code stay cancel-only. A plate that changed since you read it returns 409 `review_conflict`. Hive records the API key or user that approved the hold, and a principal that is neither returns 403 `approval_actor_required`.
- Add the `PrintJobReviewApproval` type for the approval body, which is an engine setting review, an inspection approval, or both. `approveReview` takes it. `EngineSettingReviewApproval` stays the engine setting review alone, with its `changes`, `sourceRelease` and `engineRelease`.

## 0.9.0

- Add `printJobs.list()` for bounded organization job reads, including other
  clients' jobs and non-ready assigned work, with queue ordering and
  filter-bound continuation cursors.
- Add `printers.materialSlots.layout(printerId)` for the canonical nozzle,
  source, slot, and hotend-rack view, with saved assignments, independent printer
  observations, freshness, and separate operation availability.
- Add the `@printhive/api/validation` entry for integrations that
  validate layout, filament search, and material-slot operation responses.
- Pair with `@printhive/react` 0.1.0, the embeddable filament manager and its authenticated server adapter, which lists this version as its peer dependency.

## 0.8.1

The first published version with live events. Version 0.8.0 is skipped and must never be published: main carried it without the fixes below, and a telemetry watch on it replays the whole event log on each reconnect.

- Add `printers.watch()` for live printer progress: connectivity, Print Status, stage, progress with current and total layers, remaining minutes and an estimated end, file transfer, temperatures, and filament slots with identity, each with `observedAt` and an Observation Stamp `revision`. It starts from the stored snapshot, drops a sample older than the one it holds, reports a sample that fails the stream's schema as an `invalid` item, and offers `get`, `all`, and `close`. `isPrinterTelemetryStale` and `comparePrinterRevisions` help callers that read samples themselves. A snapshot can arrive in several parts.

- Add `events.subscribe()` for Farm Events over Pulse's `/partner` Socket.IO namespace, as an async iterable of `snapshot`, `event`, `connection`, `reset`, and `invalid` items. It reconnects with backoff, resumes durable events after `subscription.cursor` or a saved `since`, drops repeated ones, pauses a slow reader instead of dropping events, and ends with `PrintHiveLiveError` when the key is refused or revoked. The key needs `events:read`, `events:read:*`, or a matching `events:read:<domain>`. It follows Pulse's checkpoints, so `subscription.cursor` moves past events that the selector skips and a reconnect reads little of the log, and it subscribes again after `credential_changed`.

- Add the `liveUrl` option, which defaults to `https://pulse.printhiv3d.com` with the default `baseUrl` and is required with a custom one.

- Add `@printhive/api/effect`, an ESM-only entry with `liveEvents` and `watchedPrinters` as Effect `Stream`s. `effect` 4 is an optional peer dependency.

- Add `socket.io-client` as the package's one runtime dependency. The live stream's types and validators come from the server's schemas, and the build fails when they drift.

- Slice job views can name `loadedFilament.filamentId` on an item's and a prepared plate's material mappings, when Hive's print-job creation matched that slot to a filament loaded on the named printer. Prepared plate lineage gains `filamentProfiles`, one entry per used slot of a native plate: `source` is `loaded`, `3mf_fallback`, or `qualified`, with the profile `name` and `filamentId`. A `material_change_requires_qualification` hold can carry `reasons`, each with `sourceSlot`, `reason`, and an optional `loadedFilamentId`. Jobs that print-job creation makes repeat these entries in `print_options.preparation_filament_profiles`. A slot whose runtime cannot use loaded profiles records `3mf_fallback` with `reason: "engine_unsupported"`. A job whose routed slot no longer holds the filament its plate was sliced for waits with the new `sliced_filament_changed` cause, and create failures can report it as a filament `reason`. Tolerate unknown `source`, `reason` and `cause` values.

- Add `client.printers.materialSlots` with `list`, `get`, `getAssignment`, `assign`, `clearAssignments`, and `refreshRfid`. They send their calls to the `/v1/printers/{id}/material-slots` paths, which use the glossary's words for a Printer material slot and a Filament assignment. `get` reads one slot through `GET /v1/printers/{id}/material-slots/{position}` instead of through the batch read. `clearAssignments` takes an optional `expectedVersion` for one position and replaces `POST /v1/printers/{id}/filaments/clear-captured`. Assignment and clear results gain `record`, equal to `database`. Add the types `MaterialSlot`, `MaterialSlotList`, `AssignFilamentsResult`, `ClearFilamentAssignmentsResult`, `RefreshMaterialSlotRfidResult`, `ListMaterialSlotsInput`, and `ClearFilamentAssignmentsOptions`.

- Deprecate `client.printers.filaments`. Its `assign`, `clear`, `refreshRfid`, `get`, and `getAll` keep their names, inputs, and results, and now send their requests to the `/material-slots` paths. The types `FilamentAssignment`, `FilamentClear`, `FilamentRfidRefresh`, `FilamentSlotState`, `FilamentSlotsState`, and `ReadFilamentSlotsInput` are deprecated aliases. Their slot results now require `record`, so a test that builds one of these types by hand must add it. A response without `record` is rejected. Deploy the API before you release this version, because an API that predates the `/material-slots` paths answers them with 404. The old `/v1/printers/{id}/filaments` paths keep their statuses and bodies and now answer with `Deprecation` and successor `Link` headers. `database` and `databaseError` are deprecated in the response schema.

## 0.7.0

- Document that a filament assign or clear 409 with `code: "printer_busy"` can omit `reason` and `holdingJob`. A printer-row lock wait past five seconds returns it with the message "Another update is holding the printer. Retry editing filament." and stores nothing for that call. Read `holdingJob` only when `reason` is `"printer_held_by_job"`.

- Keep idle Bambu readiness and MQTT displays fresh from partial reports qualified by the current MQTT session. Preserve job progress and missed-finish reconciliation while excluding cached activity from readiness receipts.

- Add `printers.attestOperatorReady`, `PartnerOperatorReadyInput`, and `PartnerOperatorReadyResponse` for bounded, audited operator bed-clear attestations from partner backends. Accept unbound `control` or legacy `*` credentials while refusing Host and production principals, accept optional human-verdict events, flag unresolved outcomes, and share the human batch-replacement workflow. Retry temporary refusals without repeating successful releases or replacements.

- Deprecate `client.preparations`. It is now the same object as `client.sliceJobs`, so `create`, `get`, `waitUntilSettled`, and `downloadInfo` send their requests to `/v1/slice-jobs` instead of `/v1/partner-production/preparations`. Its public types do not change. An invalid create input now throws a `TypeError` with the message `Invalid Slice job input`, and a response without `sliceJobId` is rejected, as it is for `client.sliceJobs`. Deploy the API before you release this version, because an API that predates the Slice job paths answers them with 404. The old HTTP paths keep their statuses and bodies and now answer with `Deprecation` and successor `Link` headers.

- Add `client.sliceJobs.downloadInfo` to get a prepared plate's signed URL and artifact metadata through `GET /v1/slice-jobs/{sliceJobId}/plates/{plateId}/download`.

- Add `client.sliceJobs.create`, `get`, and `waitUntilSettled`. They take the inputs and return the results of `client.preparations.create`, `get`, and `waitUntilSettled`, and send them to `POST /v1/slice-jobs` and `GET /v1/slice-jobs/{sliceJobId}`. Every preparation and Slice job response now carries `sliceJobId`, equal to `preparationId`, and an idempotency key replays a job through either path set.

- Preserve completed filament slot and waiting-job re-evaluation receipts in
  mid-batch refusal responses. Slot-operation colors use MaterialHex: uppercase
  `#RRGGBB`, or `#RRGGBBAA` only for non-FF alpha. Bambu commands retain wire RGBA.

- Keep the queued confirmed-attempt refusal stable as `queued_cancel_conflict` with a Use Stop message, and generate the literal control-error code union for clients.

- Add `batch: "none"` to `printJobs.listCreateRequests`, which keeps only the create requests that have no batch.
- Create request views gain `estimatedSeconds`, the print time the slice predicts for the plate, which is null until Hive has sliced it. It defaults, so an older view still parses.
- Create request views gain `filaments` (the filaments the request asked for, by project slot) and `createdJobId` (the job a created request made, kept after someone deletes the job). Each defaults, so an older view still parses.
- Create request views gain `modelFileId`, the library file the send behind the request printed, which is null for a request no send made and for one a send that joined an existing batch made. It defaults, so an older view still parses.
- Add `client.search.printers` and `client.search.filaments`, and export the `ResourceSearch` type. `client.printers.search` and `client.filaments.search` remain available.

- Add `messageKind` to filament waiting reasons: `requirement` marks a label for load or slot-conflict guidance; `instruction` marks specific guidance to display directly.

- Match non-exact rows by polymer grade plus fibre fillers; finish ignored. Validate exact filament choices against the plate's base polymer at creation and PATCH. Preserve stored color requirements during revalidation, include per-filament action messages in rejection contracts, and remove color hints from any-color load actions.

- Require same-type alternates, preserve assigned identity colors, reject contradictory exact-slot types at claim, and show product-aware and any-color waiting prompts with color warnings.

- Add per-filament `match` policies to print-job creation: exact material identity with up to eight ordered alternates, type and color, or type with any color. Preserve type-and-color matching when omitted. Persist policies for admission and claim, expose mode-specific waiting messages, and use loaded colors for exact and any-color source slicing.

- Canonicalize single external 254 aliases to stored/public 255, including offline
  reads and SDK `get`; clear removes both aliases. Legacy rows need a later backfill.
- Fence assign/clear storage against claims with a service-owned RPC and re-evaluate
  jobs waiting on filament after allowed edits, without changing bed readiness.
- Cap partner assignment requests at two slots and use a 55-second SDK timeout.
  Larger requests must be split to avoid proxy 504/524 budgets.
- Return MaterialHex colors and preserve Host acknowledgement timeouts
  as unknown outcomes even when Pulse returned HTTP 200.
- Reject Host-bound and `host` credentials on filament endpoints. Keep unbound
  legacy wildcard keys and enforce read/control capabilities. Report
  `host_upgrade_required` when released Hive Link rejects request-bound observation.

- Assignment now requires `control` scope. Read-only and empty-scope API keys
  receive HTTP 403 for assignment, clear, and RFID reread.
- Block all non-terminal holds except recorded filament waits. Preserve `printer_held_by_job`,
  the holding job's ID/status and status-specific wait/cancel/resume/stop guidance. Export non-200
  filament response contracts and validate holding-job error details.
- Reject empty filament selections, more than 32 clear/read positions, and invalid AMS/HT addresses locally.
  A selected-slot response must match the request or its canonical 254-to-255 alias.
  Reuse successful printer snapshots for less than two seconds when polling.

- Fail source print-job creation with `422 invalid_preparation_mappings` when projected material labels or slots exceed the preparation contract. Decode claimed preparation items per row so malformed data cannot stop other organizations' items or the plate-claim phase.

- Project RGBA print-job requirements to RGB for source preparation while retaining the original requirement alpha. Reject malformed claimed plates individually so other organizations' plates keep advancing.

- Document canonical uppercase material-derived colors in printer filament assignment responses. Keep CSS color names as a display-only Make swatch fallback. Reduce color decoding and comparison costs without changing matching thresholds.

- Preserve transparent and translucent colors in material writes, product identity, load actions, and source inspection, including generated SDK validation. Preparation and Cloud Slice mappings remain six-digit RGB and reject RGBA before slicing. Load-prompt tags retain their existing six-digit storage projection.

- Filament search and catalog responses return canonical primary `color`, ordered `colors`, and nullable `colorName`. Hex normalization preserves non-opaque alpha.
- Admit organization filaments with any non-empty SKU, ASIN in the column or metadata, or partner catalog external ID. Admit multi-color filaments using their first color for matching. Transparent material matches clear trays and remains distinct from opaque black.

- Compare Stop attempt and receipt UUIDs case-insensitively so canonical lowercase API responses recover uppercase caller IDs.

- Accept `control` or `dangerous` for queued cancellation and require literal `dangerous` for Stop. Unbound legacy `*` keys stay allowed; `host`, any `apiKeyHostId` principal, and `production:*` are rejected with 403. Preserve these capability errors.
- Recover an existing terminal receipt by replaying its exact identity without another abort. Confirm same-attempt Host cancellation even after a lost abort reply. Keep FAILED/ERROR closure pending through up to three final observation attempts, throttle receipt reads, and suppress Host automatic retry after Stop.
- Report terminal queued-cancel refusal as `print_job_terminal` with `reason: "job_already_ended"` and the actual job status; retain successful CANCELLED replay.

- Add `printJobs.cancelQueued`, `stop`, `getStop`, and `getControlState` with generated contracts and runtime response validation.
- Require Dangerous scope for Stop. Receipts distinguish not-delivered, acknowledged, unknown, and rejected dispatch from fresh same-attempt confirmation and already-ended work.
- Preserve Stop identity across retries and allow explicit re-dispatch after non-delivery or an unconfirmed outcome. Receipt reads never resend the abort. Give `stop` and `getStop` at least 45 seconds per client attempt.
- Export `PrintJobControlError`. Terminal Stop refusal includes `reason: "job_already_ended"`, terminal `jobStatus`, and a human message. Unsupported printer responses and receipts include `reason: "printer_family_unsupported"`, `printerFamily`, and a human message. Control state reports `unsupported` for non-Bambu printers. No npm release is published by this change.
- Accept `null` for nullable OpenAPI enum fields during runtime response validation.
- Add `printers.filaments.assign`, `clear`, `refreshRfid`, `get`, and `getAll`
  with generated HTTP contracts and abort support. Reads use the printer-level
  batch endpoint, including a selected slot through `get`.
- Accept AMS HT positions such as 512 and preserve canonical external addresses.
- Preserve saved, sent, and fresh observed outcomes separately. Compare only
  profile IDs actually reported by the printer; retain exact material IDs separately.
- Never automatically retry filament writes. Assignment's default timeout covers
  sequential command budgets, pacing, and batch verification; an explicit client
  timeout still takes precedence.
- Clear removes only Hive overrides and reports `not_found` for a no-op. RFID
  reread is an explicit AMS-only action.

## 0.6.0

- Add optional `filament_source` (`any`, `ams`, or `external_spool`) to preparation items, and export `PreparationFilamentSource`. Until a qualified slicing runtime supports explicit sources, `ams` and `external_spool` return a typed refusal. Omitted and `any` behave as before.
- Add `printJobs.releaseCreateRequest` and `printJobs.cancelCreateRequest` with generated response types and runtime validation. Cancellation accepts both the `202` acknowledgement and the `200` terminal receipt. Neither operation automatically retries.
- Document create-request path parameters, authentication, conflicts, and storage failures in OpenAPI. Existing receipt polling and partner upload and preparation SDK methods remain available.

## 0.5.0

- Keep source-create retry identity inside existing file metadata so pre-source workers do not reject it as an unknown print input during deployment overlap or rollback. Changed-source retries still conflict, including after failed inspection.
- Library print-source opens share the raw-upload concurrency budget. A full process or configured organization budget answers `429 upload_capacity_reached` with `Retry-After: 5` before library I/O. The failure includes `limit.name` (`concurrentUploads` or `concurrentUploadsPerOrganization`) and `limit.max`.
- Require a caller-owned `idempotencyKey` for `printJobs.createFromSource` so retries after a lost response reuse the same request.
- Add `printJobs.plan` for ranked printer suggestions with exact tray load actions before submit, and `load_actions` on `printJobs.get` and on the job in `getCreateRequest`. Export `LoadAction`, `PrintJobPlan`, `PrintJobPlanInput` and `PrintJobPlanSuggestion`.
- Add `printJobs.listCreateRequests(input?, signal?)` for `GET /v1/print-jobs/create-requests`, with `ListCreateRequestsInput`, `PrintJobCreateRequestPage`, and `PrintJobCreateRequestStatus`. It returns `{ requests, nextCursor }`, newest first, and `status` (an array of `preparing`, `held`, `created`, `failed`, and `cancelled`), `since` (an ISO 8601 timestamp with an offset), `limit` (1 to 100, default 50), and `cursor` narrow it. A held or failed request stays in the list, so a caller finds work that no browser watches. Pages are a keyset walk by created time and then request id. A request that arrives above your cursor is not in the walk, so read the first page again to see it. The route needs the `read` scope. A bad query is 400.
- Add `printJobs.createFromSource` and `SourcePrintJobInput`. The JSON body of `POST /v1/print-jobs/create` can name `source_version_id` instead of `model_file_id`, with `plate`, `filaments`, and the optional fields of the multipart create. It answers 202 with the create request, like a multipart create. A source that is still reading is allowed. A source of another organization is 404, a failed source is 422 `source_inspection_failed`, and a body with both ids is 400 `conflicting_source`. `JsonPrintJobInput` still describes the `model_file_id` body, and `create` with that body still answers 201.
- The create request view now carries `plate`, `printerId`, `name`, and `sourceVersionId`. They are `null` or absent when the request has none, so an older server's view still parses.
- Add optional one-based `usedSlots` to each plate of a source inspection. It counts extruders, decoded color paint, and enabled support filaments. It is absent on every plate when project-wide material usage cannot be resolved. A plate whose own usage cannot be resolved, such as one with an invalid support override, has `usage: "unresolved"`. Other plates keep `usedSlots`. A project whose paint decodes no longer reports `material_usage_unresolved`. Older stored inspections do not change.
- Document that a multipart create may name filament slots the sliced plate leaves unused. Hive drops them. A used slot the request omits ends the creation request as failed, with `filaments_do_not_cover_plate`, `missingSlots`, and `outputFileId` in its `error`. JSON creates still require an exact match.
- Add `allowUnqualifiedConversion` for supported printer conversions. Multipart has no schema default, so omitted consent inherits the organization setting captured at submission. Explicit `false` still overrides an enabled organization default. JSON retains `default: false` for this compatibility-only flag; JSON creates do not perform conversion. Engine-setting opt-in defaults are unchanged.
- Preserve the temporary `engine_unused_slot_setting` preparation warning, with key names and one-based slot indexes, tracked in [#5118](https://github.com/PrintHive/hive/issues/5118).

## 0.4.1

- Document print-job creation's 503 `catalog_store_failed` response, including optional per-slot failure details, in the generated OpenAPI contract. Runtime behavior is unchanged.
- Global filament search results now have `acceptedByCreate: true` when the organization's global-filament setting and shared catalog admission allow creation. Disabled global IDs remain unavailable to create and are excluded from search. Search and create use one admission operation.
- Accept enabled global filament IDs on print-job creation and normalize single-color catalog choices with the shared material color rules. Reject ambiguous colors and failed setting reads. Return `merged_into` on merged-filament slot errors. Existing catalog CRUD routes can still return merge tombstones.

## 0.4.0

- Add typed `printers.search` and `filaments.search`, with bounded integer pagination and catalog `filamentId` values.
- Reuse the web palette printer matcher and the filament picker ranking through narrow partner routes.
- Add `acceptedByCreate` for the catalog admission rules in 0.4.0. At that release, global, unsynced, and invalid-color rows were flagged false. Global support is added in 0.4.1.
- Require Read scope on the existing `/v1/search` and `/v1/materials/command-search` API-key routes. Empty-scope keys receive 403.

## 0.3.2

- Add `printJobs.get` for live job polling after creation, including the API's waiting-reason snapshot.

## 0.3.1

- Add `cause` to generated filament waiting reasons and export `FilamentWaitingReason`. Reasons include only unmet source slots at creation and claim recheck.

## 0.3.0

- Add partner catalog upsert, filtered list and read methods; `preparation_disabled` is not retried as a transient 503.
- Generate preparation contracts and validators from the current API routes.
- Add typed preparation creation, reads, total-deadline polling and signed-download metadata.
- Preserve idempotency keys, immutable retry bodies and typed target refusal reasons.
- Migrate the Printie simulator from its local preparation wrapper to the SDK.

## 0.2.0

- Add `printJobs.create` for multipart project preparation and existing JSON artifact creation.
- Add creation receipt reads and `waitUntilCreated`, including typed stopped-request errors.
- Return created receipts even when their referenced job has been deleted.
- Preserve idempotency keys across retries and include public creation routes in the generated OpenAPI contract.

## 0.1.0

Initial partner-production client for server-side integrations such as Printie. Version 0.1.0 covers uploads and model reads only, including source inspection polling and source-file listing. Preparation methods (#4764) and order methods (#4631) will come in later versions.

- Upload immutable 3MF sources with external IDs and idempotency keys.
- Read sources, wait for inspection, look up models, and iterate source files.
- Expose typed API restrictions, bounded safe retries, timeouts, and cancellation.
- Generate types from a committed, drift-checked partner-production OpenAPI snapshot.

Coverage is limited to `/v1/partner-production/`. Future releases can register more route plugins and widen the snapshot prefix filter without replacing the generation pipeline. They must add explicit resource methods and tests before claiming broader REST API coverage.
