Repository navigation
Conversation
Move the core pin automation that sdk-python and sdk-typescript each carry a copy of into one place: the core-sync scripts (core tags, bump pull requests, the drift check and issue, release tagging) and reusable core-watch and core-drift workflows. SDK repositories pin the scripts as mise remote tasks and provide the language-specific parts as tasks: proto:fetch, proto:gen, proto:buf, check, test and optionally core:uncovered-rpcs. The drift check now runs check before test, so a type error in bindings from core main fails it. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
An inline v2 config makes the repository root the buf module, so buf refuses proto/ as the input. A v1 config applies to the directory. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
The called jobs read the App secrets from the caller's sdk-bot environment, so secrets: inherit isn't needed. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
This was referenced Nov 19, 2026
The reusable workflows load core-sync/ as an action with `uses: $/core-sync`, which resolves to this repository at the commit the caller pinned, and the action sets CORE_SYNC_DIR. SDKs keep a copy of core-sync.sh, which runs the scripts from CORE_SYNC_DIR in CI and, locally, downloads the commit that .github/workflows/core-drift.yml calls. The workflow pin is then the only one; mise remote tasks with their own ref are no longer needed. Add release-tag.yml so the release workflow's tag job is shared too. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
- CODEOWNERS: core-sync/ and .github/ need an infra review, since SDKs run them with their bot App's secrets. - core-sync.sh --check-pin: SDK CI fails when the shared workflows are called at different refs or at a commit that isn't on main, which catches a pin to a fork-only commit addressed through this repository's name. The same check runs before a local download. - core-watch keeps the App token out of .git/config and drops GH_TOKEN while regenerating, so dependency install scripts can't read it; git push authenticates through gh. - Pin mise in the workflows that hold the token. Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
This was referenced Nov 19, 2026
chore(sdk/ts): migrate the TypeScript SDK to ai-openshell/sdk-typescript
ai-openshell/openshell#5480
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft to get a sense of sharing the SDK core-sync automation. sdk-python and sdk-typescript each carry a copy of the same scripts; this moves them here with reusable workflows, and leaves only the language-specific steps in each SDK as mise tasks.
What's here
core-sync/: the scripts both SDKs copied from sdk-python (core tags, bump PRs, drift check and issue, release tagging), with the repository-specific bits taken out:SDK_REPO,GITHUB_REPOSITORY, or the clone;OPENSHELL_GENERATED_PATHSin the SDK'smise.toml;proto:fetchat the pin and at coremainand compares the exports withproto:buf, instead of hardcoding proto roots and how to run buf;checkbeforetest, so type errors in bindings from coremainfail it (the gap found in ci: core sync automation and npm releases with trusted publishing sdk-typescript#4);core:uncovered-rpcstask.core-watch.yml,core-drift.yml, andrelease-tag.yml(the tag job of an SDK's release). They read the App secrets from the caller'ssdk-botenvironment, so callers pass no secrets.core-sync/README.md: the contract an SDK implements, and how to call it.One pin
An SDK pins one commit of this repository, in its workflows'
uses:lines, and both CI and local runs use that commit's scripts:core-sync/as an action withuses: $/core-sync. Self-repository syntax resolves$/to this repository at the commit being run, and the action setsCORE_SYNC_DIR. I checked this with a probe called from sdk-typescript:$/probe-actionresolved topimlock/workflows/probe-action@<the pinned sha>, with the rest of the repository at that commit next to it.core-sync/core-sync.shasscripts/core-sync.sh, and itscore:*tasks run through it. It usesCORE_SYNC_DIRwhen set; otherwise it reads the commit from theuses:line in.github/workflows/core-drift.ymland downloads that commit'score-sync/once into~/.cache/openshell-core-sync/<sha>.Callers: ai-openshell/sdk-typescript#7 and ai-openshell/sdk-python#53 (both point at this fork until it merges).
Security
These scripts and workflows run in SDK repositories with the bot App's secrets (contents, pull request and issue write), so:
.github/CODEOWNERSsendscore-sync/and.github/to@ai-openshell/infra. Without it,main-integrityaccepts any one approver here, which is weaker than the SDKs' own rule for these scripts.scripts/core-sync.sh --check-pin, run in SDK CI from the SDK's own copy (not from the pinned commit), fails when the shared workflows are called at different refs or at a commit that isn't on this repository'smain. A fork-only commit is reachable through this repository's name, so a pin bump could otherwise point at one. I tested it: a commit onmainpasses; a commit from the fork addressed asai-openshell/workflows@<sha>fails with compare statusahead. The same check runs before a local download (CORE_SYNC_ALLOW_UNMERGED=1skips it, for trying unmerged commits).core-watchchecks out withpersist-credentials: false,git pushauthenticates throughgh auth setup-git, andopen-bump-pr.shregenerates withGH_TOKENremoved, so the SDK's dependency install scripts (npm postinstall, uv) can't read the token. Before, the token was in.git/configand the environment duringnpm ci.2026.11.6) instead of taking the newest release.Updates
An SDK gets a change here only when its pin moves. Nothing changes under an SDK on its own, which is intended: this code runs with the bot App's secrets.
uses:lines, but for a SHA pin it proposes the commit of a newer release tag; it doesn't follow untagged commits onmain. This repository has no tags yet, so it would need them (for examplev1.2.0for the whole repository, or per component such ascore-sync/v1.2.0; whether Dependabot reads a prefixed tag as a version needs checking).ai-openshell/workflows*incooldown.exclude, or the 7-day cooldown delays every update.scripts/core-sync.sh. Local runs follow the pin anyway, since the shim reads it from the workflows, but changes to the shim itself (such as--check-pin) have to be copied by hand or by the repo template. The shim should stay small and rarely change.uses:lines to the samemaincommit. Acore-sync:update-pintask could do that edit and run--check-pin.main, but it needs an App with write access to all SDK repositories, which is a wider grant than anything here has today.Alternatives
checkgap in ai-openshell/sdk-typescript#4 was in one copy)$/, so actionlint works; callers see the triggers and permissionspersist-credentials, droppingGH_TOKEN) repeated in every SDK, and that is the part most worth sharingghextension) released from heremise.toml(Renovate does)pimlock/openshell-repo-templaterepository_dispatchfrom the core release workflow)core-watch; needs a token fromNVIDIA/OpenShellintoai-openshell; complements the others rather than replacing themgitsubmoduleecosystem follows a branch, no tags neededOpen questions
OPENSHELL_CORE_REFinmise.toml, which the scripts read and rewrite withsed; the SDK's steps are mise tasks (proto:gen,check,test, ...); and the workflows install mise. If we want to drop mise from the SDKs, the contract needs a neutral form, for example the pin in its own file (.openshell-core-ref) and the steps as executables underscripts/. The contract is small (two env values, seven tasks), so the change is mechanical, but every SDK moves at once.uses: $/…yet; zizmor does. Only this repository's workflows use it, and this repository doesn't run actionlint.$/needs runner 2.336.0 or newer, which GitHub-hosted runners have.pimlock/openshell-repo-template, change note 0004) describes the same contract and would point here instead of at sdk-python.scripts/core-sync.shis a good candidate for a template-managed file.Testing
From both SDK branches, with the scripts downloaded through
scripts/core-sync.sh:mise run core:driftpasses against coremain90e34ad (buf breaking, regenerate +check+test, uncovered RPCs),core:tagsandcore:bump --dry-runwork, andrelease:tag --dry-runworks. shellcheck and zizmor pass. The reusable workflows haven't run end to end yet; that needs the bot environment, so it will happen when an SDK merges its caller.