Skip to content

ci(drift): sync SDK model, tool status and connector lists with apper - #365

Open
sam-prais wants to merge 1 commit into
mainfrom
drift/sdk-sync
Open

sam-prais wants to merge 1 commit into
mainfrom
drift/sdk-sync

Conversation

@sam-prais

Copy link
Copy Markdown
Contributor

Part of the docs drift automation: keeps the SDK's copies of apper values in step with apper, and publishes each change to the docs once it's released. Replaces #284, whose code this reuses on the monorepo layout.

What's in it

drift-sdk.yml. Daily, one job per check, each with one rolling PR on bot/drift/<check>:

  • models: the InvokeLLMParams.model union gains any model apper offers (the RuntimeModel enum minus _LEGACY_RUNTIME_MODELS and automatic), and the Options: line lists exactly the offered models. Values are never removed from the union, because that breaks TypeScript users; dropped ones are listed in the PR for a person to decide.
  • tool-status: the AgentMessageToolCall.status union gains new values from apper's ToolCall.status, the same way.
  • connectors: the Available connectors JSDoc table gains rows for new public connectors and loses rows apper no longer lists. Flagged and beta connectors are counted, never named.

extract_apper.py reads the apper files with Python's ast module; sync-sdk.mjs writes the TypeScript.

publish-sdk-change-to-docs.yml. When a merged drift PR lands on main, it regenerates the reference before and after the change and applies only that diff to mintlify-docs (English and locale copies), using scoped-docs-patch.mjs from #284. The docs PR carries <!-- waits-for-sdk-commit: SHA -->, so mintlify-docs' release gate holds it until the release that includes the commit is on npm's latest tag. It refuses to open the PR unless mintlify-docs main requires the SDK released check.

open-or-update-pr action (from #284). Now holds off, and says so once, when someone other than the bot has pushed to the branch; uses --force-with-lease; ignores fork PRs with the same branch name; and adds labels.

Safety (this repo is public)

  • The docs bot key, which reads apper, is only in the drift environment, which only main can use. Workflows run only code already on main next to it.
  • Nothing from apper is printed except values the SDK publishes anyway. A parse error reports the file name, not its source.

Before merging

Merge once these exist, or the daily run fails and opens an issue:

  • the docs bot GitHub App, installed on base44-dev's apper and mintlify-docs
  • a drift environment in this repo, limited to main, with DOCS_BOT_APP_ID (variable) and DOCS_BOT_PRIVATE_KEY (secret)

The first models change will publish only after the next full regeneration of the SDK reference: the published integrations.mdx is several versions behind, so the scoped patch refuses to apply until then.

Testing

  • npm run test:unit -w @base44/sdk: 432 tests pass, 15 of them new in tests/unit/drift/
  • check_wix_proxy_steps.py passes for all 13 jobs; actionlint and ESLint are clean
  • Ran all three checks against current apper: models trims the Options: line to the 8 offered models and keeps the 10 retired ones in the union; tool status and connectors are in sync
  • The PR action tested against a scratch remote: create, update, unchanged, held after a reviewer's push or amend, a leftover branch, and no changes left

Daily drift-sdk.yml reads apper and keeps one PR per check: the InvokeLLM
model union and Options line, the agent tool call status union (both only
ever gain values), and the Available connectors JSDoc table.

When one of those PRs merges, publish-sdk-change-to-docs.yml opens a scoped
mintlify-docs PR that waits for the SDK release.

Reuses the open-or-update-pr action and scoped docs patch from #284, moved
to the monorepo layout.
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.58-beta.0-pr.365.02597b4

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.58-beta.0-pr.365.02597b4"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.58-beta.0-pr.365.02597b4"
  }
}

Preview published to npm registry — try new features instantly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant