diff --git a/connectors/readwise/test/content-scale.test.ts b/connectors/readwise/test/content-scale.test.ts index fc856902..add054be 100644 --- a/connectors/readwise/test/content-scale.test.ts +++ b/connectors/readwise/test/content-scale.test.ts @@ -47,6 +47,7 @@ function fixture(size: number) { updated_at: "2026-01-01T00:00:00Z", last_activity_at: "2026-01-01T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", diff --git a/connectors/readwise/test/managed.test.ts b/connectors/readwise/test/managed.test.ts index 4faebcbf..46ab7b27 100644 --- a/connectors/readwise/test/managed.test.ts +++ b/connectors/readwise/test/managed.test.ts @@ -25,6 +25,7 @@ const row = (sourceId = "one:source:7"): Item => ({ updated_at: "2026-01-01T00:00:00Z", last_activity_at: "2026-01-01T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", diff --git a/connectors/readwise/test/reader/identity.test.ts b/connectors/readwise/test/reader/identity.test.ts index 721704cc..78a78304 100644 --- a/connectors/readwise/test/reader/identity.test.ts +++ b/connectors/readwise/test/reader/identity.test.ts @@ -88,6 +88,7 @@ it("refines an existing highlight alias with verified export parent evidence for updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -242,6 +243,7 @@ it("accepts one export ID with a canonical natural key and retains its export lo updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -334,6 +336,7 @@ it.each([false, true])( updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -506,6 +509,7 @@ it.each(["links", "source_ids"] as const)( updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -673,6 +677,7 @@ function lifecycleFixture() { updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -877,6 +882,7 @@ it("enriches a Reader-only natural row without reassigning an existing export id updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -914,6 +920,7 @@ it("keeps a lone document holder unresolved when two export sources claim it", a updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", @@ -1525,6 +1532,7 @@ function createdRow(state: Item["state"]): Item { updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: state === "trashed" ? "2026-10-15T00:00:00Z" : null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", diff --git a/connectors/readwise/test/reader/outbound.test.ts b/connectors/readwise/test/reader/outbound.test.ts index fc2537d7..543609f5 100644 --- a/connectors/readwise/test/reader/outbound.test.ts +++ b/connectors/readwise/test/reader/outbound.test.ts @@ -212,6 +212,7 @@ function change( updated_at: "2026-10-15T00:00:00Z", last_activity_at: "2026-10-15T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", diff --git a/connectors/readwise/test/reader/sync.test.ts b/connectors/readwise/test/reader/sync.test.ts index a92e2018..b090c96c 100644 --- a/connectors/readwise/test/reader/sync.test.ts +++ b/connectors/readwise/test/reader/sync.test.ts @@ -371,6 +371,7 @@ function stored(id: string, extra: Record = {}): Item { updated_at: stamp, last_activity_at: stamp, trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", diff --git a/connectors/readwise/test/sync.test.ts b/connectors/readwise/test/sync.test.ts index cbeaa36a..8cdba0ca 100644 --- a/connectors/readwise/test/sync.test.ts +++ b/connectors/readwise/test/sync.test.ts @@ -390,6 +390,7 @@ it.each(["refresh", "source", "export"] as const)( updated_at: "2026-01-01T00:00:00Z", last_activity_at: "2026-01-01T00:00:00Z", trashed_at: null, + restored_at: null, read_only: false, web_url: "http://localhost:8600/i/item", app_url: "marfa://instance/item", diff --git a/host/package.json b/host/package.json index 8a98b3ac..85cad7c7 100644 --- a/host/package.json +++ b/host/package.json @@ -27,6 +27,6 @@ "dist" ], "dependencies": { - "@withmarfa/client": "0.0.124" + "@withmarfa/client": "0.0.126" } } diff --git a/kit/package.json b/kit/package.json index 9f5eac8b..f1504d80 100644 --- a/kit/package.json +++ b/kit/package.json @@ -42,7 +42,7 @@ "@opentelemetry/resources": "3.1.1", "@opentelemetry/sdk-logs": "3.1.1", "@opentelemetry/sdk-trace": "3.1.1", - "@withmarfa/client": "0.0.124", + "@withmarfa/client": "0.0.126", "eventsource-parser": "4.1.3", "fast-png": "8.0.0", "htmlparser2": "12.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 476797c6..b5982afc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,8 +117,8 @@ importers: host: dependencies: '@withmarfa/client': - specifier: 0.0.124 - version: 0.0.124 + specifier: 0.0.126 + version: 0.0.126 kit: dependencies: @@ -153,8 +153,8 @@ importers: specifier: 3.1.1 version: 3.1.1(@opentelemetry/api@1.10.0) '@withmarfa/client': - specifier: 0.0.124 - version: 0.0.124 + specifier: 0.0.126 + version: 0.0.126 eventsource-parser: specifier: 4.1.3 version: 4.1.3 @@ -190,8 +190,8 @@ importers: scripts: dependencies: '@withmarfa/client': - specifier: 0.0.124 - version: 0.0.124 + specifier: 0.0.126 + version: 0.0.126 '@withmarfa/connector': specifier: workspace:* version: link:../kit @@ -841,8 +841,8 @@ packages: '@vitest/spy@5.1.2': resolution: {integrity: sha512-PQl0/3+p9GaY71+MHywN6oyHfLhVDD5kcbm7oNRldA2F0ExMU3S8RQdnpteJ9gFAdK5P6KCgE6LqCpUgy57KzA==} - '@withmarfa/client@0.0.124': - resolution: {integrity: sha512-EweIrweXxk6/XYH9cZYjPCG88EyTj0561KYKbRGCsHP19FvqC5yU73pc3au1DLDPw1L5OSSFdNE/0pMIdrVK2w==} + '@withmarfa/client@0.0.126': + resolution: {integrity: sha512-sIxJ+QUCH95kN6Oz6eGrHuXraWrZOqiquCXkcKVDMXXnkdFD/c+MH9Kv5n/L55R/dqhu3UzyR3yzON+CowFcbQ==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -2049,7 +2049,7 @@ snapshots: '@vitest/spy@5.1.2': {} - '@withmarfa/client@0.0.124': + '@withmarfa/client@0.0.126': dependencies: openapi-fetch: 0.17.0 diff --git a/scripts/monorepo.commit b/scripts/monorepo.commit index 84ad4716..07ec1b65 100644 --- a/scripts/monorepo.commit +++ b/scripts/monorepo.commit @@ -1 +1 @@ -72890880036ae0faeb8cf808c4592f6b66118168 +0c492908f4a89155f3f0bd18bda31cbfa66ee288 diff --git a/scripts/package.json b/scripts/package.json index 272e4550..0e3bd2a2 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "dependencies": { - "@withmarfa/client": "0.0.124", + "@withmarfa/client": "0.0.126", "@withmarfa/connector": "workspace:*", "@withmarfa/connector-host": "workspace:*", "esbuild": "0.28.2" diff --git a/scripts/proof/adoption.ts b/scripts/proof/adoption.ts index 40fcd3b0..8026f998 100644 --- a/scripts/proof/adoption.ts +++ b/scripts/proof/adoption.ts @@ -6,7 +6,12 @@ import { type MarfaClient, type components, } from "@withmarfa/client"; -import { ConnectorUnderProof, registration, rowsOf } from "./connector.js"; +import { + ConnectorUnderProof, + registration, + revisionOf, + rowsOf, +} from "./connector.js"; import { check } from "./check.js"; import { connectorKey } from "./host.js"; @@ -95,7 +100,11 @@ export async function proveAdoption( ( await admin.PUT("/types/{id}", { params: { path: { id: child } }, - body: { ...stored(true), guidance }, + body: { + ...stored(true), + guidance, + revision: await revisionOf(admin, child), + }, }) ).data, ); @@ -106,7 +115,11 @@ export async function proveAdoption( ( await admin.PUT("/types/{id}", { params: { path: { id: child } }, - body: { ...stored(), guidance }, + body: { + ...stored(), + guidance, + revision: await revisionOf(admin, child), + }, }) ).data, ); @@ -125,6 +138,7 @@ export async function proveAdoption( body: { ...updated, guidance, + revision: await revisionOf(admin, child), fields: { ...updated.fields, note: { type: "string" } }, }, }) diff --git a/scripts/proof/connector.ts b/scripts/proof/connector.ts index dea23468..d733c6df 100644 --- a/scripts/proof/connector.ts +++ b/scripts/proof/connector.ts @@ -311,6 +311,15 @@ export async function typeHeld(marfa: MarfaClient, id: string) { throw new Error(`the type ${id} was refused: ${JSON.stringify(error)}`); } +export async function revisionOf(marfa: MarfaClient, id: string) { + const { data, error } = await marfa.GET("/types/{id}", { + params: { path: { id } }, + }); + if (data === undefined) + throw new Error(`the type ${id} was refused: ${JSON.stringify(error)}`); + return data.revision; +} + export async function installedAsKindOf( marfa: MarfaClient, type: string, diff --git a/scripts/proof/inbound-retry.ts b/scripts/proof/inbound-retry.ts index 685a1ead..eac7006b 100644 --- a/scripts/proof/inbound-retry.ts +++ b/scripts/proof/inbound-retry.ts @@ -6,7 +6,12 @@ import { resolve } from "node:path"; import { createClient, type MarfaClient } from "@withmarfa/client"; import type { Entry, PendingInbound } from "@withmarfa/connector"; import type { RetryConfig } from "./inbound-retry-connector.js"; -import { ConnectorUnderProof, registration, rowsOf } from "./connector.js"; +import { + ConnectorUnderProof, + registration, + revisionOf, + rowsOf, +} from "./connector.js"; import { Proxy } from "./checkpoint.js"; import { check } from "./check.js"; import { connectorKey } from "./host.js"; @@ -182,6 +187,7 @@ class Fixture { const result = await this.admin.PUT("/types/{id}", { params: { path: { id: this.type } }, body: { + revision: await revisionOf(this.admin, this.type), label: "Retry item", link_field: "vendor_id", fields: { diff --git a/scripts/proof/tracker.ts b/scripts/proof/tracker.ts index b8513648..534f27a3 100644 --- a/scripts/proof/tracker.ts +++ b/scripts/proof/tracker.ts @@ -14,6 +14,7 @@ import { purge, registration, restore, + revisionOf, rowsOf, trash, typeHeld, @@ -639,7 +640,10 @@ export async function proveTracker( const deleted = await marfa.DELETE("/types/{id}", { params: { path: { id: "proof.attachment" }, - query: { force: true }, + query: { + force: true, + revision: await revisionOf(marfa, "proof.attachment"), + }, }, }); if (!deleted.response.ok) {