Skip to content

Commit 50b4fd6

Browse files
authored
Merge branch 'main' into qvac-b9518
2 parents 6f3812c + 1585fb9 commit 50b4fd6

201 files changed

Lines changed: 6281 additions & 1707 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/rules/sdk/example.mdc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,24 @@ alwaysApply: false
55
---
66
- All example files should have consistent error handling using try-catch blocks with process.exit(0) on success and process.exit(1) on error
77
- Use top-level await with try-catch instead of async function wrappers
8-
- Error messages should use: `console.error("❌ Error:", error)`
98
- Examples can use plain `Error` objects (they're user-facing demos, not SDK code)
109
- All example files which load models should have an unloadModel call to unload the model when done
10+
- Logging convention (uniform across all examples):
11+
- Normal messages (status, steps, metrics, progress) use `console.log` prefixed with `▸ ` (e.g. `console.log("▸ Loading model")`)
12+
- Caught errors use `console.error` prefixed with `✖ ` (e.g. `console.error("✖", error)`). Reserve `console.error` for errors only — some runtimes render it in red, which looks alarming for ordinary output
13+
- Genuine results stay unprefixed so they read apart from the `▸` commentary: stream tokens via `process.stdout.write(token)`, final results via plain `console.log`
14+
- Do not use other decorative emojis; only `▸` (info) and `✖` (error)
15+
- No shared logging helper — each example stays standalone and copy-pasteable
16+
- Download progress renders as one in-place line on stderr, not a raw progress-object dump:
17+
```ts
18+
onProgress: (p) => {
19+
const mb = (n: number) => (n / 1e6).toFixed(1);
20+
const line = `▸ Downloading ${p.percentage.toFixed(0)}% (${mb(p.downloaded)}/${mb(p.total)} MB)`;
21+
process.stderr.write(process.stderr.isTTY ? `\r${line}` : `${line}\n`);
22+
if (p.percentage >= 100) process.stderr.write("\n");
23+
},
24+
```
1125
- Exception for continuously running services (providers, seeders, microphone recording):
1226
- Use `process.stdin.resume()` to keep running
13-
- Include SIGINT handler for graceful shutdown: `process.on("SIGINT", () => { console.log("\n🛑 Service stopped"); process.exit(0); })`
27+
- Include SIGINT handler for graceful shutdown: `process.on("SIGINT", () => { console.log("\n Service stopped"); process.exit(0); })`
1428

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @tetherto/qvac-internal-dev @tetherto/qvac-internal-merge
1+
* @tetherto/qvac-internal-merge @tetherto/qvac-internal-mgmt
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Verify Changelog Notes
2+
description: Verify a CHANGELOG contains a non-empty "## [version]" section and extract its body
3+
inputs:
4+
changelog-path:
5+
required: true
6+
description: Path to the CHANGELOG.md file to inspect
7+
version:
8+
required: true
9+
description: Version to look for (x.y.z)
10+
outputs:
11+
release-notes-path:
12+
description: Path to a file containing the extracted release-notes body
13+
value: ${{ steps.extract.outputs.release_notes_path }}
14+
runs:
15+
using: composite
16+
steps:
17+
- id: extract
18+
shell: bash
19+
env:
20+
CHANGELOG_PATH: ${{ inputs.changelog-path }}
21+
VERSION: ${{ inputs.version }}
22+
run: |
23+
set -euo pipefail
24+
notes="${RUNNER_TEMP}/release-notes-v${VERSION}.md"
25+
26+
if [ ! -s "${CHANGELOG_PATH}" ]; then
27+
echo "::error::Missing or empty changelog: ${CHANGELOG_PATH}"
28+
exit 1
29+
fi
30+
31+
start_line=$(awk -v version="${VERSION}" '$0 ~ "^## \\[" version "\\]" { print NR; exit }' "${CHANGELOG_PATH}")
32+
if [ -z "${start_line}" ]; then
33+
echo "::error::No CHANGELOG heading '## [${VERSION}]' in ${CHANGELOG_PATH}"
34+
exit 1
35+
fi
36+
37+
end_line=$(awk -v start="${start_line}" 'NR > start && /^## \[/ { print NR - 1; found=1; exit } END { if (!found) print NR }' "${CHANGELOG_PATH}")
38+
if [ -z "${end_line}" ] || [ "${end_line}" -lt "${start_line}" ]; then
39+
echo "::error::Invalid changelog section bounds for version ${VERSION}"
40+
exit 1
41+
fi
42+
43+
sed -n "$((start_line + 1)),${end_line}p" "${CHANGELOG_PATH}" > "${notes}"
44+
if ! awk 'BEGIN { c=0 } /[^[:space:]]/ { c=1 } END { exit c ? 0 : 1 }' "${notes}"; then
45+
echo "::error::Changelog section for version ${VERSION} is empty"
46+
exit 1
47+
fi
48+
49+
echo "release_notes_path=${notes}" >> "${GITHUB_OUTPUT}"

0 commit comments

Comments
 (0)