nexu-io/open-design · error
refresh source ${source.type} is not supported yet
Error message
refresh source ${source.type} is not supported yet What it means
executeRefreshSource (refresh-service.ts:102-103) first handles type 'connector_tool', then accepts only 'daemon_tool' and 'local_file'. Any other source.type falls through to this guard. It is a defensive check for refresh source types that have no execution implementation yet.
Source
Thrown at apps/daemon/src/live-artifacts/refresh-service.ts:103
if (source.type === 'connector_tool') {
const connector = source.connector;
if (connector === undefined) throw new Error('connector refresh source requires connector metadata');
const result = await connectorService.execute(
{
connectorId: connector.connectorId,
toolName: connector.toolName,
input: source.input,
...(connector.accountLabel === undefined ? {} : { expectedAccountLabel: connector.accountLabel }),
},
{ projectsRoot, projectId, purpose: 'artifact_refresh', signal },
);
if (result.output === null || typeof result.output !== 'object' || Array.isArray(result.output)) {
throw new Error('connector refresh output must be a JSON object');
}
return result.output;
}
if (source.type !== 'daemon_tool' && source.type !== 'local_file') {
throw new Error(`refresh source ${source.type} is not supported yet`);
}
return executeLocalDaemonRefreshSource({ projectsRoot, projectId, source, signal });
}
export async function refreshLiveArtifact(options: RefreshLiveArtifactOptions): Promise<RefreshLiveArtifactResult> {
return withLiveArtifactRefreshLock(options, async (lock) => {
const refreshId = lock.metadata.refreshId;
let sequence = 0;
const appendLog = async (entry: {
step: string;
status: 'running' | 'succeeded' | 'failed' | 'cancelled' | 'skipped';
startedAt: Date;
finishedAt?: Date;
source?: LiveArtifactRefreshSourceMetadata;
error?: unknown;
metadata?: BoundedJsonObject;
}): Promise<void> => {View on GitHub (pinned to 5be4028344)
Solutions
- Use one of the supported source types: 'local_file', 'daemon_tool', or 'connector_tool'.
- If introducing a new source type, implement its execution branch in executeRefreshSource in the same change that you add it to isSupportedSource.
Example fix
// before
const source = { type: 'http_endpoint', input: { url: '...' } };
await executeRefreshSource({ ..., source, signal });
// throws `refresh source http_endpoint is not supported yet`
// after: use a supported type
const source = { type: 'daemon_tool', toolName: 'project_files.read_json', input: { path: 'data.json' } }; Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED_REFRESH_TYPES = new Set(['local_file', 'daemon_tool', 'connector_tool']);
function isRefreshableSourceType(source: { type: string }): boolean {
return SUPPORTED_REFRESH_TYPES.has(source.type);
}
if (!isRefreshableSourceType(source)) {
throw new Error(`Unsupported refresh source type: ${source.type}`);
} Type guard
function isSupportedRefreshSource(source: unknown): source is { type: 'local_file' | 'daemon_tool' | 'connector_tool' } {
return typeof source === 'object' && source !== null
&& ['local_file', 'daemon_tool', 'connector_tool'].includes((source as { type: string }).type);
} Prevention
- When adding a new LiveArtifactSource type, implement its execution branch in executeRefreshSource in the same PR you enable it in isSupportedSource.
- Gate any direct call to executeRefreshSource behind a supported-type check.
- Unit-test executeRefreshSource against each supported type plus one unsupported type.
When it happens
Trigger: executeRefreshSource is invoked with a LiveArtifactSource whose .type is neither 'connector_tool', 'daemon_tool', nor 'local_file' (e.g. a newly introduced type like 'http_endpoint' before its execution branch exists, or a corrupted/malformed source.type value).
Common situations: A new source type was added to isSupportedSource without adding its execution branch; a test or external caller constructs a source with an arbitrary type string; persisted artifact data has a source.type from a newer/older schema version.
Related errors
- No refresh source is available yet.
- connector refresh output must be a JSON object
- Refresh is disabled for this artifact source.
- ${firstIssue.path}: ${firstIssue.message}
- ${field} must be a string
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/570b7cc53f2105c5.
Report an issue: GitHub.