Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"clusterdefinition",
"clusterversion",
"fullstackagent",
"homevn",
"kbcli",
"kubeblocks",
"Kubeconfig",
Expand Down
5 changes: 3 additions & 2 deletions lib/k8s/sandbox-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ export class SandboxManager {
},
{
name: 'filebrowser',
image: 'filebrowser/filebrowser:latest',
// docker pull filebrowser/filebrowser:v2-s6
image: 'filebrowser/filebrowser:v2-s6',
command: ['/bin/sh', '-c'],
args: [
`
Expand Down Expand Up @@ -765,7 +766,7 @@ exec filebrowser --database /database/filebrowser.db
},
volumeMounts: [
{
name: 'vn-homevn-agent',
name: 'vn-homevn-fulling',
mountPath: '/srv',
},
{
Expand Down
2 changes: 1 addition & 1 deletion lib/util/filebrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export async function uploadFileToFileBrowser(
.join('/')

// Build TUS endpoint with path
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from override=false to override=true modifies the file upload behavior significantly. This means files with the same name will now be overwritten without warning. Please add a comment explaining why this change was necessary, as it could lead to accidental data loss if users are not aware that uploads will overwrite existing files.

Suggested change
// Build TUS endpoint with path
// Build TUS endpoint with path
// NOTE: Changed from override=false to override=true.
// This means files with the same name will now be overwritten without warning.
// Please ensure users are aware of this behavior, as it could lead to accidental data loss.
// The change was necessary to allow uploads to replace existing files when required.

Copilot uses AI. Check for mistakes.
const tusEndpoint = `${fileBrowserUrl}/api/tus${encodedPath}/${encodedFilename}?override=false`
const tusEndpoint = `${fileBrowserUrl}/api/tus${encodedPath}/${encodedFilename}?override=true`

return new Promise<UploadResult>((resolve, reject) => {
const upload = new tus.Upload(file, {
Expand Down
6 changes: 6 additions & 0 deletions sandbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@
# NOTE: Sensitive variables below are declared as empty strings for documentation.
# Actual values will be securely injected at runtime via Kubernetes Secrets.
# This is safe - no actual secrets are hardcoded in the Dockerfile.
ENV DEBIAN_FRONTEND=noninteractive \

Check warning on line 20 in sandbox/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Runtime Docker Images

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "ANTHROPIC_AUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 20 in sandbox/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Runtime Docker Images

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "DOCKER_HUB_PASSWD") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
NODE_VERSION=22.x \
CLAUDE_CODE_VERSION=latest \
PATH="/root/.local/bin:/home/fulling/.local/bin:$PATH" \
TERM=xterm-256color \
COLORTERM=truecolor \
LANG=en_US.UTF-8 \
LC_ALL=en_US.UTF-8 \
ANTHROPIC_BASE_URL="" \
ANTHROPIC_AUTH_TOKEN="" \
ANTHROPIC_MODEL="" \
Expand All @@ -42,8 +44,10 @@
build-essential \
ca-certificates \
curl \
fonts-noto-cjk \
git \
gnupg \
locales \
lsb-release \
nano \
python3 \
Expand All @@ -53,6 +57,8 @@
unzip \
vim \
wget; \
# Generate locales
locale-gen en_US.UTF-8 zh_CN.UTF-8; \
# Add Node.js 22.x LTS repository
curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION} | bash -; \
# Add PostgreSQL repository (using new gpg keyring method)
Expand Down
33 changes: 32 additions & 1 deletion sandbox/ttyd-auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ echo "✓ Authentication successful"

# Optional: Handle terminal session ID for file upload directory tracking
if [ "$#" -ge 2 ] && [ -n "$2" ]; then
# Validate format: only allow alphanumeric, hyphens, and underscores
if [[ ! "$2" =~ ^[a-zA-Z0-9_-]+$ ]]; then
echo "ERROR: Invalid session ID format"
sleep infinity
fi

TERMINAL_SESSION_ID="$2"
export TERMINAL_SESSION_ID

Expand All @@ -46,5 +52,30 @@ if [ "$#" -ge 2 ] && [ -n "$2" ]; then
echo "✓ Terminal session: ${TERMINAL_SESSION_ID}"
fi

# Print welcome message and instructions
echo ""
echo "👋 Welcome to your FullstackAgent Sandbox!"
echo "========================================"
echo ""
echo "🚀 Getting Started:"
echo " Your Next.js project is ready in this directory."
echo ""
echo "📦 1. Install dependencies:"
echo " pnpm install"
echo ""
echo "▶️ 2. Start the development server:"
echo " pnpm dev"
echo ""
echo "🤖 3. Use AI assistance:"
echo " claude"
echo ""
echo "📎 4. Upload files:"
echo " • Drag and drop files to the terminal"
echo " • Paste images to upload"
echo " • Files will be uploaded to the current directory"
echo ""
echo "Happy coding!"
echo ""

# Start bash shell
exec /bin/bash
exec /bin/bash