Skip to content

OpenSIN-AI/A2A-SIN-Box-Storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A2A-SIN-Box-Storage

Autonomous storage agent for Box.com integration within OpenSIN-AI ecosystem.

Purpose

Provides a RESTful upload API for all OpenSIN agents and services. Replaces GitLab storage with Box.com public folders (10GB free tier). Handles file validation, metadata sanitization, CDN URL generation, and cache management.

Agent Configuration

Property Value
Team Team Infrastructure
Manager A2A-SIN-Infrastructure
Type Infra Agent
Primary Model gpt-5.4

Capabilities

  • storage_upload — Upload files to Box.com public folder
  • storage_public_url — Return shareable CDN URLs
  • file_validation — Enforce size, type, extension whitelist
  • cdn_distribution — Box edge cache integration
  • cache_management — ETag, cache-control headers

Subagenten-Modelle (oh-my-openagent.json)

Subagent Modell
explore nvidia-nim/stepfun-ai/step-3.5-flash
librarian nvidia-nim/stepfun-ai/step-3.5-flash

Agent Config System v5

This agent is registered in the central team system:

  • Team Register: oh-my-sin.jsonteam-infrastructure
  • Team Config: my-sin-team-infrastructure.json

PARALLEL-EXPLORATION MANDATE

Bei grossen Codebases (100k+ Zeilen) MUSS der Agent 5-10 parallele explore + 5-10 librarian-Agenten starten.

Full Documentation

Quick Start

# Clone and install
git clone git@github.com:OpenSIN-AI/A2A-SIN-Box-Storage.git
cd A2A-SIN-Box-Storage
bun install

# Environment setup
cp .env.example .env
# Edit .env: add BOX_DEVELOPER_TOKEN, BOX_PUBLIC_FOLDER_ID, API_KEY

# Start server
bun run dev   # or: bun start

# Health check
curl http://localhost:3000/health

API Reference

Upload File

POST /api/v1/upload
Content-Type: multipart/form-data
X-Box-Storage-Key: <API_KEY>

Response:
{
  "success": true,
  "file": {
    "id": "123456",
    "name": "image.png",
    "size": 102400,
    "type": "image/png",
    "url": "https://public.box.com/...",
    "cdnUrl": "https://cdn.box.com/..."
  }
}

Validate File (without upload)

POST /api/v1/validate
Content-Type: application/json

{
  "filename": "test.pdf",
  "size": 5242880
}

Response:
{
  "valid": true,
  "errors": []
}

Environment Variables

Variable Required Description
BOX_DEVELOPER_TOKEN Box.com API token with files.content.write scope
BOX_PUBLIC_FOLDER_ID Destination folder ID for public uploads (must be "Anyone with link" enabled)
BOX_CACHE_FOLDER_ID Folder ID for log/cache storage
PORT Server port (default: 3000)
MAX_FILE_SIZE Maximum upload size in bytes (default: 2GB)
ALLOWED_EXTENSIONS Comma-separated whitelist (default: .png,.jpg,.jpeg,.gif,.pdf,.doc,.docx,.txt,.zip)
API_KEY Shared secret for agent authentication
LOG_LEVEL Logging verbosity (default: info)

Box.com Setup

  1. Create Box Developer Token at https://account.box.com/developers/console
  2. Create folder "OpenSIN Public" → Get folder ID from URL
  3. Set folder permissions: "Anyone with the link can view"
  4. Create folder "OpenSIN Cache" (for logs) → Get folder ID
  5. Add both folder IDs to .env

Scopes Required

  • files.content.read
  • files.content.write
  • folders.read

Deployment

Docker

docker build -t a2a-sin-box-storage .
docker run -d \
  --name sin-box-storage \
  -p 3000:3000 \
  -e BOX_DEVELOPER_TOKEN=xxx \
  -e BOX_PUBLIC_FOLDER_ID=xxx \
  -e API_KEY=xxx \
  a2a-sin-box-storage

Docker Compose (Infra-SIN-Docker-Empire)

room-09-box-storage:
  build:
    context: ./services/box-storage
    dockerfile: Dockerfile
  container_name: room-09-box-storage
  restart: unless-stopped
  environment:
    - BOX_DEVELOPER_TOKEN=${BOX_DEVELOPER_TOKEN:?ERROR: must be set in .env file}
    - BOX_PUBLIC_FOLDER_ID=${BOX_PUBLIC_FOLDER_ID:?ERROR: must be set in .env file}
    - BOX_CACHE_FOLDER_ID=${BOX_CACHE_FOLDER_ID:?ERROR: must be set in .env file}
    - API_KEY=${BOX_STORAGE_API_KEY:?ERROR: must be set in .env file}
    - PORT=3000
  volumes:
    - box_storage_logs:/app/logs
  networks:
    haus-netzwerk:
      ipv4_address: 172.20.0.109
  ports:
    - "3000:3000"
  healthcheck:
    test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:3000/health"]
    interval: 30s
    timeout: 10s
    retries: 3
    start_period: 30s

volumes:
  box_storage_logs:

License

Apache-2.0

About

No description or website provided.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors