fix: pass explicit version to executor to avoid Deno cache issues
The executor was using version: 'latest' which caused Deno to cache old versions of packages. Now we pass the explicit version from the database to ensure the correct version is always loaded. Also fixed sprites-list to recognize 'cold' as a valid sprite status.
This commit is contained in:
parent
2c3cea8730
commit
c1655dd318
6 changed files with 14 additions and 4 deletions
|
|
@ -11,7 +11,7 @@ const SPRITES_API_BASE = 'https://api.sprites.dev/v1';
|
|||
|
||||
export interface Sprite {
|
||||
name: string;
|
||||
status: 'creating' | 'running' | 'stopped' | 'error';
|
||||
status: 'creating' | 'running' | 'stopped' | 'error' | 'cold';
|
||||
createdAt: string;
|
||||
runtime?: string;
|
||||
metadata?: Record<string, unknown>;
|
||||
|
|
@ -95,7 +95,8 @@ export const spritesListTool = tool({
|
|||
const status = sprite.status as string | undefined;
|
||||
|
||||
// Validate status is a known value
|
||||
if (status && !['creating', 'running', 'stopped', 'error'].includes(status)) {
|
||||
// Note: "cold" is returned for sprites that have been idle
|
||||
if (status && !['creating', 'running', 'stopped', 'error', 'cold'].includes(status)) {
|
||||
throw new Error(`Invalid sprite status: ${status}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue