Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
520dc29
feat(search): draw an answer's assumptions and post choice options un…
jm-rivera Oct 20, 2026
99ea431
fix(search): echo an empty assumptions list on an identity entry
jm-rivera Oct 20, 2026
3259468
fix(search): name the part an assumptions clause belongs to in a per-…
jm-rivera Oct 20, 2026
6ca4b60
fix(search): pick an entity from the refusal's options, label clauses…
jm-rivera Oct 20, 2026
6994ebd
fix(search): refuse a share whose assumptions Search would refuse
jm-rivera Oct 20, 2026
04c33d2
fix(search): echo the picked reading's own assumptions, and each read…
jm-rivera Oct 20, 2026
434faea
fix(search): keep an edit's assumptions echo through a permalink
jm-rivera Oct 20, 2026
01638a6
fix(search): keep a replayed edit's own assumptions echo
jm-rivera Oct 20, 2026
2283269
fix(search): draw a mixed answer's coverage line apart from its heading
jm-rivera Oct 20, 2026
ebf251b
docs(search): word the assumptions and share comments as plain statem…
jm-rivera Oct 20, 2026
1eade0b
fix(search): read an open destination role from its where: ref in Abo…
jm-rivera Oct 21, 2026
9473505
docs(search): say what a replay posts for a refused echo, and drop de…
jm-rivera Oct 21, 2026
85eea2b
docs(search): drop defaulted slots from the facet-basis comments, and…
jm-rivera Oct 21, 2026
e790135
refactor(search): take API types from the generated client package
jm-rivera Oct 20, 2026
903b4b5
refactor(graph): take graph wire types from the client package
jm-rivera Oct 21, 2026
a82df54
refactor(search): type specs, slot options and assumptions from the wire
jm-rivera Oct 21, 2026
fd33f86
refactor(search): read stream, option and observation members as wire…
jm-rivera Oct 21, 2026
22498e6
build: vendor the client package built from the sdk at 69f7439
jm-rivera Oct 21, 2026
2f33fda
refactor(search): type the page specs and stream entries from the cli…
jm-rivera Oct 21, 2026
1e4d734
build: vendor the client package built from the sdk at 7893fc2
jm-rivera Oct 21, 2026
9c61d9c
build: vendor the client package built from the sdk at 14f33ea
jm-rivera Oct 21, 2026
192bfd6
build: vendor @developmentfinance/client at sdk db45985
jm-rivera Oct 21, 2026
1f93845
docs(search): tighten the wire-type and client comments
jm-rivera Oct 21, 2026
e7f43af
build: vendor @developmentfinance/client at sdk 0d64185
jm-rivera Oct 21, 2026
397234e
Merge dev into the generated client types
jm-rivera Oct 23, 2026
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
7 changes: 4 additions & 3 deletions db/schema.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Assumption, EntityGroup, RequestedOperation } from '@developmentfinance/client/wire';
import { sql } from 'drizzle-orm';
import {
bigint,
Expand Down Expand Up @@ -99,15 +100,15 @@ export const shareRef = pgTable(
specId: text('spec_id').notNull(),
identity: jsonb('identity').notNull(),
// Null when no role was asked for as a group.
entityGroups: jsonb('entity_groups'),
entityGroups: jsonb('entity_groups').$type<Record<string, EntityGroup>>(),
variableText: text('variable_text'),
contentVersion: text('content_version'),
// Null for a live share and for snapshots stored before the column.
artifactDigest: text('artifact_digest'),
operations: jsonb('operations').notNull().default([]),
operations: jsonb('operations').$type<RequestedOperation[]>().notNull().default([]),
// The part's assumptions as the response gave them, [] included,
// which the replay echoes. Null for a share stored before the column.
assumptions: jsonb('assumptions'),
assumptions: jsonb('assumptions').$type<Assumption[]>(),
},
(table) => [primaryKey({ columns: [table.shareId, table.partIndex] })],
);
Expand Down
5 changes: 3 additions & 2 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ RUN npm install -g pnpm@10.5.2

WORKDIR /app

# Manifest + lockfile first, so the dependency layer caches across
# source-only changes.
# Manifest, lockfile and the vendored tarballs they name (`file:vendor/...`)
# first, so the dependency layer caches across source-only changes.
COPY package.json pnpm-lock.yaml ./
COPY vendor ./vendor
RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
pnpm install --frozen-lockfile

Expand Down
17 changes: 13 additions & 4 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,20 @@ The `apis`, `ai` and `dcp` repositories run their own dev services. `apis` and `
| `pnpm optimize:svg` | SVGO over `src/assets` (run after adding) |
| `pnpm db:generate` | Generate a migration from `db/schema.ts` |
| `pnpm db:migrate:local` | Apply migrations to the local database |
| `pnpm graph:types` | Regenerate the graph types from the snapshot |
| `pnpm graph:schema` | Refresh the graph schema snapshot from an apis |

`pnpm graph:schema http://localhost:8083` reads the snapshot from dev apis
through the proxy in [Reach the dev APIs](#reach-the-dev-apis).
## API client package

The Search, Datasets and Graph types come from `@developmentfinance/client`, vendored as `vendor/developmentfinance-client-0.1.0.tgz`. The tarball is the `typescript/` package of the sdk repository, built and packed. To refresh it, pack that package into `vendor/` and re-lock, so `pnpm-lock.yaml` carries the new tarball's integrity:

```sh
cd <sdk checkout>/typescript
pnpm install && pnpm run build
pnpm pack --pack-destination <website checkout>/vendor
cd <website checkout>
pnpm install
```

A new package version packs under a new file name. Point the `@developmentfinance/client` entry in `package.json` at it before re-locking. Commit the tarball and the lockfile together.

## Conventions

Expand Down
15 changes: 0 additions & 15 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,6 @@ test:
build:
pnpm build

# src/lib/graph/test/wire.test.ts fails until the committed types match the
# snapshot; the diff of this regeneration is the review artifact.
#
# Rewrite src/lib/graph/schema.d.ts from the Graph API schema snapshot
graph-types:
pnpm graph:types

# Reads `GET /api/graph/schema` from the given dfo-apis, a local proxy to dev by
# default. The dev service admits only invoker identities, so start the proxy
# first (see "Reach the dev APIs" in docs/development.md).
#
# Refresh the Graph API schema snapshot from a deployed dfo-apis, then the types
graph-schema url="http://localhost:8083":
pnpm graph:schema {{url}}

# Everything ci.yml runs, in CI's order. Green here means green there.
check: lint typecheck test build

Expand Down
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
"lint:css": "stylelint \"src/**/*.scss\"",
"lint:css:fix": "stylelint \"src/**/*.scss\" --fix",
"typecheck": "tsc --noEmit",
"test": "node --test db/test/*.test.ts src/lib/search/test/*.test.ts src/lib/studio/test/*.test.ts src/lib/chat/test/*.test.ts src/lib/proxy/test/*.test.ts src/lib/auth/test/*.test.ts src/lib/mail/test/*.test.ts src/lib/sources/test/*.test.ts src/lib/test/*.test.ts src/lib/docs/test/*.test.ts src/lib/graph/test/*.test.ts",
"graph:types": "node scripts/graph-wire.mts types",
"graph:schema": "node scripts/graph-wire.mts schema",
"test": "node --test db/test/*.test.ts src/lib/search/test/*.test.ts src/lib/studio/test/*.test.ts src/lib/chat/test/*.test.ts src/lib/proxy/test/*.test.ts src/lib/auth/test/*.test.ts src/lib/mail/test/*.test.ts src/lib/sources/test/*.test.ts src/lib/test/*.test.ts src/lib/docs/test/*.test.ts",
"format": "prettier --write \"src/**/*.{ts,tsx,js,json,scss}\"",
"optimize:svg": "svgo -f src/assets -r",
"db:generate": "drizzle-kit generate",
Expand All @@ -26,6 +24,7 @@
"dependencies": {
"@aws-sdk/client-sesv2": "3.1150.0",
"@aws-sdk/credential-providers": "3.1150.0",
"@developmentfinance/client": "file:vendor/developmentfinance-client-0.1.0.tgz",
"@fontsource/dm-mono": "^5.3.0",
"@fontsource/outfit": "^5.3.0",
"@google-cloud/cloud-sql-connector": "^1.12.0",
Expand Down Expand Up @@ -63,7 +62,6 @@
"esbuild": "^0.25.0",
"eslint": "^9",
"eslint-config-next": "16.3.0",
"openapi-typescript": "7.13.0",
"postcss": "^8.5.26",
"postcss-scss": "^4.0.9",
"prettier": "3.9.6",
Expand Down
Loading
Loading