ONE finance:pnl
← Receivers

finance:pnl

finance family

chatmcp

ONE's P&L by month, read through the books fence: cash in from outside customers, seller money shown apart, cost of goods from the provider's own figures, gross margin; Tony's open rulings as named lines that never enter a total. Platform owners only.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
manage_workspace
The class of authority the caller must already hold, decided from the attested context with no round trip.
Authority action
read_revenue
Also gated per node — the caller must be permitted this action over the workspace it names.
Cost
free
What one call costs, so you can budget before acting.
Reversible
yes
The effect can be undone by a later call.
Idempotent
yes
Safe to retry as-is.
Version
1.0.0
Pin this to keep a contract stable; additive bumps never break callers.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/finance:pnl \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "months": 3 }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • months number optional How many calendar months to read, ending with this one (UTC). Default 12, clamped to 1..24; the months array says which were read.

Response

What comes back from the call.

  • ok boolean
  • asOf string When the books were read (ISO)
  • from string
  • to string
  • months any[] One row per month: cashIn, sellerSales, platformFees, costOfGoods, grossMargin. Each is a Figure: value, unit (usd | credits | rows | groups), source, asOf, truncated, status (ok | open | unconfirmed | pending | partial | not_read), and counted:false when it is shown but never added to a total. A value that could not be read is null with status not_read, never 0.
  • totals any cashIn, costOfGoods, grossMargin over the window, as Figures
  • open any Lines that wait on a ruling, counted:false: grant7 (was vespio's $389.10 received?), grantedCredits (owed or a promotion? in credits, never dollars), offGatewayCost (not read)
  • error string unauthenticated | forbidden | no_db

Traffic

Every call to finance:pnl, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names finance:pnl, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 1
  • one.ie/web/src/components/finance/map/stations.ts:240
API route 2
  • one.ie/web/src/lib/finance/sheet.ts:113
  • one.ie/web/src/lib/receiver-index.generated.ts:179
CLI 1
  • packages/cli/src/finance.ts:87
Tests 1
  • packages/sdk/src/surfaces.test.ts:128
→

Answered by

finance:pnl one.ie/web/src/lib/resolvers/finance.ts:32 Dispatched through POST /api/ask/finance:pnl, after the envelope validates the payload.

finance family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "months": {
      "description": "How many calendar months to read, ending with this one (UTC). Default 12, clamped to 1..24; the months array says which were read.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "asOf": {
      "description": "When the books were read (ISO)",
      "type": "string"
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "months": {
      "description": "One row per month: cashIn, sellerSales, platformFees, costOfGoods, grossMargin. Each is a Figure: value, unit (usd | credits | rows | groups), source, asOf, truncated, status (ok | open | unconfirmed | pending | partial | not_read), and counted:false when it is shown but never added to a total. A value that could not be read is null with status not_read, never 0.",
      "type": "array",
      "items": {}
    },
    "totals": {
      "description": "cashIn, costOfGoods, grossMargin over the window, as Figures"
    },
    "open": {
      "description": "Lines that wait on a ruling, counted:false: grant7 (was vespio's $389.10 received?), grantedCredits (owed or a promotion? in credits, never dollars), offGatewayCost (not read)"
    },
    "error": {
      "description": "unauthenticated | forbidden | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}