Files

96 lines
2.6 KiB
JSON

{
"schema": 1,
"id": "plan-usage",
"name": "Plan usage",
"version": "1.2.0",
"description": "How much of each plan's usage limits the work takes — the 5-hour and weekly windows now, how they filled, whether the archive explains the meter, the plan history and the exchange rate (list $ per 1%)",
"category": "data",
"languages": ["en", "fr"],
"icon": "icon.svg",
"color": "#3e6481",
"author": "gabrielvidal",
"settings": {
"subtitle": "Each plan's usage limits",
"instructions": "Costs are stored in US dollars; pick euros to show them converted at your rate.",
"fields": [
{
"key": "currency",
"label": "Currency",
"type": "select",
"default": "USD",
"options": [
{
"value": "USD",
"label": "US dollar ($)"
},
{
"value": "EUR",
"label": "Euro (€)"
}
]
},
{
"key": "usdToEur",
"label": "1 USD in EUR",
"type": "number",
"default": 0.92,
"help": "Only used when the currency is euros."
}
]
},
"ui": {
"pages": [
{
"id": "board",
"label": "Plan usage",
"nav": "dashboards",
"icon": "circle-gauge",
"html": "ui/board.html",
"fill": true,
"feature": "dash.plan"
}
],
"slots": [
{
"id": "conv-plan-usage",
"where": "conversation.details",
"html": "ui/conv-plan-usage.html",
"reuseFrame": true,
"height": 180,
"label": "Plan usage",
"vis": {
"key": "planPct",
"label": "Plan %",
"hint": "≈ share of the account's weekly limit a conversation used"
}
}
]
},
"actions": {
"overview": {
"script": "handlers/overview.py",
"timeoutSec": 60,
"readOnly": true,
"description": "One profile scope's plan usage: the accounts it shows, and per account its live limits, % history over a day range, plans and calibration fits"
},
"calibrate": {
"script": "handlers/calibrate.py",
"timeoutSec": 120,
"description": "Refit the plan rate of every account now (optionally backfilling the weekly fits over the whole history)"
},
"home_tiles": {
"script": "handlers/home_tiles.py",
"timeoutSec": 30,
"readOnly": true,
"description": "The home page's usage tiles for a profile: each ★ login's 5-hour / week / Fable gauges, the burn rate and the plan renewal"
}
},
"capabilities": [
"usage.read",
"usage.calibrate"
],
"provides": {
"home.tiles": "home_tiles"
}
}