Repositories/EigenverftModule/LlamaCppRuntime.json

{
  "$schema": "./eigenverft-module-package-definition-1.3.schema.json",
  "schemaVersion": "1.3",
  "id": "LlamaCppRuntime",
  "display": {
    "default": {
      "name": "llama.cpp",
      "publisher": "ggml-org",
      "corporation": "ggml-org",
      "summary": "Local LLM runtime and CLI tools"
    }
  },
  "dependencies": [
    {
      "repositoryId": "EigenverftModule",
      "definitionId": "VisualCppRedistributable"
    }
  ],
  "artifacts": {
    "targets": [
      {
        "id": "LlamaCppRuntime-win-cpu-x64-stable",
        "releaseTrack": "stable",
        "artifactDistributionVariant": "win-cpu-x64",
        "constraints": {
          "os": [
            "windows"
          ],
          "cpu": [
            "x64"
          ]
        },
        "versionSelection": {
          "strategy": "latestByVersion",
          "allowPrerelease": false
        },
        "fileNameTemplate": "llama-b{version}-bin-win-cpu-x64.zip",
        "acquisitionCandidates": [
          {
            "kind": "packageDepot",
            "searchOrder": 100,
            "verification": {
              "mode": "optional"
            }
          },
          {
            "kind": "download",
            "sourceId": "llamaCppGitHub",
            "searchOrder": 900,
            "verification": {
              "mode": "required"
            }
          }
        ]
      }
    ],
    "releases": [
      {
        "version": "8863",
        "releaseTracks": [
          "stable"
        ],
        "upstreamRelease": {
          "sourceId": "llamaCppGitHub",
          "releaseTag": "b8863"
        },
        "targetArtifacts": {
          "LlamaCppRuntime-win-cpu-x64-stable": {
            "artifactId": "llama-cpp-win-cpu-x64-stable",
            "contentHash": {
              "algorithm": "sha256",
              "value": "5a0c3bbd25c29185116ca24a10e9f124c5e4fc170822be82634bd543d8e91c0e"
            }
          }
        }
      }
    ],
    "sources": {
      "llamaCppGitHub": {
        "kind": "githubRelease",
        "githubOwner": "ggml-org",
        "githubRepository": "llama.cpp"
      }
    }
  },
  "presenceDiscovery": {
    "files": [
      "llama-cli.exe",
      "llama-server.exe",
      "llama-quantize.exe",
      "llama-bench.exe",
      "llama.dll",
      "llama-common.dll",
      "ggml.dll",
      "ggml-base.dll",
      "ggml-cpu-x64.dll",
      "libomp140.x86_64.dll"
    ],
    "directories": [],
    "commands": [
      {
        "name": "llama-cli",
        "relativePath": "llama-cli.exe",
        "requiredForState": true,
        "exposeCommand": true,
        "stateChecks": [
          {
            "arguments": [
              "--version"
            ],
            "outputPattern": "(?im)^version:\\s*(?<value>\\d+)\\b",
            "expectedValue": "{version}"
          }
        ]
      },
      {
        "name": "llama-server",
        "relativePath": "llama-server.exe",
        "requiredForState": false,
        "exposeCommand": true
      },
      {
        "name": "llama-quantize",
        "relativePath": "llama-quantize.exe",
        "requiredForState": false,
        "exposeCommand": true
      },
      {
        "name": "llama-bench",
        "relativePath": "llama-bench.exe",
        "requiredForState": false,
        "exposeCommand": true
      },
      {
        "name": "llama-tokenize",
        "relativePath": "llama-tokenize.exe",
        "requiredForState": false,
        "exposeCommand": true
      }
    ],
    "apps": [],
    "metadataFiles": [],
    "signatures": [],
    "fileDetails": [],
    "registry": []
  },
  "existingInstallDiscovery": {
    "enabled": false,
    "searchLocations": [],
    "installRootRules": []
  },
  "packageOperations": {
    "policy": {
      "ownershipPolicy": {
        "allowAdoptExternal": false,
        "upgradeAdoptedInstall": false,
        "requirePackageOwnership": false
      },
      "compatibility": {
        "checks": [
          {
            "kind": "osVersion",
            "operator": ">=",
            "value": "10.0"
          }
        ]
      }
    },
    "assigned": {
      "install": {
        "kind": "expandArchive",
        "installDirectory": "llama-cpp-runtime/{releaseTrack}/{version}/{artifactDistributionVariant}",
        "expandedRoot": "auto",
        "createDirectories": []
      },
      "readyStateCheck": {
        "use": "presenceDiscovery",
        "expectedVersion": "{version}",
        "require": {
          "files": true,
          "directories": false,
          "commands": true,
          "apps": false,
          "metadataFiles": false,
          "signatures": false,
          "fileDetails": false,
          "registry": false
        }
      },
      "pathRegistration": {
        "mode": "user",
        "source": {
          "kind": "shim",
          "use": "presenceDiscovery.commands"
        }
      },
      "versionUpdatePolicy": {
        "whenAssigned": "trackSelectedVersion",
        "onSameSelectedVersion": "reuseOrRepair",
        "onNewSelectedVersion": "replacePackageOwnedInstall"
      }
    },
    "removed": {
      "policy": {
        "whenNotInInventory": "succeed",
        "allowedInventoryOwnershipKinds": [
          "PackageInstalled"
        ],
        "allowUntrackedExternalRemoval": false,
        "removeDependencies": false
      },
      "operation": {
        "kind": "deleteInstallDirectory",
        "pathSource": "inventory.installDirectory"
      },
      "absenceVerification": {
        "use": "presenceDiscovery",
        "require": {
          "files": true,
          "directories": false,
          "commands": true,
          "apps": false,
          "metadataFiles": false,
          "signatures": false,
          "fileDetails": false,
          "registry": false
        }
      },
      "postRemoveCleanup": {
        "packageInventoryRecord": true,
        "generatedShims": true,
        "pathEntries": true,
        "workDirectories": true
      }
    }
  }
}