mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-31 10:16:57 +00:00
* feat(web-shell): add native Live Voice * fix(web-shell): address review feedback for Live Voice PR (#7859) - Quote all strings in electron-builder.yml to fix yamllint CI failure - Gate discovery publish on liveVoiceEnabledAtBoot to avoid writing bearer token to disk when Live Voice is disabled (M1) - Add child identity guard to CommandMonitor stdout/stderr handlers to prevent stale helper output from corrupting the new buffer (M4) - Add exponential backoff to sent-completion delivery retry (M3) - Skip broadcastState when setCallState/setTranscript value is unchanged to reduce per-audio-delta overhead (H1) - Document sent-mode completion notification in module docstring (H2) - Remove dead protocol/nonce aliases from readDiscoveryFile - Fix single instance lock fall-through with process.exit(0) * fix(cli): register realtime_voice in docs contract and env guard (#7859) * fix(web-shell): address review feedback for Live Voice PR (#7859) * fix(cli): discard orphaned isolated dir when parent restore fails (#7859) * fix(web-shell): address review feedback for Live Voice PR (#7859) * fix(serve): harden live turn recovery * fix(desktop): restore Live Host native build * fix(live): align native host and session isolation * fix(acp): preserve live worker continuation lineage * fix(live): classify provider close reasons * fix(serve): discard unused recovered conversation dirs * fix(live): isolate authorized realtime responses * fix(live): preserve realtime response authority * feat(web-shell): complete Live Voice onboarding * fix(live): persist realtime-owned dialogue * fix(live): preserve final speech while stopping * Revert "fix(web-shell): address review feedback for Live Voice PR (#7859)" This reverts commit 7110bec6b034c702bca6e28e35b93c7f70e729cd. * Revert "fix(cli): discard orphaned isolated dir when parent restore fails (#7859)" This reverts commit 85165f1b2ddfaa311b8be91acdd76a6f388f6204. * Revert "fix(web-shell): address review feedback for Live Voice PR (#7859)" This reverts commit 9199fa633e102bb8f24e4b216d322be4323eb3fc. * Revert "fix(cli): register realtime_voice in docs contract and env guard (#7859)" This reverts commit 6b6b1718352ef01a98a73976b5c7c4433fd14c35. * Revert "fix(web-shell): address review feedback for Live Voice PR (#7859)" This reverts commit e083779105199d26de3afd8ad00719a08efe3099. * revert(live): remove remaining takeover behavior * revert(live): restore pre-rollback implementation * test(cli): align Live diagnostics env guard * test(release): cover Live Host publication * fix(ci): re-sign Live Host package before verification * fix(serve): scope sent completion notifications to Live * fix(web-shell): preserve live setup errors * fix(live): align realtime backend speech lifecycle * ci(live): publish Live Host independently * test(cli): mock Live speech bridge handler * test(release): align Live Host workflow contract * fix(live): address release and lifecycle review findings * fix(live): release completed call tracking --------- Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com> Co-authored-by: Qwen Code Autofix <qwen-code-autofix@users.noreply.github.com> Co-authored-by: Qwen Code Bot <qwen-code-bot@users.noreply.github.com> Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
144 lines
3.5 KiB
TypeScript
144 lines
3.5 KiB
TypeScript
import { appendFileSync } from 'node:fs';
|
|
|
|
import {
|
|
desktopReleasePackageSources,
|
|
normalizeReleaseVersion,
|
|
readPackageVersion,
|
|
type PackageVersionSource,
|
|
} from './desktop-release-version.ts';
|
|
|
|
interface ParsedArgs {
|
|
githubOutput?: string;
|
|
githubSummary?: string;
|
|
version?: string;
|
|
}
|
|
|
|
function parseArgs(argv: string[]): ParsedArgs {
|
|
const args: ParsedArgs = {
|
|
githubOutput: process.env.GITHUB_OUTPUT || undefined,
|
|
githubSummary: process.env.GITHUB_STEP_SUMMARY || undefined,
|
|
version: process.env.RELEASE_VERSION || undefined,
|
|
};
|
|
|
|
for (let i = 0; i < argv.length; i += 1) {
|
|
const arg = argv[i];
|
|
const next = argv[i + 1];
|
|
|
|
if (arg === '--version' || arg === '-v') {
|
|
if (!next) throw new Error(`${arg} requires a value.`);
|
|
args.version = next;
|
|
i += 1;
|
|
continue;
|
|
}
|
|
|
|
if (arg === '--github-output') {
|
|
if (!next) throw new Error(`${arg} requires a value.`);
|
|
args.githubOutput = next;
|
|
i += 1;
|
|
continue;
|
|
}
|
|
|
|
if (arg === '--github-summary') {
|
|
if (!next) throw new Error(`${arg} requires a value.`);
|
|
args.githubSummary = next;
|
|
i += 1;
|
|
continue;
|
|
}
|
|
|
|
throw new Error(`Unknown argument: ${arg}`);
|
|
}
|
|
|
|
return args;
|
|
}
|
|
|
|
function appendGithubOutput(
|
|
outputPath: string | undefined,
|
|
outputs: Record<string, string>,
|
|
): void {
|
|
if (!outputPath) return;
|
|
|
|
const lines = Object.entries(outputs).map(([key, value]) => `${key}=${value}`);
|
|
appendFileSync(outputPath, `${lines.join('\n')}\n`);
|
|
}
|
|
|
|
function appendGithubSummary(
|
|
summaryPath: string | undefined,
|
|
params: {
|
|
mismatches: { actual: string; source: PackageVersionSource }[];
|
|
packageVersions: { source: PackageVersionSource; version: string }[];
|
|
tag: string;
|
|
version: string;
|
|
},
|
|
): void {
|
|
if (!summaryPath) return;
|
|
|
|
const lines = [
|
|
'## Desktop release version',
|
|
'',
|
|
`Version: ${params.version}`,
|
|
`Release tag: ${params.tag}`,
|
|
'',
|
|
'| Source | Version |',
|
|
'| --- | --- |',
|
|
...params.packageVersions.map(
|
|
({ source, version }) => `| ${source.path} | ${version} |`,
|
|
),
|
|
];
|
|
|
|
if (params.mismatches.length > 0) {
|
|
lines.push('', 'Version mismatch detected. Update source versions first.');
|
|
}
|
|
|
|
appendFileSync(summaryPath, `${lines.join('\n')}\n`);
|
|
}
|
|
|
|
function main(): void {
|
|
const args = parseArgs(process.argv.slice(2));
|
|
if (!args.version) {
|
|
throw new Error(
|
|
'Release version is required. Pass --version or RELEASE_VERSION.',
|
|
);
|
|
}
|
|
|
|
const { tag, version } = normalizeReleaseVersion(args.version);
|
|
const packageVersions = desktopReleasePackageSources.map((source) => ({
|
|
source,
|
|
version: readPackageVersion(source.path),
|
|
}));
|
|
const mismatches = packageVersions
|
|
.filter((entry) => entry.version !== version)
|
|
.map((entry) => ({
|
|
actual: entry.version,
|
|
source: entry.source,
|
|
}));
|
|
|
|
appendGithubSummary(args.githubSummary, {
|
|
mismatches,
|
|
packageVersions,
|
|
tag,
|
|
version,
|
|
});
|
|
|
|
if (mismatches.length > 0) {
|
|
const details = mismatches
|
|
.map(({ actual, source }) => ` - ${source.path}: ${actual}`)
|
|
.join('\n');
|
|
throw new Error(
|
|
[
|
|
`Release version mismatch. Requested ${version}, but source versions differ:`,
|
|
details,
|
|
'Update the desktop release package versions before releasing.',
|
|
].join('\n'),
|
|
);
|
|
}
|
|
|
|
appendGithubOutput(args.githubOutput, { tag, version });
|
|
console.log(`Release version OK: ${version} (${tag})`);
|
|
}
|
|
|
|
try {
|
|
main();
|
|
} catch (error) {
|
|
console.error(error instanceof Error ? error.message : error);
|
|
process.exit(1);
|
|
}
|