Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ on:
push:
branches:
- main
- '0.22'

permissions:
contents: read

# Release and nightly publishing require green CI on the exact main commit, so a
# main push never cancels or replaces another commit's run.
# Release and nightly publishing require green CI on the exact source commit, so a
# push never cancels or replaces another commit's run.
concurrency:
group: >-
ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "agent-device",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"description": "Open source device layer for AI coding agents: a CLI, MCP server, and typed Node.js API to control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud.",
"mcpName": "io.github.callstack/agent-device",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-revyl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-device/revyl",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"type": "module",
"description": "Revyl cloud iOS simulator and Android emulator plugin for agent-device.",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-testmu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-device/testmu",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"type": "module",
"description": "TestMu AI real and virtual mobile device plugin for agent-device.",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-tizen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-device/tizen",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"type": "module",
"description": "Samsung Tizen TV web app plugin for agent-device.",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/provider-webos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-device/webos",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"type": "module",
"description": "LG webOS TV web app plugin for agent-device.",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/proxy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@agent-device/proxy",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"type": "module",
"description": "Transport-neutral authenticating proxy in front of an agent-device daemon.",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"url": "https://github.com/callstack/agent-device",
"source": "github"
},
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"packages": [
{
"registryType": "npm",
"identifier": "agent-device",
"version": "0.21.38-dev",
"version": "0.22.0-dev",
"transport": {
"type": "stdio"
},
Expand Down
34 changes: 34 additions & 0 deletions src/cli/__tests__/update-check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,37 @@ test('a failed check after a channel switch records the new channel and drops th
assert.equal(cache.latestVersion, undefined);
assert.equal(cache.checkedAt, '2026-03-31T10:00:00.000Z');
});

test('a 0.22 nightly follows its own dist-tag and ignores cached main-nightly updates', async () => {
const stateDir = makeTempStateDir();
cleanupPaths.push(stateDir);
const currentVersion = '0.22.0-nightly-0-22.20261113.7';
writeCache(stateDir, { latestVersion: '0.23.0-nightly.20261114.8', distTag: 'nightly' });
assert.equal(
withCapturedStderr(
() => maybeRunUpgradeNotifier({ command: 'devices', currentVersion, stateDir, flags: {} }),
{ interactive: true },
),
'',
);
const fetchMock = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ version: '0.22.0-nightly-0-22.20261114.8' }),
});
vi.stubGlobal('fetch', fetchMock);
await runUpdateCheckWorker({
cachePath: path.join(stateDir, 'update-check.json'),
currentVersion,
});
assert.equal(
fetchMock.mock.calls[0]?.[0],
'https://registry.npmjs.org/agent-device/nightly-0.22',
);
assert.match(
withCapturedStderr(
() => maybeRunUpgradeNotifier({ command: 'devices', currentVersion, stateDir, flags: {} }),
{ interactive: true },
),
/npm install -g agent-device@nightly-0\.22/,
);
});
5 changes: 3 additions & 2 deletions src/cli/update-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@
return cache.distTag ?? 'latest';
}

/** A nightly build follows the `nightly` dist-tag; every other build follows `latest`. */
function distTagFor(version: string): 'latest' | 'nightly' {
/** Each nightly follows its source channel; other builds follow `latest`. */
function distTagFor(version: string): 'latest' | 'nightly' | 'nightly-0.22' {
if (version.includes('-nightly-0-22.')) return 'nightly-0.22';
return version.includes('-nightly.') ? 'nightly' : 'latest';
}

Check warning on line 176 in src/cli/update-check.ts

View check run for this annotation

apex-sentinel-staging / Apex Sentinel

minor: distTagFor routes real 0.22 nightlies to main's `nightly` tag, not `nightly-0.22`

A build from this checkout produces `0.22.0-nightly.<YYYYMMDD>.<run>`, but `distTagFor` returns `nightly` instead of `nightly-0-22` for that version. The pattern `-nightly-0-22.` matched at line 174 is a shape no producer in this checkout emits; `NIGHTLY` and `stampVersion` actively reject it, yet the new test asserts exactly that shape. ### Also raised here Also raised at this location by persona `javascript`: nightly-0.22 routing keys on a version string no producer in this repo emits — A 0.22-branch nightly built by the repo's only version producer would be named `0.22.0-nightly.<YYYYMMDD>.<run>` (scripts/release-version.mjs `nightlyVersion` derives the name from the branch's `0.22.0-dev`), and `distTagFor('0.22.0-nightly.20261114.8')` returns `'nightly'` — so a 0.22 preview install's update notice would tell the user to `npm install -g agent-device@nightly`, i.e. jump to main's nightly. The new branch matches the literal `-nightly-0-22.`, a shape that nothing in this checkout generates and that `stampVersion` actively rejects as `Unsupported version format` (its `NIGHTLY` pattern requires `-nightly.`), so both the code path and the new test's `0.22.0-nightly-0-22.20261113.7` fixture depend on a naming scheme invented here and produced by a separate PR (#​4545). The two halves of the invariant — the version format and the string this function scans for — live in different PRs with no type, pattern or test tying them together.
Comment thread
thymikee marked this conversation as resolved.
Resolved

async function fetchLatestPackageVersion(distTag: string): Promise<string | undefined> {
const response = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}/${distTag}`, {
Expand Down
5 changes: 5 additions & 0 deletions test/ci/release-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ test('the published bytes are built without a restored dependency cache', () =>
);
expect(setup?.with?.['cache-store']).toBe('false');
});

test('both fixed nightly source branches receive push CI', () => {
const ci = parse(fs.readFileSync(path.join(repoRoot, '.github/workflows/ci.yml'), 'utf8'));
expect(ci.on.push.branches).toEqual(['main', '0.22']);
});
6 changes: 5 additions & 1 deletion website/docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ Nightly builds publish `main` after its CI passes, at most once per UTC day:
npm install -g agent-device@nightly
```

A nightly install's update notice recommends a newer nightly when an update check finds one. To
The `0.22` preview channel requires a separate activation and first successful publish. Once
available, install it with `npm install -g agent-device@nightly-0.22`. If npm reports that the tag
is missing, that channel has not published yet; use `@nightly` for `main` or `@latest` for stable.

A nightly install's update notice follows the channel you installed, including `nightly-0.22`. To
return to stable releases, install `agent-device@latest`.

## Without installing
Expand Down
Loading