feat: add the TechLog asset multipart upload transport

Wires the whole Asset capability into the running application: the
multipart upload transport (the contract runtime can only express JSON
bodies), a single composition-root-owned CSRF provider shared between
the platform's credential collaborator (18 JSON operations) and the
upload transport (1 multipart operation), and Studio/StudioShell
exposure of the Asset gateway alongside the existing document gateway.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-08-18 02:39:51 +09:00
co-authored by Claude Opus 5
parent d9c2d8bc5e
commit c9c832c365
15 changed files with 473 additions and 3 deletions
@@ -67,6 +67,33 @@ test("lists assets through the canonical operation", async () => {
assert.equal(calls[0]!.operationId, "listStudioAssets");
});
test("gets a single asset detail through the canonical operation", async () => {
const detail = {
asset: READY_ASSET,
usages: [
{
documentId: "22222222-2222-4222-8222-222222222222",
documentTitle: "Fetch Join과 Batch Fetch 비교",
},
],
hasPublicationHistory: true,
};
const { calls, dependencies } = deps({
getStudioAsset: {
kind: "SUCCESS",
value: detail,
effect: "APPLIED_CONFIRMED",
},
});
const gateway = createHttpStudioAssetGateway(dependencies as never);
const result = await gateway.getAsset(READY_ASSET.id);
assert.equal(calls[0]!.operationId, "getStudioAsset");
assert.deepEqual(calls[0]!.input, { assetId: READY_ASSET.id });
assert.deepEqual(result, detail);
});
test("delegates upload to the transport with CSRF and idempotency headers", async () => {
let received: Record<string, string> = {};
const { dependencies } = deps({});