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
bc816aa
feat(ts-sdk): add typed runtime config package
Apr 11, 2026
182aa23
refactor(ts-sdk): flatten package and brand runtime types
Apr 11, 2026
d8c5bae
feat(ts-sdk): add typed runtime policy config
Apr 11, 2026
140a66c
feat(ts-sdk): add typed derived-state runtime config
Apr 11, 2026
8243b4a
refactor(ts-sdk): harden runtime config ergonomics
Apr 11, 2026
74d37f7
feat(ts-sdk): add presets and focused subpath exports
Apr 11, 2026
5b8ea87
fix(ts-sdk): align profile presets with runtime defaults
Apr 11, 2026
3764093
build(ts-sdk): separate package and test outputs
Apr 11, 2026
756ee56
build(ts-sdk): migrate to pnpm and harden runtime tooling
Apr 11, 2026
0612655
refactor(ts-sdk): add simpler runtime config facade
Apr 11, 2026
a7603a8
feat(ts-sdk): add extension runtime authoring and examples
Apr 11, 2026
bccf3d5
feat(ts-sdk): add stdio worker runtime and ci checks
Apr 11, 2026
b8e08ac
feat(ts-sdk): add app-first application api
Apr 11, 2026
18dd848
feat(ts-sdk): align runtime host with rust ingress model
Apr 11, 2026
7da8459
fix(ts-sdk): delegate ingress policy to native runtime
Apr 11, 2026
0c73bdb
fix(ts-sdk): narrow public api and harden runtime handoff
Apr 11, 2026
1cc501a
feat(ts-sdk): finalize runtime packaging and release flow
Apr 11, 2026
af5a567
docs(gitbook): add sdk docs and fix navbar
Apr 11, 2026
32b7274
chore(gitignore): ignore sdk native vendor outputs
Apr 11, 2026
4066f23
fix(ci): pin pnpm and clean ts runtime host cfgs
Apr 11, 2026
d4158df
perf(ts-sdk): batch framed worker bridge
Apr 11, 2026
8502ad5
perf(ts-sdk): send packet batches as binary frames
Apr 11, 2026
432ed21
perf(ts-sdk): bound worker queue and reduce packet copies
Apr 11, 2026
46465c4
fix(ci): gate provider worker frame tag by feature
Apr 11, 2026
e42ead8
chore(ts-sdk): rename npm scope to lythaeon-sof
Apr 12, 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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ jobs:
- name: Build and verify publishable crate archives
run: bash scripts/verify-publishable-archives.sh

typescript-sdk:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install SDK dependencies
run: pnpm install --frozen-lockfile

- name: Run TypeScript SDK checks
run: pnpm --dir sdks/typescript run check

fuzz-smoke:
runs-on: ubuntu-latest
timeout-minutes: 90
Expand Down
230 changes: 230 additions & 0 deletions .github/workflows/release-typescript-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
name: Release TypeScript SDK

on:
push:
tags:
- "ts-sdk-v*.*.*"
workflow_dispatch:
inputs:
publish:
description: "Publish to npm instead of packing artifacts only"
required: false
default: false
type: boolean

permissions:
contents: read
id-token: write

concurrency:
group: release-typescript-sdk-${{ github.ref }}
cancel-in-progress: false

env:
NODE_VERSION: "22"
SDK_DIRECTORY: sdks/typescript

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 30
outputs:
sdk_version: ${{ steps.sdk-version.outputs.value }}
publish_release: ${{ steps.release-mode.outputs.value }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: https://registry.npmjs.org

- name: Decide release mode
id: release-mode
shell: bash
run: |
set -euo pipefail
if [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
echo "value=true" >> "${GITHUB_OUTPUT}"
elif [[ "${{ inputs.publish }}" == "true" ]]; then
echo "value=true" >> "${GITHUB_OUTPUT}"
else
echo "value=false" >> "${GITHUB_OUTPUT}"
fi

- name: Read SDK version
id: sdk-version
shell: bash
run: |
set -euo pipefail
value="$(node -p "require('./${SDK_DIRECTORY}/package.json').version")"
echo "value=${value}" >> "${GITHUB_OUTPUT}"

- name: Verify tagged commit is on main
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
set -euo pipefail
git fetch --no-tags origin main
if ! git merge-base --is-ancestor "${GITHUB_SHA}" "FETCH_HEAD"; then
echo "Tag ${GITHUB_REF_NAME} points to commit ${GITHUB_SHA} which is not on origin/main"
exit 1
fi

- name: Verify tag matches SDK version
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
set -euo pipefail
expected_tag="ts-sdk-v${{ steps.sdk-version.outputs.value }}"
if [[ "${GITHUB_REF_NAME}" != "${expected_tag}" ]]; then
echo "Expected tag ${expected_tag}, got ${GITHUB_REF_NAME}"
exit 1
fi

- name: Install workspace dependencies
run: pnpm install --frozen-lockfile

- name: Run TypeScript SDK checks
run: pnpm --dir "${SDK_DIRECTORY}" run check

publish-native:
needs: verify
runs-on: ${{ matrix.runner }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- package_dir: sdks/typescript/native/linux-x64
package_name: "@lythaeon-sof/sdk-native-linux-x64"
runner: ubuntu-24.04
- package_dir: sdks/typescript/native/linux-arm64
package_name: "@lythaeon-sof/sdk-native-linux-arm64"
runner: ubuntu-24.04-arm
- package_dir: sdks/typescript/native/darwin-x64
package_name: "@lythaeon-sof/sdk-native-darwin-x64"
runner: macos-15-intel
- package_dir: sdks/typescript/native/darwin-arm64
package_name: "@lythaeon-sof/sdk-native-darwin-arm64"
runner: macos-15
- package_dir: sdks/typescript/native/win32-x64
package_name: "@lythaeon-sof/sdk-native-win32-x64"
runner: windows-2025
- package_dir: sdks/typescript/native/win32-arm64
package_name: "@lythaeon-sof/sdk-native-win32-arm64"
runner: windows-11-arm
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Rust CI toolchain and tools
uses: ./.github/actions/rust-ci-setup

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: https://registry.npmjs.org

- name: Install workspace dependencies
run: pnpm install --frozen-lockfile

- name: Publish native runtime package
if: needs.verify.outputs.publish_release == 'true'
working-directory: ${{ matrix.package_dir }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
run: pnpm publish --access public --no-git-checks

- name: Pack native runtime package
if: needs.verify.outputs.publish_release != 'true'
working-directory: ${{ matrix.package_dir }}
shell: bash
run: pnpm pack --pack-destination ../../../dist/npm

publish-sdk:
needs:
- verify
- publish-native
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.28.2

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: https://registry.npmjs.org

- name: Install workspace dependencies
run: pnpm install --frozen-lockfile

- name: Wait for native packages to index on npm
if: needs.verify.outputs.publish_release == 'true'
shell: bash
run: |
set -euo pipefail
version="${{ needs.verify.outputs.sdk_version }}"
packages="$(node -p "JSON.stringify(Object.keys(require('./${SDK_DIRECTORY}/package.json').optionalDependencies).sort())")"

wait_until_indexed() {
local pkg="$1"
local attempt
for attempt in $(seq 1 30); do
if npm view "${pkg}@${version}" version >/dev/null 2>&1; then
echo ">>> ${pkg}@${version} is visible on npm"
return 0
fi
echo ">>> Waiting for ${pkg}@${version} to appear on npm (${attempt}/30)..."
sleep 10
done
echo ">>> ${pkg}@${version} did not appear on npm in time"
return 1
}

node -e "for (const pkg of ${packages}) console.log(pkg)" | while IFS= read -r package_name; do
wait_until_indexed "${package_name}"
done

- name: Publish TypeScript SDK
if: needs.verify.outputs.publish_release == 'true'
working-directory: ${{ env.SDK_DIRECTORY }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash
run: pnpm publish --access public --no-git-checks

- name: Pack TypeScript SDK
if: needs.verify.outputs.publish_release != 'true'
working-directory: ${{ env.SDK_DIRECTORY }}
shell: bash
run: pnpm pack --pack-destination ../dist/npm
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/target/
**/node_modules/
**/dist/
**/dist-test/
**/dist-examples/
sdks/typescript/native/*/vendor/

# Editor/OS noise
.DS_Store
Expand Down
6 changes: 5 additions & 1 deletion crates/sof-observer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ solana-vote = "3.1.11"
solana-vote-program = { version = "3.1.11", features = ["agave-unstable-api"] }
reed-solomon-erasure = { version = "6.0.0", features = ["simd-accel"] }
thiserror = "2.0"
tokio = { version = "1.48", features = ["io-util", "macros", "rt-multi-thread", "net", "sync", "time"] }
tokio = { version = "1.48", features = ["io-util", "macros", "net", "process", "rt-multi-thread", "sync", "time"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
wincode = "=0.1.2"
Expand Down Expand Up @@ -167,6 +167,10 @@ name = "gossip_protocol_profile"
path = "src/bin/gossip_protocol_profile.rs"
required-features = ["gossip-bootstrap"]

[[bin]]
name = "sof_ts_runtime_host"
path = "src/bin/sof_ts_runtime_host.rs"

[[bench]]
name = "hot_paths"
harness = false
Loading
Loading