{"record":{"id":"75a593b08894ef7b","repo":"stablyai/orca","slug":"artifact-sharing-disabled","errorCode":"artifact_sharing_disabled","errorMessage":"Publishing artifacts is off for this device. Nothing running here — agents or the orca CLI — can mint public artifact links until you allow it.","messagePattern":"Publishing artifacts is off for this device\\. Nothing running here — agents or the orca CLI — can mint public artifact links until you allow it\\.","errorType":"exception","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/handlers/artifacts.ts","lineNumber":101,"sourceCode":"\n/**\n * Publishing is off by default, so denial is the common outcome. A tiny `settings.get` read\n * answers it before we load (or pipe in) up to the full RPC byte budget the host would reject.\n * Only an explicit `false` denies: a host predating the capability omits the field entirely,\n * and an unreachable host stays the publish RPC's problem, not the preflight's.\n */\nasync function preflightPublishCapability(ctx: HandlerContext): Promise<void> {\n  let enabled: unknown\n  try {\n    const response = await ctx.client.call<{\n      settings?: { artifactSharingEnabled?: boolean }\n    }>('settings.get')\n    enabled = response.result?.settings?.artifactSharingEnabled\n  } catch {\n    return\n  }\n  if (enabled === false) {\n    throw new RuntimeClientError(\n      ARTIFACT_SHARING_DISABLED_CODE,\n      ARTIFACT_SHARING_DISABLED_MESSAGE,\n      { nextSteps: [...ARTIFACT_SHARING_DISABLED_NEXT_STEPS] }\n    )\n  }\n}\n\nasync function readArtifactRequest(ctx: HandlerContext): Promise<ArtifactWriteRequest> {\n  const remoteInput = parseRemoteArtifactInput(process.env[REMOTE_ARTIFACT_INPUT_ENV])\n  const sourceKey = remoteInput?.sourceKey ?? resolve(ctx.cwd, requireStringFlag(ctx, 'file'))\n  const contentType = remoteInput?.contentType ?? artifactContentType(sourceKey)\n  if (!contentType) {\n    throw new RuntimeClientError('invalid_argument', 'Artifacts must be HTML or Markdown files.')\n  }\n  await preflightPublishCapability(ctx)\n  const localRead = remoteInput\n    ? null\n    : await readArtifactFileWithinLimit(sourceKey, ARTIFACT_CLI_MAX_RPC_BYTES)","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/handlers/artifacts.ts#L83-L119","documentation":"Thrown by preflightPublishCapability() when settings.get returns artifactSharingEnabled === false. The preflight is deliberately conservative: a thrown settings RPC is swallowed (returns silently), and only an explicit boolean false denies — older hosts that omit the field and unreachable hosts pass through so the publish RPC itself reports those. This is the common outcome because sharing is off by default; the error includes nextSteps guidance.","triggerScenarios":"Running `artifacts share` or `artifacts update` on a device where artifact sharing has been explicitly disabled in settings (artifactSharingEnabled: false). Fires after content-type validation but before the file is read, to avoid loading up to the full RPC budget only to be denied.","commonSituations":"Fresh device/team where an admin locked down sharing; a policy push that flipped the setting to false; local dev where the user toggled it off and forgot; a shared machine where another user disabled it.","solutions":["Enable artifact sharing in Orca settings (set artifactSharingEnabled to true) for this device, then retry.","If an admin controls the setting, request they enable it for your account/device.","Follow the nextSteps attached to the error (ARTIFACT_SHARING_DISABLED_NEXT_STEPS) for the exact UI path.","If the setting is correct but the error persists, confirm the desktop client is running the current version (older hosts omit the field and should NOT trigger this — investigate the settings.get response)."],"exampleFix":"// before: settings.artifactSharingEnabled === false\norca artifacts share --file r.html   // ERROR artifact_sharing_disabled\n\n// after: enable in Orca settings, then\norca artifacts share --file r.html","handlingStrategy":"try-catch","validationCode":"async function canShareArtifacts(client: HandlerContext['client']): Promise<boolean> {\n  try {\n    const r = await client.call<{settings?:{artifactSharingEnabled?:boolean}}>('settings.get')\n    return r.result?.settings?.artifactSharingEnabled !== false\n  } catch {\n    return true // unreachable/older host: let the publish RPC decide\n  }\n}","typeGuard":"const sharingExplicitlyDisabled = (resp: unknown): boolean =>\n  typeof resp === 'object' && resp !== null &&\n  (resp as any).result?.settings?.artifactSharingEnabled === false","tryCatchPattern":"try {\n  await dispatch('artifacts share', ctx)\n} catch (e) {\n  if (e instanceof RuntimeClientError && e.code === 'artifact_sharing_disabled') {\n    // prompt user to enable artifactSharingEnabled, follow e.nextSteps, then retry\n  }\n  throw e\n}","preventionTips":["Cache the settings.get result per session to avoid repeated preflight round-trips.","Remember only explicit false denies; missing field means allowed (older host).","Surface nextSteps from the error to the user verbatim."],"tags":["artifacts","sharing","settings","feature-gate","permission"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}