Developer Beta

Connect your AI tool to PonoLens.

Use a local HTTP/JSON protocol to report prompts and agent actions. Connect directly or use an optional JavaScript, TypeScript, or Python SDK.

Available in the PonoLens desktop beta. Generate a credential in Settings → Developer integrations. The API is local, Report Only, and records only what your integration sends.

Two ways to connect

One local contract. No required dependency.

1

Use HTTP and JSON

Send a versioned event to the PonoLens collector on the same Mac. Any language that can make an HTTP request can integrate.

See the curl example →
2

Use an optional SDK

The beta JavaScript/TypeScript and Python packages validate and submit the same JSON while keeping direct HTTP support available.

See the SDKs →

Protocol v1 beta

Local reporting protocol

The endpoint is POST /api/developer/v1/events on the loopback-only PonoLens collector. The desktop app issues a separate revocable credential to each integration and stores only its hash. No PonoLens cloud service receives these events.

Host127.0.0.1 only
Formatapplication/json
ModeReport Only
Schemaponolens.event.v1

Request

Every event identifies its schema, integration, event type, session, and time. Content belongs in a type-specific data object. Unknown top-level fields are rejected so integrations do not accidentally send extra information.

{
  "schema": "ponolens.event.v1",
  "integration": "example-agent",
  "event": "prompt.submitted",
  "sessionId": "session-123",
  "occurredAt": "2026-09-21T20:00:00.000Z",
  "data": {
    "content": "Summarize this change",
    "destination": "Example AI Provider",
    "cwd": "/Users/example/project"
  }
}

Download the JSON Schema ↓

Initial event types

EventWhat it reportsTiming
prompt.submittedA prompt the harness says was sentAfter submission
tool.before_useTool name and input exposed by the harnessBefore action
command.before_runA command exposed by the harnessBefore action
file.changedA file location and change type reported by the harnessAfter report
session.startedA new local agent sessionAt session start
session.endedThe end of a known session, without model outputAt session end

The beta contract does not accept command output, model responses, screenshots, raw environment variables, credentials, or token maps.

Response

Version 1 is Report Only. A successful response confirms whether PonoLens retained a redacted receipt. It never claims that an action was blocked.

{
  "accepted": true,
  "recorded": true,
  "reportOnly": true,
  "receiptId": "local-receipt-id"
}

HTTP 202 means the event was accepted. Validation, authentication, and size failures return a non-success status without echoing sensitive values.

Privacy and security rules

  • Requests stay on loopback and use one revocable credential per integration.
  • PonoLens redacts the complete event before writing it to SQLite.
  • Saved prompt text follows the user's existing prompt-storage preference.
  • Commands, paths, tool inputs, and auxiliary strings are always redacted before storage.
  • Command output and model output are not accepted.
  • Report Only failures do not stop the developer's AI tool.
  • An event is never labeled blocked unless a future supported synchronous adapter proves the action was stopped.

Examples

Send the same event from any language

Open the desktop app and choose Settings → Developer integrations → Generate token. Copy the token when it appears—it is shown once—then expose it to your local development process:

export PONOLENS_INTEGRATION_TOKEN='plint_…'

The event's integration value must exactly match the name used when generating the token.

curl

curl -X POST http://127.0.0.1:4317/api/developer/v1/events \
  -H "Authorization: Bearer $PONOLENS_INTEGRATION_TOKEN" \
  -H "Content-Type: application/json" \
  --data @event.json

JavaScript without an SDK

const response = await fetch(
  "http://127.0.0.1:4317/api/developer/v1/events",
  {
    method: "POST",
    headers: {
      authorization: `Bearer ${process.env.PONOLENS_INTEGRATION_TOKEN}`,
      "content-type": "application/json"
    },
    body: JSON.stringify(event)
  }
);

if (!response.ok) throw new Error(`PonoLens returned ${response.status}`);

Download the JavaScript example ↓

Optional packages

Beta SDKs

JavaScript / TypeScript@ponolens/sdkBeta download

Typed event helpers, loopback enforcement, timeouts, and bounded retries.

Download JavaScript SDK ↓
Pythonponolens-sdkBeta download

A dependency-free client with the same event contract, loopback enforcement, and bounded retries.

Download Python SDK ↓

The SDK packages are available here for beta testing and are not yet listed in the npm or PyPI public registries. They remain optional: direct HTTP/JSON integrations use the same versioned contract.

JavaScript / TypeScript

npm install https://ponolens.com/developers/downloads/ponolens-sdk-0.1.0-beta.1.tgz
import { PonoLens } from "@ponolens/sdk";

const client = new PonoLens({
  token: process.env.PONOLENS_INTEGRATION_TOKEN,
  integration: "example-agent"
});

await client.promptSubmitted({
  sessionId: "session-123",
  occurredAt: new Date().toISOString(),
  data: { content: "Summarize this change", destination: "Example Provider" }
});

Python

python -m pip install https://ponolens.com/developers/downloads/ponolens-sdk-0.1.0b1.tar.gz
from ponolens_sdk import PonoLens

client = PonoLens(token=token, integration="example-agent")
client.prompt_submitted(
    session_id="session-123",
    occurred_at=datetime.now(timezone.utc).isoformat(),
    data={"content": "Summarize this change"},
)