Selective Aminet package mirroring: single-package fetch, integrity verification, mirror state tracking, bulk download, and sync detection. Use when downloading, verifying, or managing mirrored packages.
Manages selective mirroring of Aminet packages to the local filesystem. Handles single-package fetching with ordered mirror fallback, SHA-256 integrity verification, persistent mirror state tracking with 7-state status enum, concurrent bulk downloads with rate limiting, and sync detection comparing local state against the INDEX.
| Module | Purpose |
|--------|---------|
| src/aminet/package-fetcher.ts | Single-package fetch with ordered mirror fallback and .readme |
| src/aminet/mirror-state.ts | 7-state status enum, atomic persistence, immutable updateEntry |
| src/aminet/integrity.ts | SHA-256 hash and size verification with combined IntegrityResult |
| src/aminet/bulk-downloader.ts | Concurrent downloads with semaphore, rate limiting, resume support |
| src/aminet/sync-detector.ts | Detects INDEX changes against local mirror state via Map lookup |
Fetch a single package:
import { fetchPackage } from './package-fetcher.js';
const result = await fetchPackage({
entry: indexEntry,
mirrors: ['https://aminet.net', 'https://de.aminet.net'],
outputDir: './mirror',
});
// Downloads archive + .readme, preserves directory structure
Verify integrity:
import { verifyIntegrity } from './integrity.js';
const result = await verifyIntegrity(filePath, { expectedSha256: hash, expectedSizeKb: 42 });
// result.valid, result.hashMatch, result.sizeMatch
Bulk download with concurrency:
import { bulkDownload } from './bulk-downloader.js';
await bulkDownload({
entries: selectedPackages,
mirrors,
outputDir: './mirror',
concurrency: 4,
rateLimit: 500, // ms between requests
onProgress: (completed, total) => console.log(`${completed}/${total}`),
});
Detect sync changes:
import { detectChanges } from './sync-detector.js';
const changes = detectChanges(mirrorState, currentIndex);
// changes: { added: [], updated: [], removed: [] }
node:crypto for SHA-256 hashingnode:fs for mirror state persistence and file I/O1.0% budget reflects the 5 modules covering fetch, state, integrity, bulk download, and sync detection. The concurrency control, rate limiting, and atomic state persistence patterns require moderate context for safe operation.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer