ONE finance:health
← Receivers

finance:health

finance family

chatmcp

ONE's health line, eight numbers read now: cash in, cost of goods, gross margin, unbilled model cost (over the window), cash on hand, credits owed, drift rows, paying customers (now). Each with its source, asOf and truncated; a number not read says why; a number past its line says the line in words. 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:health \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {}}'

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.

  • days number optional The window for the windowed numbers: 7, 30 or 90 days ending now. Absent (or any other value) = this calendar month (UTC), and unbilled cost then reads since linking began. The answer's window says which was read.

Response

What comes back from the call.

  • ok boolean
  • asOf string
  • window object
  • sentence string The health line in one sentence, built from the numbers (the Finance tab header, `oneie finance`, the chat): '$1.00 in from customers this month, $15.14 out to model providers, 2 drift rows.'
  • numbers object[]
  • error string unauthenticated | forbidden | no_db

Traffic

Every call to finance:health, 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:health, 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 2
  • one.ie/web/src/components/finance/books/HealthNumbers.tsx:112
  • one.ie/web/src/components/finance/map/stations.ts:240
API route 2
  • one.ie/web/src/lib/finance/sheet.ts:106
  • one.ie/web/src/lib/receiver-index.generated.ts:178
CLI 1
  • packages/cli/src/finance.ts:87
Tests 1
  • packages/sdk/src/surfaces.test.ts:127
→

Answered by

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

finance family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "days": {
      "description": "The window for the windowed numbers: 7, 30 or 90 days ending now. Absent (or any other value) = this calendar month (UTC), and unbilled cost then reads since linking began. The answer's window says which was read.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "asOf": {
      "type": "string"
    },
    "window": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "days": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ]
        },
        "label": {
          "type": "string",
          "description": "'this month' or 'in the last N days', for a sentence"
        }
      },
      "required": [
        "from",
        "to",
        "days",
        "label"
      ]
    },
    "sentence": {
      "description": "The health line in one sentence, built from the numbers (the Finance tab header, `oneie finance`, the chat): '$1.00 in from customers this month, $15.14 out to model providers, 2 drift rows.'",
      "type": "string"
    },
    "numbers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "cash_in | cost_of_goods | gross_margin | unbilled_cost | cash_on_hand | credits_owed | drift_rows | paying_customers"
          },
          "label": {
            "type": "string"
          },
          "short": {
            "description": "The card label on the Finance tab",
            "type": "string"
          },
          "windowed": {
            "description": "true = read over the window; false = read now",
            "type": "boolean"
          },
          "figure": {
            "description": "A Figure: value, unit, source, asOf, truncated, status, note"
          },
          "line": {
            "description": "Set when the number crossed its line, in words: 'margin below zero', 'drift above zero', 'unbilled cost above 5%'",
            "type": "string"
          }
        },
        "required": [
          "key",
          "label",
          "figure"
        ]
      }
    },
    "error": {
      "description": "unauthenticated | forbidden | no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}