"""The widget types: what an agent's one adaptive widget can become. By default an agent keeps ONE
widget that shows the right thing at the right time (a Glance when there's something to know, an Act with the right buttons,
a Decide when it needs an OK, a Checklist at the store). A second widget is only for keeping streams apart (news and
social updates in one, coding approvals in another). The types are reusable shapes an agent controls. A type isn't tied to one topic;
the same Act widget is about a broken build this morning and an unanswered email this afternoon. Library
examples are good uses of each type, to import and adapt."""

TYPES = [
  dict(id="glance", short="Know at a glance", name="Glance", symbol="eye.fill",
       oneliner="One thing worth knowing right now, at a glance.",
       shape="A big number or status (metric), one line of context (text), optional chart or list on large. Buttons are optional.",
       drive=["Lead with the one value that matters now; put the why in one short line.",
              "Change the subject when something else matters more: the same Glance shows overnight results at 7, a usage jump at noon, a release at 3.",
              "Add a chart on large when there's a trend, a list when there are details."],
       good_for=["Your day", "What's useful where you are", "Flight or train status", "What your agents did overnight", "A usage or cost jump", "Weather that changes your plans"]),
  dict(id="decide", short="Approve or decline", name="Decide", symbol="checkmark.seal.fill",
       oneliner="Your agent asks before it acts. Approve or decline with one tap.",
       shape="What and how big (metric + text), then two buttons: the action named exactly, and decline. Large adds context.",
       drive=["Name the exact action, amount and target on the first button (\"Deploy\", \"Pay $86\", \"Send to Sam\").",
              "Money and anything irreversible: two steps (the button, then droplet_ask with risk high).",
              "When nothing waits on the user, show the last result; the buttons come back with the next decision."],
       good_for=["Deploy or merge", "Spend money", "Send what your agent wrote", "Delete or archive", "Run a migration", "Post in public"]),
  dict(id="choose", short="Pick one option", name="Choose", symbol="square.grid.2x2.fill",
       oneliner="Your agent did the research. Pick one of two or three options.",
       shape="The question (text), then up to three option buttons, each a short label with the key fact (\"Tue 2:00\", \"Patch\"). Large adds a list with details.",
       drive=["Do the work first: compare, then offer the best 2-3, best first.",
              "Put the deciding fact in each label; details go in the large list.",
              "After the pick, act on it (fix, reply, send the invite) with approval if it costs money, then show the result."],
       good_for=["Which way to fix a bug", "Meeting time that works", "Which reply to send", "Which draft to publish", "What to do first"]),
  dict(id="act", short="Up to three actions", name="Act", symbol="hand.tap.fill",
       oneliner="Where things stand, and the three things you'd want to do about it.",
       shape="A status (metric + text), then up to three action buttons. Large adds a list.",
       drive=["Pick the three actions the user is most likely to want right now, most likely first.",
              "Each button is a real thing you'll do (fix, send, snooze, call), not a link to an app.",
              "Swap the subject and the actions as the day changes: an inbox at 9, a broken build at 2, a calendar clash at 6."],
       good_for=["A failing build", "A production issue", "A pull request", "An email that needs you", "Your next meeting", "A calendar clash"]),
  dict(id="checklist", short="Tick things off", name="Checklist", symbol="checklist",
       oneliner="Things to do, ticked on the widget, with a ring that counts.",
       shape="A ring that counts ticks (gauge with count \"checked\") next to a checklist; buttons on large.",
       drive=["At most 5 items for where the user is and what time it is (use versions by place and time).",
              "The user's ticks stay; send reset_checklists: true when a fresh list starts.",
              "Add what follows from a tick, and offer to do items yourself."],
       good_for=["Smart to-do", "What only the user can do", "A workout at the gym", "Groceries at the store", "Packing for a trip", "Launch checklist"]),
  dict(id="progress", short="Toward a goal", name="Progress", symbol="chart.pie.fill",
       oneliner="How far along something is, toward a goal.",
       shape="A ring or bar toward a goal, the number, and a pace line. A count ring follows ticks with no agent running.",
       drive=["Show how far along and what's next (\"7 of 12, about 10 minutes\"), not just a number.",
              "Use count \"checked\" for things the user ticks; update the value yourself for things you measure.",
              "When it finishes, show the result and the next step."],
       good_for=["A long agent task", "A migration or import", "A test run", "A research job"]),
  dict(id="timer", short="Counts down", name="Timer", symbol="timer",
       oneliner="Time until something, counting on its own, with what to do about it.",
       shape="A live countdown (the phone counts, no updates needed), context, and one or two actions.",
       drive=["Count to the moment that matters (leave by, a deadline, a renewal, an early start).",
              "The countdown runs on the phone; update only when the moment changes.",
              "Give the action that beats the clock (set the alarm, send it now, cancel it in time)."],
       good_for=["An early start", "Leave by", "A deadline", "A renewal", "An approval that expires"]),
  dict(id="place", short="Where to be", name="Place", symbol="map.fill",
       oneliner="Where to be, on a real map, with how and when to get there.",
       shape="Time and place (metric + countdown), an Apple Maps snapshot with a pin, and actions (ride, late, directions).",
       drive=["Geocode the address; show a map, never coordinates.",
              "Pair it with when to leave and the fastest way there.",
              "Switch to the next place as the day goes."],
       good_for=["Next appointment", "Dinner reservation", "Pickup point", "Hotel tonight", "Where your package is", "Meeting across town"]),
]

# Which type each library example uses.
EXAMPLE_TYPE = {
  "day-brief": "glance", "here-now": "glance", "overnight": "glance", "usage-spike": "glance", "travel-day": "glance",
  "smart-buttons": "act", "meeting-controls": "act", "home-scenes": "act", "meeting-prep": "act", "ship-status": "act", "inbox-zero": "act", "news-brief": "act",
  "pr-review": "act", "incident": "act", "schedule-clash": "act", "follow-up": "act", "release-room": "act",
  "smart-todo": "checklist", "gym-session": "checklist", "grocery-run": "checklist", "only-you": "checklist",
  "approvals": "decide", "bill-guard": "decide", "spend-ok": "decide", "mention-reply": "decide",
  "your-call": "choose", "pick-a-time": "choose",
  "agent-at-work": "progress",
  "early-start": "timer",
  "leave-by": "place",
}

# The Agentic Widgets people add. In every one, the AGENT decides what it shows and offers, from the
# time, the place, events and the user's data. An agent runs each as ONE adaptive widget; start with
# "right-now" and add another only to keep a stream apart.
AGENTIC = [
  dict(id="right-now", name="Right now", symbol="sparkles", accent="#5E5CE6", recommended=True,
       short="All of it, in one widget",
       oneliner="One widget that becomes what the moment needs: what to know, the right buttons, a small app for what you're doing, or a question.",
       how=["Morning: how the day looks and what's first (Informative).",
            "Before you go somewhere: when to leave and the map (Informative, Controls).",
            "Around a meeting: Join, I'm late, then Send recap (Controls).",
            "At the gym or the store: the workout or the list, ready to tick (Full GUI).",
            "When your agent needs you: the question with its buttons (Asks you)."],
       moments=["smart-todo", "leave-by", "meeting-prep", "early-start", "schedule-clash"]),
  dict(id="inform", name="Informative", symbol="text.below.photo.fill", accent="#FF9F0A",
       short="The right thing to know, right now",
       oneliner="Your agent reads your phone and your data and shows what matters at this time and place. It changes by itself.",
       how=["Through the day: what's first, what's next, what's left (versions by time).",
            "By place: your meetings at work, what's nearby when you're out, tomorrow at home (versions by place).",
            "When something changes your plans, it leads with that."],
       moments=["day-brief", "here-now", "leave-by", "meeting-prep", "overnight", "news-brief", "travel-day"]),
  dict(id="control", name="Controls", symbol="switch.2", accent="#0A84FF",
       short="The buttons you need, right now",
       oneliner="Buttons your agent chooses by time, place and what's next: join the call, run your bedtime Shortcut, set the alarm, say you're on your way.",
       how=["At work: Join, I'm late, Notes (versions by place).",
            "At home at night: Bedtime, Alarm 6:45 (versions by place and time).",
            "Around an event: the controls change before, during and after it."],
       moments=["smart-buttons", "meeting-controls", "home-scenes", "early-start"]),
  dict(id="gui", name="Full GUI", symbol="rectangle.3.group.fill", accent="#30D158",
       short="A small app your agent builds",
       oneliner="Information and controls together, made for what you're doing: a workout at the gym, your list at the store, a release, a travel day.",
       how=["It appears when it's needed (by place, time or event) and goes away after.",
            "Numbers, lists, charts, checklists and buttons, whichever the job needs.",
            "Your agent changes the layout as the job moves on."],
       moments=["smart-todo", "gym-session", "grocery-run", "release-room", "travel-day"]),
  dict(id="asks", name="Asks you", symbol="hand.raised.fill", accent="#FF375F",
       short="One tap, and your agent carries on",
       oneliner="Your agent did the work and needs your say: approve it, pick an option, send the reply, or OK the spend.",
       how=["Before anything big: the exact action, with a yes and a no (Decide).",
            "At a fork: two or three options, your agent's pick first (Choose).",
            "Replies and messages: already written, one tap to send."],
       moments=["approvals", "your-call", "inbox-zero", "pick-a-time", "follow-up", "spend-ok", "bill-guard", "mention-reply"]),
  dict(id="work", name="Agent at work", symbol="hammer.fill", accent="#BF5AF2",
       short="What your agents are doing",
       oneliner="Long tasks while you're away: how far along, what broke and the fix, and what only you can do so it can carry on.",
       how=["While it runs: progress, then the result (Progress).",
            "When it's blocked on you: exactly what's needed (Checklist).",
            "When something breaks: what happened, and Fix, Re-run or Roll back (Act)."],
       moments=["agent-at-work", "only-you", "ship-status", "pr-review", "incident", "usage-spike"]),
]
