Skip to content

feat(hub)!: artifacts ride on @corbits/artifacts; drop artifacts-hub (CL-8188) - #785

Merged
TheGreatAxios merged 3 commits into
mainfrom
cl-8188-artifacts-library
Sep 17, 2026
Merged

TheGreatAxios merged 3 commits into
mainfrom
cl-8188-artifacts-library

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Summary

  • Bumps every @corbits/artifacts pin to 348c26e6f78b068c571662870e11b607e5f61a0b (v0.2.0), which now covers the whole artifacts-hub HTTP surface natively: GET /artifacts/counts, GET /artifacts/:id/preview, and mountWorkflowArtifacts' run-scoped create/recent/get/binary routes.
  • apps/hub mounts mountArtifacts directly on the tenant prefix (countSegments built from @corbits/artifact-ui's LIBRARY_KIND_SEGMENTS) and mountWorkflowArtifacts at /api/workflow-artifacts, resolving run scope through the authenticator apps/hub/src/workflow-run-tenant-auth.ts already owns (the generic sidecar-token + run-address authenticator that used to live in packages/artifacts-hub moved there).
  • Deletes packages/artifacts-hub entirely. packages/turn-artifacts is kept — it never actually depended on artifacts-hub (only mentioned it in comments).
  • mountWorkflowArtifacts' fixed route shape (POST/GET .../artifacts, .../recent, .../binary) puts every route one segment deeper than the old ad hoc mount, so every workflow-artifacts client (scout-agent, and each Routine's own duplicated artifact-client.ts) now calls /api/workflow-artifacts/artifacts... instead of /api/workflow-artifacts/.
  • The tenant Library wire envelope also changed under the new package (list responses key rows under "artifacts", not "data"; single-artifact reads wrap the row under "artifact"); apps/web's api.ts schemas, the Files page, the upload helper, and the command palette follow.
  • packages/scout-agent bumped to 0.0.4 (tool-package-freshness) with its pin updated in packages/scout-agent/src/definition.ts.

Known issue (not fixed here)

@corbits/artifacts@348c26e's own src/artifacts.ts and src/counts.ts fail this repo's exactOptionalPropertyTypes: true typecheck in three places — genuine bugs in the pinned commit, surfaced only because the package ships no build step / dist and resolves to raw src under the bun condition. bun run typecheck is not fully green until this is fixed upstream in corbits-artifacts and re-pinned.

Test plan

  • bun run lint — clean (one pre-existing, unrelated AGENTS.md prettier warning present on main before this change)
  • bun run check:structural — all checks pass
  • bun --cwd apps/hub test — 167 pass, 0 fail (DB-gated suites skip locally per repo convention)
  • bun --cwd apps/web test — 799 pass, 0 fail
  • bun run typecheck — blocked on the upstream @corbits/artifacts defect above; no errors from this repo's own code

@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

CL-8188

…-8188)

Point every workflow-artifacts client mock and memory-hub's own test
import at the shapes @corbits/artifacts' mountWorkflowArtifacts/mountArtifacts
actually serve, ahead of the implementation swap.
…(CL-8188)

Bump every @corbits/artifacts pin to 348c26e (v0.2.0), which now covers the
whole artifacts-hub HTTP surface natively: counts, preview, and
mountWorkflowArtifacts' run-scoped create/recent/get/binary routes.

apps/hub mounts @corbits/artifacts' mountArtifacts directly on the tenant
prefix (countSegments built from @corbits/artifact-ui's LIBRARY_KIND_SEGMENTS)
and mountWorkflowArtifacts at /api/workflow-artifacts, resolving run scope
through the authenticator apps/hub/src/workflow-run-tenant-auth.ts already
owned. packages/artifacts-hub is deleted; the generic sidecar-token +
run-address authenticator it used to own moves into that same
workflow-run-tenant-auth.ts, and packages/memory-hub declares its own local
structural WorkflowRunAuthenticator/ResolvedWorkflowRunScope types (matching
the convention every other workflow-run-authenticated package already
follows) instead of importing the retired package's concrete ones.

mountWorkflowArtifacts' fixed route shape (POST/GET .../artifacts, .../recent,
.../binary) puts every route one segment deeper than the old ad hoc mount, so
every workflow-artifacts client (scout-agent, and each Routine's own
duplicated artifact-client.ts) now calls /api/workflow-artifacts/artifacts...
instead of /api/workflow-artifacts/. The tenant Library surface's wire
envelope also changed (list responses key rows under "artifacts" not "data";
single-artifact reads wrap the row under "artifact"); apps/web's api.ts
schemas and the Files page/upload helper/command palette follow.

packages/turn-artifacts is kept: it never actually depended on
artifacts-hub (only mentioned it in comments).

Known issue: @corbits/artifacts348c26e's own src (artifacts.ts, counts.ts)
fails this repo's `exactOptionalPropertyTypes: true` typecheck in three
places — genuine bugs in the pinned commit, surfaced because the package
ships no build step / dist and resolves to raw src under bun. Needs a fix
upstream in corbits-artifacts before `bun run typecheck` is fully green.
…CL-8188)

Regenerated via bun run check:structural report-error -- --write-baseline
after packages/artifacts-hub's three baselined catch clauses left with it.
@TheGreatAxios
TheGreatAxios force-pushed the cl-8188-artifacts-library branch from bbc7e3e to fc9363f Compare September 17, 2026 19:18
@TheGreatAxios
TheGreatAxios merged commit 422e7c1 into main Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant