1DOLLY 72APPLICATION closed-source-agent3REQUIRES HOST runtime@04REQUIRES HOST display@05REQUIRES HOST download@06REQUIRES HOST http@07REQUIRES HOST input@08REQUIRES HOST packages@09REQUIRES HOST snapshot@010REQUIRES HOST threads@011REQUIRES HOST upload@01213# Runs Claude Code, which the launcher downloads from the npm registry into14# the session after the notice: the image holds nothing of it.15FROM /v0.1.2/Dollyfile-system cb003619fa38f3340386739e0df6a500c95f5ff040b1efb6804461adf294b25916INSTALL /v0.1.2/demos/javascript/Dollyfile-javascript fb348fa05cd708e79fe9f6b3f7603b99441fc17fe01de2253505ad9df7c239e317INSTALL /v0.1.2/demos/rust/Dollyfile-ripgrep 350d007ec2460f2ca278b1e587d1aec953c82dd21cd76c26e3fa86dea5db254218REQUIRES TOOL cc19REQUIRES TOOL curl20REQUIRES TOOL cut21REQUIRES TOOL foreground22REQUIRES TOOL gzip23REQUIRES TOOL janis24REQUIRES TOOL rg25REQUIRES TOOL sha256sum26REQUIRES TOOL tar2728# anykey PROMPT discards earlier input, shows PROMPT and prints the one key it29# then reads from the terminal; Ctrl+C is status 130.30FILE /tmp/anykey.c31    #include <string.h>32    #include <termios.h>33    #include <unistd.h>34    int main(int argc, char **argv) {35      struct termios cooked, raw;36      if (argc != 2 || tcgetattr(0, &cooked) != 0) return 2;37      raw = cooked;38      raw.c_lflag &= ~(ICANON | ECHO | ISIG);39      raw.c_cc[VMIN] = 1;40      raw.c_cc[VTIME] = 0;41      if (tcsetattr(0, TCSAFLUSH, &raw) != 0) return 1;42      write(2, argv[1], strlen(argv[1]));43      char key;44      const long count = read(0, &key, 1);45      tcsetattr(0, TCSAFLUSH, &cooked);46      if (count != 1) return 1;47      if (key == 3) return 130;48      return write(1, &key, 1) == 1 ? 0 : 1;49    }50SLOP cc -O1 /tmp/anykey.c -o /usr/bin/anykey51EXPORTS TOOL anykey5253# secretenv NAME PROMPT COMMAND [ARG...] discards earlier input, shows PROMPT,54# reads a line from the terminal without showing it and runs COMMAND with NAME55# set to it, in that environment only; an empty line leaves NAME unset, Ctrl+C56# is status 130.57FILE /tmp/secretenv.c58    #include <spawn.h>59    #include <stdlib.h>60    #include <string.h>61    #include <sys/wait.h>62    #include <termios.h>63    #include <unistd.h>64    extern char **environ;65    int main(int argc, char **argv) {66      struct termios cooked, raw;67      if (argc < 4 || tcgetattr(0, &cooked) != 0) return 2;68      raw = cooked;69      raw.c_lflag &= ~(ICANON | ECHO | ISIG);70      raw.c_cc[VMIN] = 1;71      raw.c_cc[VTIME] = 0;72      if (tcsetattr(0, TCSAFLUSH, &raw) != 0) return 1;73      write(2, argv[2], strlen(argv[2]));74      char secret[512], byte = 0;75      size_t length = 0;76      while (read(0, &byte, 1) == 1 && byte != '\r' && byte != '\n' && byte != 3) {77        if (byte == 127 || byte == '\b') length -= length > 0;78        else if (byte > ' ' && length + 1 < sizeof(secret)) secret[length++] = byte;79      }80      secret[length] = '\0';81      tcsetattr(0, TCSANOW, &cooked);82      write(2, "\n", 1);83      if (byte == 3) return 130;84      if (length > 0 && setenv(argv[1], secret, 1) != 0) return 1;85      pid_t child;86      int status;87      if (posix_spawnp(&child, argv[3], NULL, NULL, argv + 3, environ) != 0) return 127;88      if (waitpid(child, &status, 0) != child) return 1;89      return WIFEXITED(status) ? WEXITSTATUS(status) : 128 + WTERMSIG(status);90    }91SLOP cc -O1 /tmp/secretenv.c -o /usr/bin/secretenv92EXPORTS TOOL secretenv9394FILE /usr/share/doc/closed-source-agent/NOTICE95    THIS IMAGE RUNS CLAUDE CODE96    ---------------------------97    Claude Code is Anthropic's command-line coding agent. It is Anthropic's98    software and not part of Dolly; Dolly is not affiliated with or endorsed by99    Anthropic.100    - Continuing downloads Claude Code 2.1.112 (April 2026, 18.7 MB) from the101      npm registry into this browser session, checks its digest and runs it102      unchanged. This site serves nothing of it. Its use is subject to103      Anthropic's terms: https://code.claude.com/docs/en/legal-and-compliance104    - Its interface works here with your own Anthropic API key, in its minimal105      mode (--bare): no hooks, LSP, plugin sync, attribution, auto-memory,106      background prefetches, keychain reads or CLAUDE.md discovery, and only107      the Read, Edit and Bash tools. The key is asked for once, is not shown108      and is given to Claude Code alone. Usage is billed to you. Requests go109      from this browser to Anthropic; the site serving Dolly does not receive110      them.111    - Signing in with a Claude or Console account does not work in a browser:112      started as published, Claude Code stops at "Unable to connect to113      Anthropic services" before its sign-in screen, and its /login needs a114      local callback server that nothing here can run.115    - Print mode works: export ANTHROPIC_API_KEY=... and then116      closed-source-agent -p 'your request'117    - A saved or exported session contains the downloaded package and what118      Claude Code stored of your sign-in (the last 20 characters of the key).119    - Limits: an old release (the last that is JavaScript), run on Janis120      instead of Node; its Bash tool finds no shell here; a wrong key shows121      the API's error only after about three minutes of its own retries.122123# Shows the notice, downloads Claude Code into the session (once), checks the124# pinned digest of the tarball and runs it unchanged: with the arguments given,125# or without any as the notice's key chose.126FILE /usr/bin/closed-source-agent127    #!/bin/slop128    package=/opt/claude-code/package129    start=130    if test $# -eq 0 || ! test -s $package/cli.js; then131      clear132      cat /usr/share/doc/closed-source-agent/NOTICE133      keys=$'\nEnter (or any other key): download and start with an API key (--bare)\np: start as published        Ctrl+C: leave without downloading\n'134      test $# -eq 0 || keys=$'\nAny key: download and run it with your arguments        Ctrl+C: leave\n'135      start=$(anykey "$keys") || exit $?136    fi137    if ! test -s $package/cli.js; then138      printf '\nDownloading Claude Code 2.1.112 from registry.npmjs.org ...\n'139      curl -fsS https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.112.tgz -o /tmp/claude-code.tgz || exit 1140      if test "$(sha256sum /tmp/claude-code.tgz | cut -d ' ' -f 1)" != 84379969ea53a0e5fd231a8f77debe4c7cb17dd971f4809d10d33f9aeca5de09; then141        printf 'closed-source-agent: the download does not match the pinned SHA-256; nothing was unpacked.\n' >&2142        rm -f /tmp/claude-code.tgz143        exit 1144      fi145      mkdir -p /opt/claude-code && gzip -dc /tmp/claude-code.tgz > /tmp/claude-code.tar && tar -xf /tmp/claude-code.tar -C /opt/claude-code || exit 1146      rm -f /tmp/claude-code.tgz /tmp/claude-code.tar147    fi148    export USE_BUILTIN_RIPGREP=0149    if test $# -gt 0 || test "$start" = p; then150      janis $package/cli.js "$@"151    elif test -n "$ANTHROPIC_API_KEY"; then152      janis $package/cli.js --bare153    else154      secretenv ANTHROPIC_API_KEY $'\nAnthropic API key (not shown; Enter alone starts without one): ' janis $package/cli.js --bare155    fi156EXPORTS TOOL closed-source-agent157158FILE /etc/dolly/init.slop159    cd /workspace160    /bin/foreground -i /usr/bin/closed-source-agent161    printf '\nDolly: image entry exited; entering the recovery Slop shell. closed-source-agent starts it again.\n'162    /bin/foreground -i /bin/slop163164ENTRY /bin/foreground -i /bin/slop /etc/dolly/init.slop165