Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions connectors/readwise/test/content-scale.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions connectors/readwise/test/managed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions connectors/readwise/test/reader/identity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions connectors/readwise/test/reader/outbound.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions connectors/readwise/test/reader/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ function stored(id: string, extra: Record<string, unknown> = {}): 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",
Expand Down
1 change: 1 addition & 0 deletions connectors/readwise/test/sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"dist"
],
"dependencies": {
"@withmarfa/client": "0.0.124"
"@withmarfa/client": "0.0.126"
}
}
2 changes: 1 addition & 1 deletion kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/monorepo.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
72890880036ae0faeb8cf808c4592f6b66118168
0c492908f4a89155f3f0bd18bda31cbfa66ee288
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 17 additions & 3 deletions scripts/proof/adoption.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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,
);
Expand All @@ -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,
);
Expand All @@ -125,6 +138,7 @@ export async function proveAdoption(
body: {
...updated,
guidance,
revision: await revisionOf(admin, child),
fields: { ...updated.fields, note: { type: "string" } },
},
})
Expand Down
9 changes: 9 additions & 0 deletions scripts/proof/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion scripts/proof/inbound-retry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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: {
Expand Down
6 changes: 5 additions & 1 deletion scripts/proof/tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
purge,
registration,
restore,
revisionOf,
rowsOf,
trash,
typeHeld,
Expand Down Expand Up @@ -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) {
Expand Down