Skip to content

chore(mothership): take the remaining contracts from the worker and drop the Go contract generators - #10264

Open
waleedlatif1 wants to merge 4 commits into
stagingfrom
chore/mship-contracts-from-worker
Open

waleedlatif1 wants to merge 4 commits into
stagingfrom
chore/mship-contracts-from-worker

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The Go copilot is being removed from the mothership repo, so its JSON contracts are no longer generated

  • The eight contracts Sim generated from that JSON (mothership-stream-v1, billing-protocol-v1, vfs-snapshot-v1, the four trace-* files, metrics-v1) are now worker-owned TypeScript copied in by the worker's contracts:sync, like every other file in lib/mothership/generated/

  • Content is unchanged apart from headers and formatting. Two exceptions: the task_armed target type goes from {} to Record<string, unknown> (the schema always said type: object), and two doc comments now say "worker" instead of "Go"

  • Removes the eight json2ts sync scripts, their *:generate/*:check package scripts, and the mship:generate umbrella

  • Drops the now-unused json-schema-to-typescript dev dependency

  • mship-tools:generate now reads the base tool catalog from ../copilot/worker/packages/contracts/tool-catalog-v1.json; the regenerated output only changes its header line

  • The worker serves POST /api/model-router again (mothership D116). Only the Go service did, so sim-auto has fallen back to its default model since the cutover. lib/model-router/resolve.ts now types its request and response from the synced generated/model-router.ts instead of a hand-kept copy

Companion: simstudioai/mothership#995

Type of Change

  • Other: contract source move

Testing

  • tsc --noEmit in apps/sim clean
  • lib/model-router tests pass
  • check:source-conventions and biome pass
  • mship-tools:check passes against the moved catalog
  • The worker's check:contract-sync passes against this branch

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner November 21, 2026 00:15
@vercel

vercel Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 21, 2026 12:42am UTC

Request Review

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Nov 21, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Cross-repo companion check

One or more companion PRs aren't merged into staging yet. Merging this without them will leave copilot and sim out of sync — merge them in lockstep.

  • ❌ simstudioai/mothership#995 — OPEN, not merged (targets staging) — chore(repo): remove the Go copilot and own its remaining contracts in the worker

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 23 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Moves eight Mothership contracts from Sim’s Go-schema generators to worker-owned TypeScript copies.

  • Sim uses worker-owned TypeScript contracts for Mothership messages and telemetry.
  • Sim builds its tool catalog from the worker's base catalog.

No actionable issues were found. This review used source inspection; no tests or generators were run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  W[Worker TypeScript contracts] -->|contracts:sync| C[Sim contract copies]
  B[Worker base tool catalog] --> G[Sim tool catalog generator]
  S[Sim-owned tool contracts] --> G
  G --> T[Sim tool catalog and schemas]
Loading

Reviews (1) · Last reviewed commit: "chore(mothership): take the remaining co..." · Reviewed by Greptile

…rop the Go contract generators

The Go copilot is being removed from the mothership repo. The eight contracts Sim generated from its JSON (stream, billing protocol, vfs snapshot, trace and metric names) are now worker-owned TypeScript copied in by the worker's contracts:sync, so the eight json2ts sync scripts and the mship:generate umbrella go. The base tool catalog moves to the worker's packages/contracts, and mship-tools:generate reads it there.
@waleedlatif1
waleedlatif1 force-pushed the chore/mship-contracts-from-worker branch from 36ddb85 to 4ac688b Compare November 21, 2026 00:25
…del-router contract

The worker now serves POST /api/model-router again (mothership D116); only the Go service did, so every sim-auto block has fallen back to its default model since the cutover. The resolver takes its request and response types from the synced contract instead of a hand-kept copy.

This branch was previously deployed

1 inactive deployment
Preview — 915d82c9 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant