From ebf5c9e0c829c780aac0e103ba911f11f0df0c32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 20:38:03 +0200 Subject: [PATCH 1/2] refactor(test-kit): move the legacy daemon fixture beside its only consumer Pure git mv, named for the one test that uses it; the entry, importer and manifest follow in the next commit. Co-Authored-By: Claude Opus 5.5 --- .../__tests__/daemon-registration-owner.fixtures.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/test-kit/src/legacy-daemon-fixture.ts => src/__tests__/daemon-registration-owner.fixtures.ts (100%) diff --git a/packages/test-kit/src/legacy-daemon-fixture.ts b/src/__tests__/daemon-registration-owner.fixtures.ts similarity index 100% rename from packages/test-kit/src/legacy-daemon-fixture.ts rename to src/__tests__/daemon-registration-owner.fixtures.ts From 25e3183eea72bcb04f4f3a0598d2c5ebdb2f1666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Thu, 15 Oct 2026 20:38:15 +0200 Subject: [PATCH 2/2] refactor(test-kit): drop the daemon-contracts dependency spawnLegacyDaemonFixture was test-kit's only use of daemon-contracts, which now leaves the packages test-kit builds on free to declare test-kit as a devDependency. The fixture's repo-root URLs follow it one directory up. Co-Authored-By: Claude Opus 5.5 --- packages/test-kit/package.json | 1 - packages/test-kit/src/index.ts | 1 - packages/test-kit/tsconfig.json | 1 - pnpm-lock.yaml | 3 --- src/__tests__/daemon-registration-owner.fixtures.ts | 4 ++-- src/__tests__/daemon-registration-owner.test.ts | 3 ++- 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/test-kit/package.json b/packages/test-kit/package.json index fba5bef435..5f7d065876 100644 --- a/packages/test-kit/package.json +++ b/packages/test-kit/package.json @@ -8,7 +8,6 @@ "@agent-device/capture-kit": "workspace:*", "@agent-device/command-registry": "workspace:*", "@agent-device/contracts": "workspace:*", - "@agent-device/daemon-contracts": "workspace:*", "@agent-device/host-kit": "workspace:*", "@agent-device/kernel": "workspace:*" }, diff --git a/packages/test-kit/src/index.ts b/packages/test-kit/src/index.ts index 6075087256..4e18cb8069 100644 --- a/packages/test-kit/src/index.ts +++ b/packages/test-kit/src/index.ts @@ -44,7 +44,6 @@ export { withMockedPlatform, } from './host-execution.ts'; export { pinOwnProcessStartTime } from './host-process-mock.ts'; -export { spawnLegacyDaemonFixture } from './legacy-daemon-fixture.ts'; export { closeLoopbackServer, listenOnLoopback, diff --git a/packages/test-kit/tsconfig.json b/packages/test-kit/tsconfig.json index 5cc3fe88c7..ab0246c7e8 100644 --- a/packages/test-kit/tsconfig.json +++ b/packages/test-kit/tsconfig.json @@ -14,7 +14,6 @@ { "path": "../capture-kit" }, { "path": "../command-registry" }, { "path": "../contracts" }, - { "path": "../daemon-contracts" }, { "path": "../host-kit" }, { "path": "../kernel" } ] diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aadb93b9c0..1963fa7ebe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -736,9 +736,6 @@ importers: '@agent-device/contracts': specifier: workspace:* version: link:../contracts - '@agent-device/daemon-contracts': - specifier: workspace:* - version: link:../daemon-contracts '@agent-device/host-kit': specifier: workspace:* version: link:../host-kit diff --git a/src/__tests__/daemon-registration-owner.fixtures.ts b/src/__tests__/daemon-registration-owner.fixtures.ts index 8e2d526096..4148af46bd 100644 --- a/src/__tests__/daemon-registration-owner.fixtures.ts +++ b/src/__tests__/daemon-registration-owner.fixtures.ts @@ -50,10 +50,10 @@ export function spawnLegacyDaemonFixture(paths: DaemonPaths, acquisitionBarrier? fs.mkdirSync(path.dirname(entry), { recursive: true }); fs.writeFileSync(path.join(codeDir, 'package.json'), '{"type":"module"}'); const processUrl = new URL( - '../../../packages/daemon-contracts/src/daemon-process.ts', + '../../packages/daemon-contracts/src/daemon-process.ts', import.meta.url, ).href; - const hostProcessUrl = new URL('../../../packages/host-kit/src/process.ts', import.meta.url).href; + const hostProcessUrl = new URL('../../packages/host-kit/src/process.ts', import.meta.url).href; fs.writeFileSync( entry, ` diff --git a/src/__tests__/daemon-registration-owner.test.ts b/src/__tests__/daemon-registration-owner.test.ts index 618a1bd8d5..da8e9e7227 100644 --- a/src/__tests__/daemon-registration-owner.test.ts +++ b/src/__tests__/daemon-registration-owner.test.ts @@ -20,7 +20,8 @@ import { } from '@agent-device/daemon-contracts/daemon-resolution'; import { readRegisteredDaemonOwnership } from '@agent-device/daemon-contracts/daemon-registration'; import { readDaemonShutdownReport } from '@agent-device/daemon-contracts/daemon-shutdown-report'; -import { mkdtempForTestSync, spawnLegacyDaemonFixture } from '@agent-device/test-kit'; +import { mkdtempForTestSync } from '@agent-device/test-kit'; +import { spawnLegacyDaemonFixture } from './daemon-registration-owner.fixtures.ts'; import { registeredDaemonFixtureArgs, spawnRegisteredDaemonFixture,