|
6 | 6 | BUILTIN_AGENT_EXTENSION_RUNTIME_DEPENDENCY_SEEDS, |
7 | 7 | IM_RUNTIME_DEPENDENCY_SEEDS, |
8 | 8 | MINDOS_WEB_RUNTIME_EXTENSION_SOURCE_ENTRIES, |
9 | | - PI_SCHEDULE_PROMPT_LEGACY_RUNTIME_DEPENDENCY_SEEDS, |
| 9 | + PI_SCHEDULE_PROMPT_STALE_RUNTIME_DEPENDENCIES, |
10 | 10 | copyAppForBundledRuntime, |
11 | 11 | materializeStandaloneAssets, |
12 | 12 | pruneClaudeAgentSdkNativePackages, |
@@ -259,18 +259,39 @@ describe('materializeStandaloneAssets', () => { |
259 | 259 |
|
260 | 260 | it('seeds the current PI coding agent package into runtime bundles', () => { |
261 | 261 | expect(RUNTIME_DEPENDENCY_SEEDS).toContain('@earendil-works/pi-coding-agent'); |
| 262 | + expect(RUNTIME_DEPENDENCY_SEEDS).not.toContain('@mariozechner/pi-coding-agent'); |
262 | 263 | expect(BUILTIN_AGENT_EXTENSION_RUNTIME_DEPENDENCY_SEEDS).not.toContain('@mariozechner/pi-coding-agent'); |
263 | 264 | }); |
264 | 265 |
|
265 | | - it('seeds the legacy PI coding agent package required by pi-schedule-prompt', () => { |
266 | | - expect(PI_SCHEDULE_PROMPT_LEGACY_RUNTIME_DEPENDENCY_SEEDS).toEqual([ |
| 266 | + it('tracks stale pi-schedule-prompt runtime dependencies without seeding them', () => { |
| 267 | + expect(PI_SCHEDULE_PROMPT_STALE_RUNTIME_DEPENDENCIES).toEqual([ |
267 | 268 | '@mariozechner/pi-coding-agent', |
268 | 269 | ]); |
269 | | - expect(RUNTIME_DEPENDENCY_SEEDS).toEqual( |
270 | | - expect.arrayContaining(PI_SCHEDULE_PROMPT_LEGACY_RUNTIME_DEPENDENCY_SEEDS), |
| 270 | + expect(RUNTIME_DEPENDENCY_SEEDS).not.toEqual( |
| 271 | + expect.arrayContaining(PI_SCHEDULE_PROMPT_STALE_RUNTIME_DEPENDENCIES), |
271 | 272 | ); |
272 | 273 | }); |
273 | 274 |
|
| 275 | + it('prunes stale pi-schedule-prompt dependencies from the standalone package metadata', () => { |
| 276 | + const appDir = makeTemp('mindos-app-stale-schedule-prompt-deps-'); |
| 277 | + writeStandaloneApp(appDir); |
| 278 | + |
| 279 | + const schedulePromptPackage = path.join(appDir, '.next', 'standalone', 'node_modules', 'pi-schedule-prompt'); |
| 280 | + mkdirSync(schedulePromptPackage, { recursive: true }); |
| 281 | + writeFileSync(path.join(schedulePromptPackage, 'package.json'), JSON.stringify({ |
| 282 | + name: 'pi-schedule-prompt', |
| 283 | + version: '0.1.2', |
| 284 | + dependencies: { |
| 285 | + '@mariozechner/pi-coding-agent': 'latest', |
| 286 | + }, |
| 287 | + })); |
| 288 | + |
| 289 | + materializeStandaloneAssets(appDir); |
| 290 | + |
| 291 | + const pkg = JSON.parse(readFileSync(path.join(schedulePromptPackage, 'package.json'), 'utf-8')); |
| 292 | + expect(pkg.dependencies).not.toHaveProperty('@mariozechner/pi-coding-agent'); |
| 293 | + }); |
| 294 | + |
274 | 295 | it('materializes MindOS-owned runtime extension sources into standalone bundles', () => { |
275 | 296 | const appDir = makeTemp('mindos-app-runtime-extension-sources-'); |
276 | 297 | writeStandaloneApp(appDir); |
|
0 commit comments