Skip to content

[WIP] Version 1#44

Draft
jancurn wants to merge 16 commits into
masterfrom
version-1
Draft

[WIP] Version 1#44
jancurn wants to merge 16 commits into
masterfrom
version-1

Conversation

@jancurn
Copy link
Copy Markdown
Member

@jancurn jancurn commented May 27, 2026

No description provided.

jancurn and others added 6 commits May 20, 2026 22:17
…ats (#33)

* feat: accept text format for sandbox nodeDependencies input

Switch nodeDependencies from a JSON object editor to a textarea, matching
the look-and-feel of pythonRequirementsTxt and envVars. Inputs are parsed
as either npm CLI-style lines (one `package@version` per line, scoped
packages and `latest`-default supported) or a JSON object for back-compat.

Adds unit tests for parseNodeDependencies under tests/unit/ and updates
AGENTS.md with guidance for adding future unit tests.

https://claude.ai/code/session_011t31rBsLpeNZBwUUsPtFkV

* chore: add commented example to nodeDependencies prefill

Mirrors the style of initShellScript so the textarea hints at the
expected line format on first open.

https://claude.ai/code/session_011t31rBsLpeNZBwUUsPtFkV

* docs: explain parseJsonObject coercion and graceful failure

https://claude.ai/code/session_011t31rBsLpeNZBwUUsPtFkV

---------

Co-authored-by: Claude <noreply@anthropic.com>
Adds a new `mcpConnections` array input (resourceType: mcpConnector,
wildcard `*` server URL) that lets the user pick any MCP Connector they
have authorized in Settings > API & Integrations. On sandbox start the
Actor writes the chosen Connector IDs to /sandbox/mcp.json in the
standard `mcpServers` shape so tools like `mcpc connect` can pick them
up immediately. Authorization uses a `${APIFY_TOKEN}` placeholder so
the secret never lands on disk.

Co-authored-by: Claude <noreply@anthropic.com>
* Add actor page link to shell welcome banner and fix Venv alignment

Surface the running actor's top-level URL in the shell welcome screen so
users can easily navigate from /shell/ back to the landing page. Also
realign the Venv row so it matches the column used by the other System
Info entries.

* Shrink ASCII banner and add run-details link to welcome screen

Halve the Apify logo (27 → 14 lines, ~50 → 27 chars wide) so the welcome
screen takes up less vertical space when opening the shell. Also add a
Documentation entry pointing at the Apify console run view, derived from
ACTOR_RUN_ID so users can jump to the run details page from inside the
terminal.

---------

Co-authored-by: Claude <noreply@anthropic.com>
* Align /llms.txt and / content

Both endpoints now cover the same sections in the same order:
Quick links, MCP, Code execution, Filesystem, Proxy Mappings,
Response format, Working directories, Configuration.

- llms.txt: add Proxy Mappings section; replace SDK code examples
  with curl commands matching the landing page
- landing page: add collapsible Response format, Working directories,
  and Configuration cards

https://claude.ai/code/session_01Ey8UdUPzR4ZbcLssnoZKis

* Generate llms.txt from the landing page HTML

Replace the standalone llms.md template with HTML-to-Markdown
conversion of the rendered landing page. The landing page is now
the single source of truth for the content of both endpoints.

- Use node-html-markdown + node-html-parser to convert landing HTML to MD
- Custom <pre> translator reads data-lang for fenced code language
- Strip script/style and elements marked data-no-md, plus copy/collapse
  buttons and status badge before conversion
- Hero h1 becomes "Apify AI Sandbox" (the eyebrow + "Landing page" h1 are
  collapsed into a single proper title)
- Quick Links card now contains a visible endpoint list rendered in both
  HTML and MD; action buttons are kept for HTML and marked data-no-md
- Card titles unified at h2 and example labels at h3 (with CSS to keep
  the previous visual sizing) so the heading hierarchy is consistent in MD
- Pre blocks have a data-lang attribute so fences render with proper
  language tags

https://claude.ai/code/session_01Ey8UdUPzR4ZbcLssnoZKis

---------

Co-authored-by: Claude <noreply@anthropic.com>
* Add commented example prefills for setup input fields

Replace the active `apt-get update` line in initShellScript prefills (and
empty pythonRequirementsTxt prefill) with fully commented-out examples so
the defaults have no effect on the run. Users can now uncomment lines or
add their own.

https://claude.ai/code/session_0115MxnEh2NxRT2cfkNjGEfu

* Use stable @apify/mcpc instead of @beta

Named connection support has graduated to the stable release, so the
beta pin is no longer needed.

https://claude.ai/code/session_0115MxnEh2NxRT2cfkNjGEfu

* Add CLAUDE.md with PR description convention

Keep PR descriptions to 2-4 bullets; the diff is the record of what
changed, the description explains intent.

https://claude.ai/code/session_0115MxnEh2NxRT2cfkNjGEfu

---------

Co-authored-by: Claude <noreply@anthropic.com>
The browser terminal (ttyd) only displayed "Press ⏎ to Reconnect" when the
container stopped, leaving users without any explanation. Broadcast a banner
to open terminal sessions (via the PTY slave devices ttyd reads from) before
exiting, covering idle-timeout, migration, and abort. The idle-timeout path
adds a brief flush delay so the banner reaches the browser before the socket
drops.

Co-authored-by: Claude <noreply@anthropic.com>
@jancurn jancurn changed the title Version 1 [WIP] Version 1 May 27, 2026
jancurn and others added 10 commits May 28, 2026 01:35
Apify's run Live View always loads the container root, so serve a full-page
iframe of /shell/ at `/` to surface the terminal directly in the run console.
Move the docs/API landing page to /info and update the in-app links, welcome
script, and output schema accordingly.

https://claude.ai/code/session_01YJZHMbJgwvYNc5WRf8TJ6v

Co-authored-by: Claude <noreply@anthropic.com>
* Make input schema prefills and help texts more concise

Trim the verbose, multi-line prefill templates added in #39 down to a
short hint plus one or two commented examples, and collapse the longer
field descriptions (node/python deps, init script, env vars, idle
timeout, MCP connectors) into single sentences. The sandbox keeps its
distinct env-vars wording since it deletes them after the init script.

https://claude.ai/code/session_01WZCxqZajjnGHGFiqy4xUec

* Bump default idle timeout to 15 minutes

Raise the idleTimeoutSeconds default from 600s (10 min) to 900s (15 min)
for the sandbox, claude-code, and opencode actors, updating the schema
default/prefill, the sandbox code fallback, JSDoc, and READMEs. OpenClaw
stays at 0 (idle shutdown disabled), which already exceeds 15 minutes.

https://claude.ai/code/session_01WZCxqZajjnGHGFiqy4xUec

* Change skills input to textarea (line + JSON-array formats)

Switch the skills input from a stringList to a textarea across all four
actors. A new parseSkills() accepts one skill per line (e.g.
anthropics/skills) with # comments and blank lines ignored, a JSON array,
or a legacy string array (saved stringList task inputs), de-duplicating
the result. Adds unit tests and updates the schemas, types, and docs.

https://claude.ai/code/session_01WZCxqZajjnGHGFiqy4xUec

* Extract shared safeParseJson helper

Pull the try/JSON.parse/log-warning/shape-check scaffolding from
env-vars.ts, node-deps.ts, and skills.ts into safe-json.ts as
safeParseJson + isFlatJsonObject. Each caller now passes a predicate and
field-scoped shape description; behavior is unchanged. Adds 20 unit
tests for the new helper.

https://claude.ai/code/session_01WZCxqZajjnGHGFiqy4xUec

---------

Co-authored-by: Claude <noreply@anthropic.com>
* Use box emoji as favicon

Replace the binary favicon.ico with an inline SVG data URI rendering the
📦 emoji, and drop the now-unused /favicon.ico endpoint.

* Apply PR description convention to externally-opened PRs

Make the convention bind even when a PR is created from the Claude Code
UI, so the description gets trimmed instead of left as the default
Summary / Key Changes / Implementation Details template.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Client-side SPA at /browse and /browse/<path> that fetches the existing
/fs/* JSON endpoints to render directory listings and inline file
previews (text / image, with raw + ZIP download links). Adds a Browse
files quick link to /info.

Co-authored-by: Claude <noreply@anthropic.com>
* Rename inputs and product name, clarify nodeDependencies format

- "Apify AI Sandbox" → "Apify AI Code Sandbox" across UI, READMEs, logs
- Drop the eyebrow + "Landing page" stub; promote the product name to H1
- Input: pythonRequirementsTxt → pythonRequirements
- Input: idleTimeoutSeconds → idleTimeoutSecs (sandbox + sub-actors)
- nodeDependencies description: note we accept the same syntax as `npm install <pkg>`

https://claude.ai/code/session_01Vd2LZY2wcnUKayh5anMsAe

* Add /shell?launch=<cmd>, rename mcpConnectors, polish landing page

- /shell?launch=<cmd> translates to ttyd's arg=-c, arg=source bashrc; <cmd>
  for HTTP + WebSocket; works for arbitrary commands, not just agents
- Sub-actor output URLs now use ?launch=claude / ?launch=opencode /
  ?launch=openclaw%20tui (instead of the long arg= form)
- Quick links: replace the agent buttons with ?launch=, add an "Actor on
  Apify" link to https://apify.com/apify/ai-sandbox
- Input: mcpConnections → mcpConnectors (matches the platform's
  "MCP Connectors" terminology)
- Landing/llms: "Code execution" → "Code execution API",
  "Filesystem endpoints" → "Filesystem API",
  "Proxy Mappings" → "Proxy mappings", "Add Mapping" → "Add mapping"
- Proxy mappings: explain what they're for (in landing copy and the
  actor.json input description)

https://claude.ai/code/session_01Vd2LZY2wcnUKayh5anMsAe

* Install agent CLIs via npm and add Codex

Switch Claude Code and OpenCode from curl install scripts to npm-global,
which gives the same binaries (Claude uses Node as launcher; OpenCode bundles
Bun). Also add @openai/codex — a self-contained Rust binary delivered the
same way. Single install mechanism, version-pinnable, no more curl pipelines.

Welcome banner and the build-time version capture now include Codex; the
landing page Quick links gain a Codex button.

https://claude.ai/code/session_01Vd2LZY2wcnUKayh5anMsAe

* Add codex sub-actor

Mirrors the claude-code / opencode metamorph pattern: a thin wrapper that
metamorphs into the main AI Code Sandbox and lands the user in a terminal
running codex (output URL: /shell?launch=codex). Codex CLI itself is
already installed in the main sandbox image.

https://claude.ai/code/session_01Vd2LZY2wcnUKayh5anMsAe

* Revert sub-actor changes; defer to a follow-up PR

Drops the claude-code/ and opencode/ updates and the new codex/ sub-actor
from this PR so they can be redone as a focused follow-up. The /shell?launch=
plumbing in the main sandbox stays, so the new URLs will Just Work once the
sub-actors are updated separately.

https://claude.ai/code/session_01Vd2LZY2wcnUKayh5anMsAe

* Revert openclaw changes; defer to a follow-up PR

---------

Co-authored-by: Claude <noreply@anthropic.com>
Reverts #43: serve the docs/API landing page at `/` again instead of a
full-page iframe of /shell/. Removes the `/info` route, the `docsUrl`
output property, and the now-unused live-view template, and repoints the
internal links back to `/`.

https://claude.ai/code/session_01Xxnc9G8bTasCXR7HhSVrJG

Co-authored-by: Claude <noreply@anthropic.com>
* Change default terminal username from apify to actor

Update the PS1 prompt in the sandbox shell template so the terminal
shows actor@sandbox instead of apify@sandbox.

* Auto-approve AI agents and fix /shell launch restart loop

- /shell?launch=<cmd> now runs in a persistent interactive shell that
  echoes the command and surfaces a non-zero exit, instead of a bash -c
  that exits and makes ttyd respawn it in a restart loop.
- Claude: wrap the command with --dangerously-skip-permissions (settings
  bypass mode shows a blocking confirmation dialog); pre-accept onboarding.
- Codex: ~/.codex/config.toml with approval_policy=never + danger-full-access.
- OpenCode: permission "allow" so nothing prompts.
- OpenClaw: open both YOLO policy layers (tools.exec + exec-approvals.json).
- Point the wrapper actors' launch URLs at ?launch= so they get the fix.

---------

Co-authored-by: Claude <noreply@anthropic.com>
* feat(landing): redesign landing page, remove Actor on Apify button

Refine to a calmer dark theme with a single accent and unified quick-link buttons, and fix inline code chips that rendered as misaligned full-width blocks.

https://claude.ai/code/session_01JbUM5pBzpZRodXuWN4C7vf

* refactor(landing): extract page styles into landing.css

Move the inline <style> block into a dedicated landing.css and inject it at render time via EJS, keeping the page self-contained (no extra request/route). The build copies *.css to dist/templates alongside the .ejs.

https://claude.ai/code/session_01JbUM5pBzpZRodXuWN4C7vf

---------

Co-authored-by: Claude <noreply@anthropic.com>
* Deliver shutdown banner directly over the terminal WebSocket

The terminal is proxied (browser <-> Actor <-> ttyd), so writing the banner
to the PTY and relaying it back through ttyd lost the race against process
exit on platform-initiated stops (abort, migration, run timeout) — only the
idle path's flush delay reliably worked. Write a ready-made ttyd output frame
straight to the browser socket instead, so the bytes reach the kernel before
the proxy dies; fall back to the PTY devices when no socket is tracked.

https://claude.ai/code/session_01KrCLcsSMPpsyWwuTyCzYv8

* Pin ttyd to 1.7.7

The shutdown banner writes ttyd's own WebSocket output frames directly to the
browser, so an unpinned ttyd could change its wire protocol and silently break
banner rendering. Pin it and document how to re-check on a future bump.

https://claude.ai/code/session_01KrCLcsSMPpsyWwuTyCzYv8

---------

Co-authored-by: Claude <noreply@anthropic.com>
The skills CLI accepts a repo URL as well as the owner/repo shorthand, and
parseSkills already passes both through unchanged. Surface this in the input
description, prefill example, README, and doc comments, and add tests covering
URL pass-through (line + JSON formats).

https://claude.ai/code/session_016XgcmN1VU9uvoaAcD1rdLF

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants