Skip to content

Latest commit

 

History

History
111 lines (83 loc) · 4.11 KB

File metadata and controls

111 lines (83 loc) · 4.11 KB

AGENTS.md

This file provides guidance to WARP (warp.dev) when working with code in this repository.

Project Overview

MultiFlexi Probe is a diagnostic tool for testing and validating the MultiFlexi task execution environment. It's a standalone bash script that reports environment variables, file access, and container mount information. The probe was extracted from the main MultiFlexi repository in October 2025 (see MIGRATION.md).

Architecture

Core Components:

Key Behavior:

  • Accepts file path as command-line argument
  • Outputs all environment variables as JSON (to stdout and optionally to $RESULT_FILE)
  • Tests file upload functionality by checking if provided file exists
  • Supports forced exit codes via $FORCE_EXITCODE for error handling testing
  • Displays container mount information from /proc/self/mountinfo

Dependencies:

  • Runtime: bash, jq
  • Debian package pre-dependencies: multiflexi-web, multiflexi-common
  • Installation tool: multiflexi-json2app (requires version 2.2.0+)

Common Commands

Build and Package

make debs                # Build Debian package
make dimage              # Build OCI image (single-arch)
make dimagex             # Build multi-arch OCI image (arm/v7, arm64/v8, amd64)

Validation

make validate            # Validate JSON schema compliance
multiflexi-cli application validate-json --file multiflexi/multiflexi_probe.multiflexi.app.json

Testing

make test                # Run probe locally with /etc/fstab
./multiflexi-probe /path/to/file  # Test with specific file

Installation

make install             # Install to MultiFlexi via multiflexi-json2app

Docker/Podman

docker run vitexsoftware/multiflexi-probe
podman build -f Containerfile . -t docker.io/vitexsoftware/multiflexi-probe

Clean

make clean               # Remove build artifacts

JSON Schema Compliance

Critical: All *.app.json files in the multiflexi/ directory MUST conform to the schema. After editing any JSON file, validate with:

multiflexi-cli application validate-json --file multiflexi/[filename].app.json

The schema is versioned and should match the "multiflexi" field value in the app.json (currently "2.0.0").

Credential Requirements

The probe's app.json declares it requires these credential types (for comprehensive testing):

  • Probe (defined in probe.multiflexi.credential-type.json)
  • mServer
  • SQLServer
  • RaiffeisenBank
  • Office365
  • FioBank
  • AbraFlexi
  • EnvFile
  • VaultWarden
  • Csas

Environment Variables

Key environment variables the probe recognizes:

  • FILE_UPLOAD: Path to test file (default: /etc/fstab)
  • PASSWORD: Example secret field for testing
  • APP_DEBUG: Enable debug output (true/false)
  • RESULT_FILE: Output JSON file path (default: env_report.json)
  • FORCE_EXITCODE: Force specific exit code (integer) - used to test error handling
  • ZABBIX_KEY: Zabbix item key name

Container Image

The OCI image is minimal (debian:stable-slim + bash + jq) and published to docker.io/vitexsoftware/multiflexi-probe. Multi-architecture builds support ARM and AMD64 platforms.

Kubernetes / Helm

The Helm chart in helm/ is for local development. The production chart reference in app.json is: oci://ghcr.io/vitexsoftware/helm-charts/multiflexi-probe

This OCI reference is what gets stored in the MultiFlexi database helmchart column when the app is imported. The Kubernetes executor uses it for helm upgrade --install on first deployment.

Local valuesFiles were removed from app.json as they reference paths only valid during development. Chart defaults apply in production.