conformance

NANOMIND_COMPATIBLE

Requirements for declaring a tool as NanoMind-compatible. Tools that pass all applicable checks may display the NANOMIND_COMPATIBLE badge.

NANOMIND_COMPATIBLE

Displayed by tools that implement the full adapter contract and pass the conformance test suite.

Conformance Requirements

1. Implement CLIAdapter or RuntimeAdapter

CLI and Runtime

The tool must implement at least one of the two adapter interfaces. Both are acceptable. Optional methods (getCheckRegistry, getATCData) are not required for conformance.

2. Pass the conformance test suite

CLI and Runtime

Run @nanomind/conform against the adapter implementation. All mandatory checks must pass. The test suite validates interface completeness, error handling, and protocol invariants.

3. Guard active on all non-direct input

CLI only

In CLI mode, all piped input, file contents, and agent output must be screened by the guard before routing. Guard cannot be disabled via configuration. The --no-guard flag is permitted but must display a visible warning.

4. Differential privacy on gradient submissions

Runtime only

In Runtime mode, all gradient submissions must apply differential privacy with L2 norm clipping and Gaussian noise. The privacy epsilon must not exceed 2.0. Server-side validation rejects non-compliant submissions.

5. Raw behavioral data never leaves the endpoint

Runtime only

In Runtime mode, raw behavioral events are processed locally. Only differentially-private gradient updates are transmitted to the federated learning server. This is a protocol invariant, not configurable.

CLI Adapter Contract

Implement this interface to enable natural language intent routing for your CLI tool. Required methods: getCommandManifest, executeCommand, getScanHistory.

NanoMindCLIAdapter
interface NanoMindCLIAdapter {
  cliName: string;
  cliVersion: string;
  getCommandManifest(): CommandManifest;
  executeCommand(cmd: string): Promise<ExecutionResult>;
  getScanHistory(): ScanHistoryEntry[];
  getCheckRegistry?(): CheckEntry[];
  getATCData?(): ATCData;
}

Runtime Adapter Contract

Implement this interface to enable behavioral anomaly detection for your agent runtime. All methods are required.

NanoMindRuntimeAdapter
interface NanoMindRuntimeAdapter {
  agentId: string;
  agentCategory: string;
  subscribeToBehavioralEvents(
    handler: (event: BehavioralEvent) => void
  ): Unsubscribe;
  getATCContentHash(): string;
  onAnomalyDetected(
    handler: (score: number, action: ARPAction) => void
  ): Unsubscribe;
  isOfflineMode(): boolean;
}

Running the Test Suite

Use @nanomind/conform to validate your adapter implementation against the spec:

terminal
npx @nanomind/conform --adapter ./my-cli-adapter.ts

# Output:
# NANOMIND Conformance Test Suite v2.0
# =====================================
# [PASS] CLIAdapter.cliName is non-empty string
# [PASS] CLIAdapter.getCommandManifest() returns valid manifest
# [PASS] CLIAdapter.executeCommand() handles unknown commands
# [PASS] Guard active on piped input
# [PASS] Guard active on file input
# [PASS] Guard blocks instruction override patterns
# =====================================
# Result: NANOMIND_COMPATIBLE (6/6 passed)