nexu-io/open-design · warning · LiveArtifactRefreshUnavailableError

No refresh source is available yet.

Error message

No refresh source is available yet.

What it means

refreshLiveArtifact (refresh-service.ts:154-158) throws LiveArtifactRefreshUnavailableError (default message) when the artifact's document has no sourceJson or its source.type is not one of the supported refresh types (checked via isSupportedSource). This signals that refresh is not possible for this artifact, as opposed to a refresh that ran and failed.

Source

Thrown at apps/daemon/src/live-artifacts/refresh-service.ts:158

    const running = await markLiveArtifactRefreshRunning({
      projectsRoot: options.projectsRoot,
      projectId: options.projectId,
      artifactId: options.artifactId,
      refreshId,
      now: refreshStartedAt,
    });
    await options.onStarted?.({ refreshId, artifact: running.artifact });

    try {
      const record = await getLiveArtifact(options);
      const artifact = record.artifact;
      const currentDataJson = artifact.document?.dataJson ?? {};
      const documentSource = artifact.document?.sourceJson;
      const hasDocumentSource = isSupportedSource(documentSource);
      const timeouts = normalizeLiveArtifactRefreshTimeouts();

      if (!hasDocumentSource) {
        throw new LiveArtifactRefreshUnavailableError();
      }

      if (!hasRefreshPermission(documentSource)) {
        throw new LiveArtifactRefreshUnavailableError('Refresh is disabled for this artifact source.');
      }

      const candidate = await withLiveArtifactRefreshRun(
        liveArtifactRefreshRunRegistry,
        {
          projectId: options.projectId,
          artifactId: options.artifactId,
          refreshId,
          totalTimeoutMs: timeouts.totalTimeoutMs,
          now: refreshStartedAt,
        },
        async (run) => {
          let documentOutput: { output: BoundedJsonObject } | undefined;
          if (hasDocumentSource) {

View on GitHub (pinned to 5be4028344)

Solutions

  1. Ensure the artifact's document.sourceJson is present and uses a supported type before triggering refresh.
  2. Recreate or re-import the artifact through a flow that attaches a refresh-capable source.
  3. Treat LiveArtifactRefreshUnavailableError in the UI/CLI as a soft state ('refresh unavailable') rather than an error toast.
Defensive patterns

Strategy: type-guard

Validate before calling

import { isSupportedSource } from './refresh-service.js'; // conceptually
function canRefresh(artifact: { document?: { sourceJson?: unknown } }): boolean {
  return isSupportedSource(artifact.document?.sourceJson as never);
}
if (!canRefresh(artifact)) {
  // show 'refresh unavailable' state instead of triggering a refresh
}

Type guard

function hasRefreshableDocumentSource(source: unknown): source is { type: string; refreshPermission?: string } {
  if (typeof source !== 'object' || source === null) return false;
  const t = (source as { type?: string }).type;
  return t === 'local_file' || t === 'daemon_tool' || t === 'connector_tool';
}

Try / catch

try {
  await refreshLiveArtifact(opts);
} catch (err) {
  if (err instanceof LiveArtifactRefreshUnavailableError) {
    // render as a soft 'no refresh source' state, not a hard error
    return;
  }
  throw err;
}

Prevention

When it happens

Trigger: Calling refreshLiveArtifact on an artifact where artifact.document.sourceJson is undefined, or where sourceJson.type is not 'local_file', 'daemon_tool', or 'connector_tool'.

Common situations: The artifact was created without a refresh source (e.g. a static document); the sourceJson was stripped or never persisted; a legacy artifact predates the live-artifact refresh feature; the document was authored by hand/imported without source metadata.

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/2736a98fb2cab1a1. Report an issue: GitHub.