Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
f710d94
feat(j5): choose which models custom Crew members can use (#744)
bryantderosier Oct 27, 2026
1cb6afd
feat(web): choose the models custom Crew members can use in Agent Set…
bryantderosier Oct 27, 2026
e1daa0d
docs(j5): record models for custom members and the native-subagent li…
bryantderosier Oct 27, 2026
9eecba5
chore(j5): keep the models-for-custom-members contract exports minima…
bryantderosier Oct 27, 2026
ceeb85d
feat(web): models for custom members as collapsible provider cards (#…
bryantderosier Oct 27, 2026
824c09d
feat(web): same-size model chips, no New tag, shorter notes (#744)
bryantderosier Oct 27, 2026
446a114
feat(web): drop the Claude prefix from model chips on the Claude card…
bryantderosier Oct 27, 2026
2367d57
fix(j5): a persona seat on either of its routes is not a custom choic…
bryantderosier Oct 28, 2026
76eabab
docs(j5): case 90 covers every upstream file it touches; the list app…
bryantderosier Oct 28, 2026
382a184
merge: bring the updated archive-cleanup layer into the custom-member…
bryantderosier Nov 2, 2026
0426814
fix(web): drop a manual memo the React Compiler makes unnecessary
bryantderosier Nov 2, 2026
8fa48db
merge: bring the updated archive-cleanup layer into the custom-member…
bryantderosier Nov 2, 2026
8eda728
merge: pick up the archive cleanup test fix
bryantderosier Nov 2, 2026
2121420
merge: pick up the settings seam test fix
bryantderosier Nov 2, 2026
939df06
merge: pick up the Crew introduction record
bryantderosier Nov 2, 2026
24f6d4c
fix(j5): CrewLaunchModelNotEligibleError is only used inside the laun…
bryantderosier Nov 2, 2026
be5c732
merge: pick up the CI fixes from 748
bryantderosier Nov 2, 2026
72d1c33
style(j5): format the launch service after its error class stopped be…
bryantderosier Nov 2, 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
9 changes: 6 additions & 3 deletions FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ These files exist upstream, but J5 owns its copy outright and they are not integ

### Sanctioned appended integration cases

Against upstream pin `d2c440312e5f39d59827ed466838a623516454d6`, the inventory has 107 entries: 1–106 plus 15b. Seventeen are retired and keep their numbers (10–14, 15b, 16–18, 20, 27–29, 54, 55, 61, 66), and 19 and 39 are retired except for a remainder. Existing numbers never change; a new case takes the next number. Line coordinates and landing SHAs below describe historical integrations; use named symbols and tests after upstream movement. Branding has its own inventory in `BRANDING.md`; temporary defect patches are listed separately below.
Against upstream pin `d2c440312e5f39d59827ed466838a623516454d6`, the inventory has 108 entries: 1–107 plus 15b. Seventeen are retired and keep their numbers (10–14, 15b, 16–18, 20, 27–29, 54, 55, 61, 66), and 19 and 39 are retired except for a remainder. Existing numbers never change; a new case takes the next number. Line coordinates and landing SHAs below describe historical integrations; use named symbols and tests after upstream movement. Branding has its own inventory in `BRANDING.md`; temporary defect patches are listed separately below.

1. A1's independent communication-ledger migration lane: in `apps/server/src/persistence/Sqlite.ts`, `layerSetup` runs `runJ5CompatibleUpstreamMigrations` and then `runJ5A2AMigrations` where upstream calls `runMigrations()`. Upstream's `layerConfig` has already run `initializeV2Database`, which copies `state.sqlite` to `statev2.sqlite`, so both run only against `statev2.sqlite`. J5 adopts that copy-on-first-start unchanged (Jackson's 2026-09-24 decision #2): an existing `statev2.sqlite` wins and `state.sqlite` is never recopied or written again, so the cutover is one-way: writes after the first V2 boot are invisible to an older binary. Snapshot before the upgrade, and roll back across it by stopping writers and moving `statev2.sqlite` aside (`docs/j5/runbooks/dogfood-runtime.md`); never run old and new binaries against the two files. `layerFromPath` calls one J5 step, `snapshotBeforeMigrations` (`apps/server/src/j5/persistence/MigrationSnapshot.ts`), before it builds the SQL layer, so every file-backed open is covered. When the database has migration history and either lane has a migration pending (upstream's `effect_sql_migrations` against upstream's manifest, or `j5_a2a_migrations` against J5's ledger list), it is first copied with `VACUUM INTO`, through a read-only connection, to `statev2.pre-migration-u<upstream id>-j<J5 id>.sqlite` beside it, named for the newest migration each lane had recorded. The copy is synchronous and does not use `node:sqlite`'s `backup()`: on the Node 26 that release executables embed, `backup()` rejects the one-step rate Node 24 accepts and its promise settles only when another event wakes the loop, which stopped the first nightly from starting. The snapshot is a compacted copy in rollback-journal mode; the server sets WAL again when it opens a restored one. A database with no history, or with nothing pending, is not copied. The newest three snapshots are kept (`MIGRATION_SNAPSHOTS_KEPT`) and older ones deleted. This is the roll-forward policy's emergency exit (issue #507): J5 adds no refusal to start on a database newer than the build, as upstream adds none for that case. Upstream refuses only a history that would skip one of V2's own migrations (`assertV2MigrationsCanRun` in `Migrations.ts`), and a second server on the same home (`apps/server/src/serverOwnership.ts`, exit 78), whose lock `layerMakeServer` takes before anything opens the database, so before the snapshot. A failed copy dies there, so the server does not start and nothing migrates. It dies rather than fails so the layer's error type, which upstream's tests name, stays upstream's. `MigrationSnapshot.test.ts` covers it. The `j5_run_observability_migrations` lane (one index) is not consulted. J5 tooling (`fleet-load.ts`, `devDeliverySeed.ts`, `dogfood-snapshot.sh`, `dogfood-local.sh`) targets `statev2.sqlite`; `apps/server/src/j5/persistence/StateV2Cutover.test.ts` covers the copy, no-recopy and failed-first-boot retry. Case 31 defines the compatibility wrapper; J5's own migration IDs remain in separate tracking tables and run after upstream migration completion.
2. The authenticated J5 MCP registration seam: the `layer` of `apps/server/src/mcp/McpHttpServer.ts` calls `layerJ5Toolkits(toolkitRegistration)` (`apps/server/src/j5/a2a/mcp/registration.ts`) in place of upstream's orchestrator, thread, attachment, project and environment registrations. Upstream's preview, preview-controls, worktree, pull-request, device and html toolkits are registered whole, as upstream registers them. Upstream's lint rule `no-raw-mcp-registration` allows MCP registration only in `McpHttpServer.ts`, so J5 registers through the `toolkitRegistration` function that file passes in. `layerJ5Toolkits` registers J5's own tools and the admitted part of those five upstream toolkits. `upstreamCatalog.ts` selects the admitted tools one by one and runs them on upstream's own handlers through `handlersFor`, which is one documented cast. Upstream's `McpServer.toolkit` asks for every tool's declared dependencies at registration, so J5's environment toolkit registration (`registration.ts`) provides `ThreadCommandExecutor.layer`, as upstream's own does. `apps/server/src/mcp/McpInvocationContext.ts` adds the `artifacts` capability that case 33's tools check.
Expand Down Expand Up @@ -529,6 +529,8 @@ migrations after upstream migrations.

106. Deferred Crew assignments ([#745](https://github.com/Jacksondr5/j5code/issues/745)): `orchestration-v2/runtimeLayer.ts` wraps the shared orchestrator with J5-owned `CrewDeliveryContext.ts` for first-assignment workspace preparation and guards, and supplies J5-owned `CrewTurnContext.ts` to provider turn start and provider turn control. `orchestration-v2/ProviderTurnStartService.ts` asks that service whether the thread is a Crew seat (one indexed read) and delegates only a seat's selected assignment text to it immediately around provider delivery; every other thread keeps upstream's fast path and delivery unchanged, and `CrewDeliveryContext.ts` likewise passes any non-seat thread's dispatch straight through. `orchestration-v2/ProviderTurnControlService.ts` wraps the live session with the service's `steering`, one hook beside upstream's `steerTurn` call, so a message steered into a busy seat carries the current context too. The service builds the approved introduction or net roster changes from the current roster, sends the full introduction again when the provider conversation it reached is replaced (a model or provider switch, or a missing native session rebuilt from history), and records what it sent only after the provider accepts the prompt; a send that never happens (the run was stopped or superseded before `startTurn`) leaves it owed. Editable messages and shared author prefixes stay unchanged, so queued edits, cancellations and reordering cannot consume context. Waiting seats whose Crew is retired fail visibly; a retained worktree guard applies even after retirement. J5 migration 49 owns the context, and `CrewSeatPreparation.ts` uses upstream's persisted preparation path. `orchestration-v2/ProviderTurnStartService.test.ts` and `ProviderTurnControlService.test.ts` exercise the hooks against the real seat context, including a retained and a replaced native conversation and a Stop before the provider send. A seat's thread also keeps what it was told (register D43): after the provider accepts a prompt that carried the introduction or a roster change, `CrewTurnContext.ts` dispatches the server-only `platform-message.record` command with that text, ids derived from the conversation and the text so a retry records once, and a failure to post is logged without failing the turn. `packages/contracts/src/orchestrationV2.ts` appends the command to the internal command union; `orchestration-v2/Orchestrator.ts` adds one `commandThreadId` case, one `dispatch` case and `dispatchPlatformMessageRecord`, which emits the existing `message.updated` and `turn-item.updated` events for the named run with no run created or queued; `ProviderTurnStartService.ts` adds `runId: run.id` to the delivery it already hands the seat service; and `runtimeLayer.ts` builds the orchestrator layers above the two turn services so `CrewTurnContext.layer` can depend on the orchestrator. The client side is J5-owned: `presentCrewContext` in `packages/client-runtime/src/j5/crewNotices.ts`, `CrewNoticeRenderer.tsx` on web and `timeline.tsx` on mobile. `Orchestrator.platform-message.test.ts` proves the command, and `CrewDeliveryContext.test.ts` and its integration test prove the posting. On an advance, retain the hooks at actual delivery and steering after queue selection, shared by every provider and transport, and the internal command with its one decision function.

107. Models for custom members ([#744](https://github.com/Jacksondr5/j5code/issues/744), register D42, Bryant's approval of the upstream edit to `delegateTask`): `packages/contracts/src/settings.ts` imports J5's `CrewMemberModels` schema (`packages/contracts/src/j5/crewMemberModels.ts`) and registers `crewMemberModels`, a nullable list of checked `(providerInstanceId, model)` pairs (never saved is `null`, every model eligible), in the project-scoped key list, project overrides (also in the nullable-override list), server settings and patches. `apps/server/src/mcp/OrchestratorMcpService.ts` gives `delegateTask` an optional `authorizeTarget` input, called right after `resolveTargetRechecking` with the child's project and resolved model selection unless the command already has a receipt, so a plain `delegate_task` is checked on the model the child will actually run on, inherited included. Upstream behavior is unchanged when no hook is passed; J5's `agents/agentDelegation.ts` passes one that calls the J5-owned `CrewMemberModels` service (`apps/server/src/j5/agents/crewMemberModels.ts`), which Crew launches and `j5_spawn_agent` also call. `apps/server/src/mcp/toolkits/worktree/registration.test.ts` stubs that service among the J5 tool dependencies, and `packages/shared/src/projectSettings.test.ts` gains one case for the key's whole-list replace and project override. On an advance, keep the one call after the target resolves and before anything is created.

## Pin and upstream advance runbook

Current pin: `d2c440312e5f39d59827ed466838a623516454d6`, upstream's stable release tag `v0.1.3` on `main` (frozen 2026-10-27). The previous pin was `70d60e03a7a35c6fa131825bbfa05ec893e69912`, upstream's nightly tag `v0.1.1-nightly.20261017.3238`.
Expand Down Expand Up @@ -823,7 +825,7 @@ explicitly marked.
| `apps/server/src/environment/ServerEnvironmentLabel.ts` | N | 67 |
| `apps/server/src/httpCors.ts` | N | B |
| `apps/server/src/mcp/McpHttpServer.ts` | R | 2 |
| `apps/server/src/mcp/OrchestratorMcpService.ts` | A | Saved-agent mentions |
| `apps/server/src/mcp/OrchestratorMcpService.ts` | A | Saved-agent mentions, 107 |
| `packages/contracts/src/previewAutomation.ts` | N | 74 |
| `apps/server/src/preview/ServerBrowserStream.ts` | N | Preview stream session invalidation (#798) |
| `apps/server/src/preview/ServerBrowserStream.test.ts` | N | Preview stream session invalidation (#798) |
Expand Down Expand Up @@ -928,7 +930,7 @@ explicitly marked.
| `packages/contracts/src/server.test.ts` | N | 43 |
| `packages/contracts/src/server.ts` | N | 42, 43 |
| `packages/contracts/src/settings.test.ts` | N | 42 |
| `packages/contracts/src/settings.ts` | N | 42, B, 105 |
| `packages/contracts/src/settings.ts` | N | 42, B, 105, 107 |
| `packages/shared/package.json` | N | 43, 46, 49, 52 |
| `packages/shared/src/devHome.test.ts` | R | H |
| `packages/shared/src/paletteSearch.test.ts` | N | B |
Expand Down Expand Up @@ -1028,6 +1030,7 @@ explicitly marked.
| `packages/shared/src/cliRelease.ts` | N | 40 |
| `packages/shared/src/promptLinks.test.ts` | N | 76 |
| `packages/shared/src/promptLinks.ts` | N | B, 76 |
| `packages/shared/src/projectSettings.test.ts` | N | 107 |
| `apps/web/src/components/chat/TimelineUserMessageRow.tsx` | N | 7, 80, B |
| `apps/web/src/components/chat/timelineRowContext.ts` | N | 24 |
| `apps/web/src/components/chat/TimelineWorkEntryRow.tsx` | N | 80 |
Expand Down
Loading
Loading