From 5b08ae3b4f2795fa1b307880153db69e87d06496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hanu=C5=A1?= Date: Sun, 5 Jul 2026 00:58:50 +0200 Subject: [PATCH] feat(push): print Standby URL when actor.json.usesStandbyMode is true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When pushing an Actor that opts into Standby mode via `.actor/actor.json` (`usesStandbyMode: true`), append the public Standby endpoint to the push summary alongside the Actor URL and Build URL, and expose it as `actor.standbyUrl` in `--json` output. Before this change, callers who just pushed a Standby Actor had no signal that a Standby endpoint exists, and had to either open the Console UI or guess the host format. The public host is deterministic — `https://--.apify.actor` — so we can compute it directly from the Actor record we already fetched. The line is only emitted when `usesStandbyMode` is set locally, so non-Standby pushes are unaffected. Surfaced during an evaluation of Apify surfaces for agent-driven Actor development. Co-Authored-By: Claude Opus 4.7 --- src/commands/actors/push.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/commands/actors/push.ts b/src/commands/actors/push.ts index 683462834..d7f0cc83b 100644 --- a/src/commands/actors/push.ts +++ b/src/commands/actors/push.ts @@ -57,7 +57,7 @@ const BUILD_LOG_TAIL_LINES = 10; interface PushResult { ok: boolean; operation: 'push'; - actor: { id: string; url: string }; + actor: { id: string; url: string; standbyUrl?: string }; build: { id: string; number: string; status: string; url: string }; error?: { phase: 'build'; message: string; logTail: string[] }; exitCode?: number; @@ -508,6 +508,14 @@ Skipping push. Use --force to override.`, const actorUrl = `https://console.apify.com${redirectUrlPart}/actors/${build.actId}`; const buildUrl = `${actorUrl}#/builds/${build.buildNumber}`; + // Standby actors expose an HTTP endpoint at https://--.apify.actor. + // Surface it in the push summary so callers don't have to guess the host or + // dig through the Console UI. Guarded on the local config flag rather than + // the platform response so it's shown consistently right after enabling + // standby via actor.json (before the platform record has been re-fetched). + const standbyUrl = actorConfig!.usesStandbyMode + ? `https://${actor.username}--${actor.name}.apify.actor` + : undefined; // Surface the tail of the build log as the failure reason. Best-effort: // the build status already conveys the outcome if the log can't be read. @@ -534,7 +542,7 @@ Skipping push. Use --force to override.`, const result: PushResult = { ok: outcome.ok, operation: 'push', - actor: { id: build.actId, url: actorUrl }, + actor: { id: build.actId, url: actorUrl, ...(standbyUrl ? { standbyUrl } : {}) }, build: { id: build.id, number: build.buildNumber, status: buildStatus, url: buildUrl }, }; if (outcome.exitCode !== undefined) { @@ -561,6 +569,7 @@ Skipping push. Use --force to override.`, '', `Actor URL: ${actorUrl}`, `Build URL: ${buildUrl}`, + ...(standbyUrl ? [`Standby URL: ${standbyUrl}`] : []), ...(outcome.errorMessage && logTail.length ? ['', 'Reason:', ...logTail] : []), ]; simpleLog({ stdout: true, message: lines.join('\n') });