HUB
Sign inSign up

skycoder42/sbx-kit-flutter:latest

Multi-platform
Manifest digest

sha256:4d354c3d2d6ab7109708193ea7d3c4845dffec1a8520e89078dac3c201e47701

Last pushed

about 6 hours by skycoder42

Type

Sandbox Kit

Manifest digest

sha256:4d354c3d2d6ab7109708193ea7d3c4845dffec1a8520e89078dac3c201e47701

yaml
schemaVersion: "3"
displayName: Flutter SDK
author: Skycoder42
description: The Flutter and Dart SDK at /opt/flutter, checked out from the stable release tag and precached for the host, linux and web targets, plus the network access pub needs. Flutter and the related logo are trademarks of Google LLC. This kit is not endorsed by or affiliated with Google LLC.
sourceUrl: https://github.com/Skycoder42/dart_test_tools/tree/main/sbx/flutter
version: 3.50.1
licenses:
    - BSD-3-Clause
    - Apache-2.0
    - CC-BY-4.0
    - LicenseRef-Flutter-Third-Party
kind: mixin
provides:
    - [email protected]
    - [email protected]
capabilities:
    - type: com.docker.sandbox/network-policy@2
      config:
        runtime:
            allow:
                - pub.dev
                - hosts:
                    - storage.googleapis.com
                  methods:
                    - GET
                    - HEAD
                  paths:
                    - /flutter_infra_release/**
                - github.com
                - codeload.github.com
    - type: com.docker.sandbox/lifecycle@1
      config:
        startup:
            - command:
                - /opt/flutter/bin/dart
                - --disable-analytics
              description: Disable Dart analytics
            - command:
                - /opt/flutter/bin/flutter
                - config
                - --no-analytics
                - --no-cli-animations
              description: Disable Flutter analytics
            - command: |
                export PATH="$HOME/.local/bin:$HOME/.claude/local:$PATH"
                if command -v claude > /dev/null 2>&1; then
                  claude mcp remove --scope user dart > /dev/null 2>&1 || true
                  claude mcp add --scope user dart -- /opt/flutter/bin/dart mcp-server \
                    || echo "flutter: could not register the Dart MCP server with claude" >&2
                fi
              description: Register the Dart MCP server with the agent
              user: agent
    - type: com.docker.sandbox/volume@1
      optional: true
      config:
        path: /home/agent/.pub-cache
        size: 4g
      description: Persistent pub cache
    - type: com.docker.sandbox/agent-context@2
      optional: true
      config:
        content: |
            ## Flutter 3.50.1 (Dart 3.14.0)

            `flutter` and `dart` are on PATH, installed at `/opt/flutter`.

            - Use `dart analyze`, `dart format`, `dart test` and `flutter test` to verify
              changes; `dart pub get` / `flutter pub get` to resolve dependencies.
            - The Dart MCP server (`dart mcp-server`) is registered as the `dart` MCP
              server. Prefer its tools (e.g. `analyze_files`, `run_tests`, `pub`,
              `pub_dev_search`, `read_package_uris`) over shelling out where they fit.
            - The official Dart (`dart-*`) and Flutter (`flutter-*`) agent skills are
              installed. Use them for the tasks they describe.
            - Do not run `flutter upgrade`, `flutter channel` or `flutter downgrade`: the SDK
              version is pinned by this sandbox.
            - Network access is limited to pub.dev, GitHub and Flutter's artifact storage.
              If a download fails with a 403, report the blocked host instead of working
              around it.
            - Native builds (`flutter build linux|apk`, `flutter test --platform chrome`)
              need additional tooling that this sandbox may not have. iOS and macOS builds
              are impossible here.
    - type: com.docker.sandbox/agent-context@1
      optional: true
      config:
        content: |
            ## Flutter 3.50.1 (Dart 3.14.0)

            `flutter` and `dart` are on PATH, installed at `/opt/flutter`.

            - Use `dart analyze`, `dart format`, `dart test` and `flutter test` to verify
              changes; `dart pub get` / `flutter pub get` to resolve dependencies.
            - The Dart MCP server (`dart mcp-server`) is registered as the `dart` MCP
              server. Prefer its tools (e.g. `analyze_files`, `run_tests`, `pub`,
              `pub_dev_search`, `read_package_uris`) over shelling out where they fit.
            - The official Dart (`dart-*`) and Flutter (`flutter-*`) agent skills are
              installed. Use them for the tasks they describe.
            - Do not run `flutter upgrade`, `flutter channel` or `flutter downgrade`: the SDK
              version is pinned by this sandbox.
            - Network access is limited to pub.dev, GitHub and Flutter's artifact storage.
              If a download fails with a 403, report the blocked host instead of working
              around it.
            - Native builds (`flutter build linux|apk`, `flutter test --platform chrome`)
              need additional tooling that this sandbox may not have. iOS and macOS builds
              are impossible here.
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-add-unit-test
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-build-cli-app
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-collect-coverage
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-fix-runtime-errors
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-generate-test-mocks
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-migrate-to-checks-package
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-resolve-package-conflicts
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-run-static-analysis
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-setup-ffi-assets
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-use-doc-examples
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-use-ffigen
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-use-path-package
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-use-pattern-matching
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-use-primary-constructors
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/dart-write-documentation
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-add-integration-test
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-add-widget-preview
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-add-widget-test
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-apply-architecture-best-practices
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-build-responsive-layout
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-fix-layout-issues
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-implement-json-serialization
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-setup-declarative-routing
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-setup-localization
    - type: com.docker.sandbox/agent-skill@1
      optional: true
      config:
        path: /opt/flutter-skills/flutter-use-http-package
args:
    dartSkillsRef:
        default: f84b16872b5d186f4e877511b49b93c204a1c4ef
        description: Commit of github.com/dart-lang/skills to bundle the dart-* skills from
        pattern: ^[0-9a-f]{40}$
        buildArg: DART_SKILLS_REF
    dartVersion:
        default: 3.14.0
        description: Dart SDK version bundled with that Flutter release
        pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
        buildArg: DART_VERSION
    flutterSkillsRef:
        default: ff6d472ee66dbed566c4500edee460c94fde0a02
        description: Commit of github.com/flutter/agent-plugins to bundle the flutter-* skills from
        pattern: ^[0-9a-f]{40}$
        buildArg: FLUTTER_SKILLS_REF
    flutterVersion:
        default: 3.50.1
        description: Flutter stable release to install
        pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
        buildArg: FLUTTER_VERSION
    skills:
        default: |-
            dart-add-unit-test
            dart-build-cli-app
            dart-collect-coverage
            dart-fix-runtime-errors
            dart-generate-test-mocks
            dart-migrate-to-checks-package
            dart-resolve-package-conflicts
            dart-run-static-analysis
            dart-setup-ffi-assets
            dart-use-doc-examples
            dart-use-ffigen
            dart-use-path-package
            dart-use-pattern-matching
            dart-use-primary-constructors
            dart-write-documentation
            flutter-add-integration-test
            flutter-add-widget-preview
            flutter-add-widget-test
            flutter-apply-architecture-best-practices
            flutter-build-responsive-layout
            flutter-fix-layout-issues
            flutter-implement-json-serialization
            flutter-setup-declarative-routing
            flutter-setup-localization
            flutter-use-http-package
        description: Newline-separated names of the bundled dart-* and flutter-* skills
        pattern: ^[a-z0-9-]+(\n[a-z0-9-]+)*$
        buildArg: SKILLS