taskuary 0.3.7.3__tar.gz → 0.3.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {taskuary-0.3.7.3/taskuary.egg-info → taskuary-0.3.7.4}/PKG-INFO +3 -3
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/README.md +2 -2
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/pyproject.toml +1 -1
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/concierge.py +34 -4
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/funnel.py +4 -2
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/llm.py +8 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/server.py +9 -6
- taskuary-0.3.7.3/taskuary/web/assets/AssistantGame-CCx1jM1n.js → taskuary-0.3.7.4/taskuary/web/assets/AssistantGame-BY2_QJhD.js +3 -3
- taskuary-0.3.7.3/taskuary/web/assets/GameScene-DEtfroOB.js → taskuary-0.3.7.4/taskuary/web/assets/GameScene-CfqHp5AM.js +1 -1
- taskuary-0.3.7.3/taskuary/web/assets/HubView-DE_KGqZM.js → taskuary-0.3.7.4/taskuary/web/assets/HubView-vKlOnOiz.js +1 -1
- taskuary-0.3.7.3/taskuary/web/assets/StudioScene-JyIZfG3s.js → taskuary-0.3.7.4/taskuary/web/assets/StudioScene-Dq2jBqvJ.js +1 -1
- taskuary-0.3.7.3/taskuary/web/assets/TasksView-CYGOZob-.js → taskuary-0.3.7.4/taskuary/web/assets/TasksView-kfwgqrNS.js +1 -1
- taskuary-0.3.7.3/taskuary/web/assets/index-i4LFqglY.js → taskuary-0.3.7.4/taskuary/web/assets/index-CMKdW3on.js +142 -142
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/index.html +1 -1
- {taskuary-0.3.7.3 → taskuary-0.3.7.4/taskuary.egg-info}/PKG-INFO +3 -3
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary.egg-info/SOURCES.txt +7 -6
- taskuary-0.3.7.4/tests/test_canvas_relay.py +112 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_freshness_walk.py +13 -6
- taskuary-0.3.7.4/tests/test_model_list.py +30 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_pypi_downloads.py +27 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_remote_sections.py +10 -7
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_zz_toolcatalog.py +4 -1
- taskuary-0.3.7.3/tests/test_canvas_relay.py +0 -52
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/LICENSE +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/setup.cfg +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/__init__.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/acp.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/agents.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/aidefaults.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/aisetup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/alchemy.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/appfacts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/artifacts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/assistant.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/assistantblocks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/autoreply.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/aws.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/azure.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/background.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/blackboard.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/brief.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/browserview.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/calendar.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/categories.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/chains.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/channels.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/chatformat.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/chatgptauth.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/chatservers.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/ci.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/cli.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/cli_connections.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/cli_install_terminal.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/cliinstall.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/climodels.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/clipool.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/clis.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/clisetup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/coder.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/compose.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/config.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/connectorcatalog.json +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/connectorcatalog.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/context.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/continuity.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/counsel.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/databases.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/db.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/demo.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/deps.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/desktop.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/devtools.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/digest.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/docsync.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/doorway_browse.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/evalset.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/evening.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/files.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/funnel_presentation.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/funnel_selection.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/general.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/ghcloseout.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/github.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/guard.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/handbook.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/handraise.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/histgen.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/hooks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/hub.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/images.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/imapmail.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/imessage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/ingest.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/intacct.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/interview.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/invoice_workflow.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/jev.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/knowledge.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/lanes.json +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/learn.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/learnedgraph.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/linkedin.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/live.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/logs.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/lookups.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/markets.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/mcp.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/messengers.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/msauth.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/mssql.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/operations.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/outbound.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/outbox.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/ownwork.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/playbooks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/pm.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/policy.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/problems.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_all.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_inventory.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_membership.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_navigation.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_order.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_projection.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_rail.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_reads.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_startup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/processing_unread.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/projects.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/promptmap.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/proof.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/proposals.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/quickbooks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/rank.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/redact.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/remind.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/remote_assistant.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/reports.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/research.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/reshape.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/responder.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/retention.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/robinhood.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/routing.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/routingmemory.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/scopes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/selfclose.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/semantic.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/senders.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/session_artifacts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/sessionfiles.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/settings_defaults.json +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/settings_schema.json +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/settings_schema.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/setup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/sharepoint.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/sheets.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/simplefin.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/skillimport.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/skills/soul-interview/SKILL.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/skills/taskuary-setup/SKILL.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/social.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/spawn.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/store.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/taskstate.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/teller.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/agent.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/analyst.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/coder.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/coordinator.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/counsel.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/digest.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/history/counsel-0.3.3.5.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/history/counsel-0.3.6.8.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/history/counsel-0.3.6.9-examples.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/history/counsel-0.3.6.9-remind.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/history/counsel-0.3.6.9.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/how-it-works.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/learned.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/marketer.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/playbook.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/profile.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/researcher.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/soul.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/style.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/trader.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/templates/triage.md +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/terminal.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/testing.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/toil.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/toolcatalog.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/treg.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/triage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/triage_kind_rules.json +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/update.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/verdicts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/voice.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/wabridge.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/waitroom.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/walk.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/assets/RoundedBoxGeometry-BE4rf3sD.js +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/assets/index-BUNEVOG_.css +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/favicon.ico +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/favicon.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/assistant.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/board.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/connections.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/docs.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/hub.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/reports.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/settings.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/web/walk/tasks.png +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/webguard.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/whatsapp/bridge.mjs +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/whatsapp/package.json +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/whatsapp/policy.mjs +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/whatsapp/poll.mjs +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/whatsapp/roster.mjs +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/whoami.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/witness.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/workerstate.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/workflows.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary/zoho.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary.egg-info/dependency_links.txt +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary.egg-info/entry_points.txt +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary.egg-info/requires.txt +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/taskuary.egg-info/top_level.txt +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_acp.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_advisor_idea_words.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_answer_route.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_answers_and_reminders.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_asking.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_environment.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_identity.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_profiles.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_reply.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_sentence.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_source.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_agent_wall.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_ai_defaults.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_aisetup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_alchemy.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_an_inbox_is_not_a_destination.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_answered_yourself.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_answers.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_api.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_api_web.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_api_worker_signals.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_app_uptime.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_appfacts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_approval_interrupt.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_acts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_blocks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_can_look_things_up.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_doorways.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_ideas.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_notifications.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_presentation.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_reactions.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_assistant_verdicts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_async_triage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_audit_chain.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_audit_fixes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_auto_start.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_autoreply.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_aws_region.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_azure_discovery.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_background_work.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_banner_is_one_rule.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_blackboard.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_brain_layer.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_brain_reaches_the_session.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_browser_session.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_browser_workflow.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_browserview.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_button_promises.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_calendar.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_calendar_today.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_canvas_sections.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_card_story_phone.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_categories.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cc.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cc_triage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_doors.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_echo_mail.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_freshness.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_is_not_one_task.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_proposals.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_queue.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_relationship.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_retention.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chat_setup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chatformat.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chatgptauth.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chatservers.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_chinese_clis.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_clean_context.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_connections.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_failure.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_help.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_install.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_install_terminal.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_on_fresh_path.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_setup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cli_update.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_climodels.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_clipool.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_clis.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_closeout.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cloud.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cloud_sources.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_coder_session_continuity.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_completion_freshness.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_compose.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_compose_sources.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_compose_workflows.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_concierge.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_concierge_counsel.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_config.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_context.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_context_refresh_freshness.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_continue_session.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_coordination.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_core.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_correction_doors.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_counsel.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_counsel_consumers.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_counsel_migration.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_counsel_sections.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_current_restore.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_cwlogs_paging.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_databases.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_demo.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_deps.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_desktop.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_devin.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_devtools.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_diff_review.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_digest_brief.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_dispatch_retries.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_docs_and_llm.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_docs_flow.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_duplicate_connectors.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_email_chains.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_email_identity_routing.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_ending_a_run_writes_the_answer.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_evening_brief.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_every_card_is_reachable.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_every_cli_startable.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_explicit_completion.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_factory.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_failed_acts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_feed_working.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_files.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_final_answer_capture.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_finished_chat_stays_finished.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_floating_assistant.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_follow_up_verdict.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_fresh_evaluation.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_freshness.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_funnel.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_general.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_github_auto.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_github_images.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_guard.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_handbook.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_handbook_topics.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_handoff_channels.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_handraise.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_harvest.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_histgen.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_home_is_never_yours.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_hooks_events.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_hooks_version.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_ideas_triage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_ignore_sender.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_ignore_sender_quiets_its_work.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_images.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_imap_catchup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_imap_history.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_imapmail.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_imessage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_inline_pictures.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_intacct.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_interrupted_work.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_invite_is_not_work.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_invoice_workflow.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_jev.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_judge_reads_the_conclusion.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_kind_dispatch.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_knowledge.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_lane_vocabulary.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_learnedgraph.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_lifecycle.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_lifespan_loops_are_guarded.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_linkedin.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_linkedin_signin.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_live.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_local_file.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_lookups.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_mail_catchup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_mail_fetch_cost.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_mail_folders.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_mark_read.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_markets.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_mcp.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_meeting_prep.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_message_thread.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_messengers.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_morning_line.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_msauth.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_mssql.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_multi_question.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_muse.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_no_pydantic_v1.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_noop_ending.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_not_coding.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_note_retrieval.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_onboarding_walk.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_one_app_one_reason.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_one_pty_one_geometry.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_only_your_own_thread.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_openai_compatible_brains.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_operations.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_outbound_reports.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_outbox.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_own_rows_no_reply.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_person_name.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_phone_browse_pass.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_phone_picks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_phone_walk_ux.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_playbook_setup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_playbooks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_pm.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_poll_lanes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_poll_overlap.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_poll_parallel.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_poll_sources.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_pr_comments.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_problems.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_problems_dismiss.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_procedure_selection.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_processing_demo_replay.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_processing_ledger.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_profile_is_a_role.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_projects.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_prompt_images.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_prompt_sources.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_promptmap_and_catalog.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_proof_ci_proposals.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_quickbooks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_qwen.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_rail_decisions.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_rank.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_rate_limit.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_read_text.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_recent_closures.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reclassify.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_redact.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_redact_doors.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_remind.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_remote_assistant.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_always_drafts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_attachments.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_channels.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_envelope.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_needs_a_correspondent.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_sources.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reply_voice.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_repo_choice_triage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_alerts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_deliver.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_headline.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_one_road.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_order_and_research.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_prompt_isolation.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_refusal.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_routing.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_report_triage.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_research.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_research_more.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_review_task.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_reviews.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_robinhood.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_routing_memory.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_s3_poll_paging.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_scopes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_seed_fits_a_tty.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_seeded_reports.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_selector_vocabulary.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_semantic.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_send_outcomes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_send_targets.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_sender_trust.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_sender_words.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_session_artifacts.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_session_continuity.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_session_endings.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_session_files.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_settings_defaults_json.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_settings_schema.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_setup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_setup_skill.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_setup_walk.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_sheets_sharepoint.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_simplefin.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_skillimport.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_social.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_someone_else_replied.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_soul_interview.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_startup_contract.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_stay_open.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_stay_open_doors.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_store_app_cli.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_store_hotpaths.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_store_pokes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_sync_clock.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_task_ask.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_task_checklist.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_task_controls_operations.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_task_identity.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_task_refs.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_task_tools.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_taskstate.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_telegram_buttons.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_teller.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_terminal.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_the_exe_ships_what_the_wheel_ships.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_the_split_holds.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_toil.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_tracker_revisions.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_treg.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_cleanup.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_dataset.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_errors.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_images.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_joins.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_pr_rule.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_retry_sweep.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_triage_urgent.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_update.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_update_refused.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_urgent_and_handoff.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_verdict_paths.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_verdict_shape.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_verdict_sticks.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_vision.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_voice.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_wabridge.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_wabridge_log_trim.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_waitroom.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_walk_order.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_watermark.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_web_entrypoint.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_webguard.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_whatsapp_documents.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_whatsapp_images.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_whoami.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_why_not_started.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_withdrawn.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_witness.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_worker_brief.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_worker_events.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_worker_resumes.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_worker_scenarios.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_worker_surfaces.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_workerstate_said.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_workflows.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_zz_chipverbs.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_zz_lastword.py +0 -0
- {taskuary-0.3.7.3 → taskuary-0.3.7.4}/tests/test_zz_setupchat.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: taskuary
|
|
3
|
-
Version: 0.3.7.
|
|
3
|
+
Version: 0.3.7.4
|
|
4
4
|
Summary: Automate your job - the local-first operating system for your work: AI triage in, coding agents out.
|
|
5
5
|
License: MIT
|
|
6
6
|
Project-URL: Homepage, https://github.com/ldbumble/taskuary
|
|
@@ -69,7 +69,7 @@ Dynamic: license-file
|
|
|
69
69
|
|
|
70
70
|
[](https://github.com/ldbumble/taskuary/actions/workflows/ci.yml)
|
|
71
71
|
[](https://scorecard.dev/viewer/?uri=github.com/ldbumble/taskuary)
|
|
72
|
-
[](https://pypi.org/project/taskuary/)
|
|
73
73
|
[](https://github.com/ldbumble/taskuary)
|
|
74
74
|
[](LICENSE)
|
|
75
75
|
[](https://github.com/ldbumble/taskuary/stargazers)
|
|
@@ -83,7 +83,7 @@ your agents, and brings decisions back to you. Nothing sends or ships without yo
|
|
|
83
83
|
|
|
84
84
|

|
|
85
85
|
|
|
86
|
-
Taskuary is early—currently **v0.3.7.
|
|
86
|
+
Taskuary is early—currently **v0.3.7.4**—so breaking changes are still possible before 1.0.
|
|
87
87
|
|
|
88
88
|
<p align="center">
|
|
89
89
|
<a href="https://taskuary.com/demo/"><img
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://github.com/ldbumble/taskuary/actions/workflows/ci.yml)
|
|
6
6
|
[](https://scorecard.dev/viewer/?uri=github.com/ldbumble/taskuary)
|
|
7
|
-
[](https://pypi.org/project/taskuary/)
|
|
8
8
|
[](https://github.com/ldbumble/taskuary)
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://github.com/ldbumble/taskuary/stargazers)
|
|
@@ -18,7 +18,7 @@ your agents, and brings decisions back to you. Nothing sends or ships without yo
|
|
|
18
18
|
|
|
19
19
|

|
|
20
20
|
|
|
21
|
-
Taskuary is early—currently **v0.3.7.
|
|
21
|
+
Taskuary is early—currently **v0.3.7.4**—so breaking changes are still possible before 1.0.
|
|
22
22
|
|
|
23
23
|
<p align="center">
|
|
24
24
|
<a href="https://taskuary.com/demo/"><img
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "taskuary"
|
|
7
|
-
version = "0.3.7.
|
|
7
|
+
version = "0.3.7.4"
|
|
8
8
|
description = "Automate your job - the local-first operating system for your work: AI triage in, coding agents out."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -366,7 +366,23 @@ def task_now(store, tid: int) -> str:
|
|
|
366
366
|
return '\n'.join(lines)
|
|
367
367
|
|
|
368
368
|
|
|
369
|
-
def
|
|
369
|
+
def _task_whole(store, tid: int) -> str:
|
|
370
|
+
"""The task as its page shows it, bounded: description, checklist, and its notes newest last - the agent's report kept long."""
|
|
371
|
+
t = store.get_task(tid) or {}
|
|
372
|
+
out = []
|
|
373
|
+
if str(t.get('Summary') or '').strip(): out.append(f"THE TASK'S DESCRIPTION: {_cut(t['Summary'], 1500)}")
|
|
374
|
+
try: cl = store.checklist_markdown(tid)
|
|
375
|
+
except Exception: cl = ''
|
|
376
|
+
if str(cl or '').strip(): out.append(f"ITS CHECKLIST:\n{_cut(cl, 1500)}")
|
|
377
|
+
notes = [c for c in store.list_comments(tid) if str(c.get('Body') or '').strip()][-12:]
|
|
378
|
+
if notes:
|
|
379
|
+
out.append('ITS NOTES (oldest first):\n' + '\n'.join(
|
|
380
|
+
f" {str(c.get('CreatedAt') or '')[:16]} {c.get('Actor') or '?'}: "
|
|
381
|
+
f"{_cut(c.get('Body'), 1500 if str(c.get('Body') or '').lstrip().startswith('CODER REPORT') else 300)}" for c in notes))
|
|
382
|
+
return _cut('\n'.join(out), 7000)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
def facts(store, item: dict, whole: bool = False) -> str:
|
|
370
386
|
"""What the model is handed about ONE item: the item's own words, then the body, the draft,
|
|
371
387
|
the agent's screen or the meeting, whichever it has. Bounded, so a turn stays fast."""
|
|
372
388
|
if not item: return '(no item on the table - the owner is just talking)'
|
|
@@ -433,6 +449,17 @@ def facts(store, item: dict) -> str:
|
|
|
433
449
|
lines.append('IMPORTANT: newer messages arrived after that draft. It is stale and must be redrafted before sending; do not recommend approving it.')
|
|
434
450
|
if item['kind'] == 'agent':
|
|
435
451
|
lines.append('the agent\'s last lines:\n' + '\n'.join(item.get('tail') or ['(nothing captured)']))
|
|
452
|
+
# THE WHOLE OPEN BOX (the owner, 2026-10-01: "if it has task open, entire task is in context, same with anything else, 4 fyi's"):
|
|
453
|
+
# a task's own description, checklist and notes - the agent's report among them - not only its mail; and every message of a
|
|
454
|
+
# batch, not its title ("4 fyi" was all the model was told)
|
|
455
|
+
# ...for a question asked about it, and a brief handed on - the walk's own one-line intro stays small and quick
|
|
456
|
+
if whole and item.get('tid'): lines.append(_task_whole(store, item['tid']))
|
|
457
|
+
if whole and item['kind'] == 'fyis':
|
|
458
|
+
from .triage import own_words
|
|
459
|
+
for n, i in enumerate(item.get('items') or [], 1):
|
|
460
|
+
m = store.get_message(i['mid']) if i.get('mid') else {}
|
|
461
|
+
body = own_words(str((m or {}).get('BodyText') or i.get('preview') or ''))
|
|
462
|
+
lines.append(f"FYI {n} of {len(item['items'])}: {i.get('who') or '?'} - {i.get('title') or ''}" + (f"\n {_cut(body, 600)}" if body else ''))
|
|
436
463
|
if item['kind'] == 'meeting':
|
|
437
464
|
e = item.get('event') or {}
|
|
438
465
|
lines.append(f"meeting {e.get('start')} - {e.get('end') or ''}" + (f" with {', '.join(e.get('who') or [])}" if e.get('who') else '')
|
|
@@ -2175,7 +2202,7 @@ def _where(it: dict) -> str:
|
|
|
2175
2202
|
def _brief_from_item(store, item: dict) -> str:
|
|
2176
2203
|
"""What to tell an agent when the owner pressed a button instead of typing: the item itself - what it
|
|
2177
2204
|
is, who it is from, and everything already known about it (the same facts the assistant reads)."""
|
|
2178
|
-
return f"Take this on and report back what you find: {_where(item) or 'the item below'}.\n\n{facts(store, item)}".strip()
|
|
2205
|
+
return f"Take this on and report back what you find: {_where(item) or 'the item below'}.\n\n{facts(store, item, whole=True)}".strip()
|
|
2179
2206
|
|
|
2180
2207
|
|
|
2181
2208
|
def propose_for(store, dock_tid: int, decision: dict, item: dict | None, text: str, actor: str = 'owner',
|
|
@@ -2788,6 +2815,8 @@ def say(store, text: str, key: str = None, llm=None, actor: str = 'owner', trace
|
|
|
2788
2815
|
tid = task['TaskId']
|
|
2789
2816
|
p = funnel.pile(store)
|
|
2790
2817
|
if item is None: item = funnel.next_item(store, key, items=funnel.full_items(store)) if key else None # the route already built it
|
|
2818
|
+
# ...and a task opened by name or from the rail may not be in the pile at all: it is still what is on screen (2026-10-01)
|
|
2819
|
+
if item is None and key: item = funnel.item_for_key(store, key)
|
|
2791
2820
|
# "1" MEANS THE SAME THING ON BOTH SCREENS. The phone numbers its options because a chat has no
|
|
2792
2821
|
# buttons, and the owner, having answered by number there, typed "1" on the desktop too - where it
|
|
2793
2822
|
# was just a digit for the model to interpret, so it answered about something else entirely (the
|
|
@@ -2816,11 +2845,12 @@ def say(store, text: str, key: str = None, llm=None, actor: str = 'owner', trace
|
|
|
2816
2845
|
# ...and the Hub is a tool too (hub.publish), not an envelope taught every turn (2026-09-25)
|
|
2817
2846
|
system = _system(store, llm) + '\n\n' + toolcatalog.block(store)
|
|
2818
2847
|
raw = str(llm(system,
|
|
2819
|
-
f"NOW: {datetime.now().strftime('%A %d %B %H:%M')}\n{funnel.summary(p['items'], coming=False)}\n\n{facts(store, item)}\n\n"
|
|
2848
|
+
f"NOW: {datetime.now().strftime('%A %d %B %H:%M')}\n{funnel.summary(p['items'], coming=False)}\n\n{facts(store, item, whole=True)}\n\n"
|
|
2820
2849
|
+ (f"CONVERSATION SO FAR:\n{_turns(store, tid)}\n\n" if _turns(store, tid) else '')
|
|
2821
2850
|
# THE CARD BROWSED OPEN in the canvas (the canvas redesign, 2026-09-29): "this", "it", "set it up"
|
|
2822
2851
|
# mean that card - a connector, a settings group, a report - when no item is on the table
|
|
2823
|
-
|
|
2852
|
+
# ...or the PAGE open with nothing opened on it (2026-10-01): a question over the Connections wall is about connections
|
|
2853
|
+
+ (f"ON SCREEN NOW: {_cut(open_card, 300)} - 'this' and 'here' mean what is on screen: answer about it first; its own operations set it up\n\n" if open_card and not item else '')
|
|
2824
2854
|
+ f"The owner says: {text}\n"
|
|
2825
2855
|
# A PICTURE WITH THE LINE (the owner, 2026-09-30): an API brain sees it, a CLI brain reads the file it names
|
|
2826
2856
|
+ ("ATTACHED IMAGES (read these files - they are what the owner is showing you)\n" + "\n".join(images) + "\n" if images else '')
|
|
@@ -1509,8 +1509,10 @@ def settle(store, key: str, verb: str, by: str = 'owner', hours: float = None, n
|
|
|
1509
1509
|
# Mail landing mid-settle moves the membership census, and the owner was handed that sentence
|
|
1510
1510
|
# verbatim while nothing moved - 27 items stayed in the pipe (the owner, 2026-09-07: "what does
|
|
1511
1511
|
# this mean as well when I got it to clear the rest of what was left?"). It is the worker's lag,
|
|
1512
|
-
# not a refusal: do the very thing the message asks for, once, and settle again.
|
|
1513
|
-
|
|
1512
|
+
# not a refusal: do the very thing the message asks for, once, and settle again. A row that only just
|
|
1513
|
+
# landed is the same lag - its item is not built yet ("processing target is unavailable"): a report the
|
|
1514
|
+
# AI judge turned down stayed on the rail and its run was logged as failed (2026-10-01).
|
|
1515
|
+
if 'reconciled before settlement' not in str(e) and 'processing target is unavailable' not in str(e): raise
|
|
1514
1516
|
from . import processing_all
|
|
1515
1517
|
processing_all.wait_settled(store)
|
|
1516
1518
|
store.reconcile_processing_membership()
|
|
@@ -412,7 +412,15 @@ def _chatgpt_llm(cfg: dict, refresh_token: str):
|
|
|
412
412
|
return llm
|
|
413
413
|
|
|
414
414
|
|
|
415
|
+
# a model that cannot answer a prompt is no brain: Azure lists an embedding deployment beside the chat ones, and the picker offered it
|
|
416
|
+
_NOT_A_BRAIN = re.compile(r'embed|whisper|tts|transcri|dall-e|image|moderation|realtime|audio', re.I)
|
|
417
|
+
|
|
418
|
+
|
|
415
419
|
def list_models(t, cfg: dict, key: str) -> list:
|
|
420
|
+
return [m for m in _list_models(t, cfg, key) if not _NOT_A_BRAIN.search(m)]
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
def _list_models(t, cfg: dict, key: str) -> list:
|
|
416
424
|
"""The model ids this key can actually call, from the provider's own list endpoint - so the picker never offers a name the
|
|
417
425
|
account does not have. Azure names what you DEPLOYED (that is what a request carries), so it is its deployments, or the resource's base models when the
|
|
418
426
|
deployments list is closed to this key. RAISES on a provider that answers with an error: an empty list would read as "none exist"."""
|
|
@@ -3676,10 +3676,13 @@ async def concierge_stream(body: ConciergeStreamBody):
|
|
|
3676
3676
|
def fetched(n): # once per turn, as the new lines land - the result line follows
|
|
3677
3677
|
if not started: started.append(n); put({'type': 'context_update', 'say': RETRIAGE_STARTED, 'stage': 'started', 'new': n})
|
|
3678
3678
|
# A typed question polls NOTHING up front: the words are read first, and the item is
|
|
3679
|
-
# brought in below only if the answer turns out to be about it.
|
|
3680
|
-
#
|
|
3681
|
-
#
|
|
3682
|
-
|
|
3679
|
+
# brought in below only if the answer turns out to be about it. The walk's Next does not either:
|
|
3680
|
+
# it answers from the rail and the change-check follows the four (_refresh_after, design C,
|
|
3681
|
+
# 2026-09-17) - and neither does a row you click (mode 'next' with its key). That one used to wait
|
|
3682
|
+
# on its mailbox first, 9 of the 12 seconds a click took (the owner, 2026-10-01: "open now, check
|
|
3683
|
+
# after"); what lands after it reaches the page the way it does for Next. An ACTION - a reply, an
|
|
3684
|
+
# approval, an agent - still reads the provider before it acts (_refresh_chat_context's gate).
|
|
3685
|
+
if body.key and body.mode not in ('say', 'next'): freshness = _refresh_chat_key(body.key, body.context_mid, on_fetched=fetched)
|
|
3683
3686
|
else: freshness = {}
|
|
3684
3687
|
if freshness.get('polled'):
|
|
3685
3688
|
put({'type': 'tool_call', 'name': 'sync_messages',
|
|
@@ -3707,7 +3710,7 @@ async def concierge_stream(body: ConciergeStreamBody):
|
|
|
3707
3710
|
if notice: out['context_update'] = notice
|
|
3708
3711
|
if body.mode == 'next': out = _with_pile(out, body) # the rail rides along (design B)
|
|
3709
3712
|
put({'type': 'done', **out})
|
|
3710
|
-
if body.mode == 'next'
|
|
3713
|
+
if body.mode == 'next': _refresh_after(out) # after the answer, never before it (design C) - a clicked row too
|
|
3711
3714
|
except NavigationStale as error:
|
|
3712
3715
|
put({'type': 'error', 'code': 'selection_stale', 'detail': error.detail, 'error': str(error)})
|
|
3713
3716
|
except SelectionUnavailable as error:
|
|
@@ -6184,7 +6187,7 @@ def _refresh_after(out: dict):
|
|
|
6184
6187
|
afterwards, here, on a thread: every channel of an FYI batch once (_refresh_items). Mail that arrives
|
|
6185
6188
|
writes through ingest, the rail's dirty rows and the live event carry it to the page, whose reload
|
|
6186
6189
|
refreshes the card in place and says so on the strip (funnelPile.currentItemFromPile). The item on
|
|
6187
|
-
the table is NOT re-picked. A
|
|
6190
|
+
the table is NOT re-picked. A clicked row is checked here too, since 2026-10-01: it opens at once."""
|
|
6188
6191
|
item = (out or {}).get('item') or {}
|
|
6189
6192
|
members = item.get('items') if item.get('kind') == 'fyis' else [item]
|
|
6190
6193
|
members = [m for m in (members or []) if isinstance(m, dict) and (m.get('mid') or m.get('tid'))]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GameScene-
|
|
2
|
-
import{r as h,c as Kt,j as t,T as f,B as l,a as E,R as Ut,b as qt,m as _,l as ft,d as it,M as Yt,e as at,f as Vt,C as Xt,p as ut,g as Jt,u as Qt,i as Zt,o as lt,h as ct,s as en,k as tn,n as xt,q as dt,t as gt,_ as nn,W as on,v as sn,F as rn,S as an,w as ln}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GameScene-CfqHp5AM.js","assets/index-CMKdW3on.js","assets/index-BUNEVOG_.css","assets/RoundedBoxGeometry-BE4rf3sD.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as h,c as Kt,j as t,T as f,B as l,a as E,R as Ut,b as qt,m as _,l as ft,d as it,M as Yt,e as at,f as Vt,C as Xt,p as ut,g as Jt,u as Qt,i as Zt,o as lt,h as ct,s as en,k as tn,n as xt,q as dt,t as gt,_ as nn,W as on,v as sn,F as rn,S as an,w as ln}from"./index-CMKdW3on.js";const Ne=[{key:"floor",name:"Agent Floor",hotkey:"1",blurb:"agents at their desks - jump into a code space"},{key:"gym",name:"The Gym",hotkey:"2",blurb:"your own tasks - every checklist tick is a rep"},{key:"meeting",name:"Meeting Room",hotkey:"3",blurb:"people waiting on you - email at the table, chat in the huddle"},{key:"coffee",name:"Coffee Room",hotkey:"4",blurb:"fyi's and reports - catch up over a cup"},{key:"archive",name:"Memory Archive",hotkey:"5",blurb:"filing cabinets of what the team knows - and the ghosts of threads that slipped"},{key:"hq",name:"Assistant Core",hotkey:"6",blurb:"ask who should take what"}],Ae=e=>Ne.find(i=>i.key===e)||null;function Ln(e,i){return e<-5.15?i<2.5?"archive":"gym":e>5.15?i<1.9?"coffee":"hq":i<4.2?"floor":"meeting"}const cn=new Set(["email","outlook","gmail","imap","exchange"]),dn=new Set(["teams","slack","whatsapp","telegram","imessage","discord","mattermost","rocketchat","matrix","google_chat","sms"]),Ce=e=>cn.has(e==null?void 0:e.channel)?"email":dn.has(e==null?void 0:e.channel)?"chat":"tool",hn={blocked:"floor",working:"floor",queued:"floor",stopped:"floor",saved:"floor",approve:"meeting",asked:"meeting",time:"meeting",unjudged:"meeting",yours:"gym",fyi:"coffee",report:"coffee",broken:"coffee",forgotten:"archive"},pn=new Set(["agent","wrapup"]),fn=e=>pn.has(e==null?void 0:e.kind)?"floor":["task","agentdone"].includes(e==null?void 0:e.kind)?"gym":hn[e==null?void 0:e.lane]||"coffee";function ie(e=[]){const i={floor:[],gym:[],meeting:[],coffee:[],archive:[],hq:[]};for(const r of e)i[fn(r)].push(r);return i}const un=new Set(["blocked","approve","asked","yours","unjudged","broken","stopped","saved"]),q=e=>un.has(e==null?void 0:e.lane),xn=(e,i)=>e.lane!=="working"&&!e.surfaced&&!i.has(e.key),gn=(e=[],i=new Set)=>e.filter(r=>xn(r,i)).length;function ke(e,i=[]){var y,I,z;const r=((y=i.find(x=>x.Kind==="coding"))==null?void 0:y.Name)||((I=i[0])==null?void 0:I.Name)||"the coder",s=((z=i.find(x=>x.Kind&&x.Kind!=="coding"))==null?void 0:z.Name)||"the general agent",a=e==null?void 0:e.lane,u=e==null?void 0:e.kind;return u==="agent"&&a==="blocked"?{who:e.working||e.agent||r,verb:"answer",why:"an agent stopped for your call"}:u==="agent"&&e.paused?{who:"you",verb:"resume",why:"its session was saved - pick it up where it stopped"}:u==="agent"?{who:e.working||e.agent||r,verb:"watch",why:"already with an agent"}:u==="agentdone"||u==="wrapup"?{who:"you",verb:"close",why:"the agent finished - read what it found, then close it"}:u==="meeting"?{who:"you",verb:"prep",why:"coming up - get prepped first"}:a==="approve"?{who:"you",verb:"approve",why:"a draft is written - it only needs your yes"}:a==="forgotten"?{who:"you",verb:"followup",why:"gone quiet - a nudge keeps it alive"}:a==="fyi"||a==="report"?{who:"nobody",verb:"read",why:"nothing to do but know it"}:a==="broken"?{who:"you",verb:"open",why:"a connection stopped - only you can sign it back in"}:e!=null&&e.coding||u==="coding"?{who:r,verb:"dispatch",kind:"coding",why:"code work - hand it to a coding agent"}:u==="todo"||u==="task"||a==="yours"?{who:s,verb:"dispatch",kind:"general",why:"real work, not a sentence - an agent can start it"}:{who:"you",verb:"draft",why:"a question a reply settles - let the assistant draft it"}}const mn={answer:60,dispatch:45,approve:40,followup:35,file:25,draft:20,prep:20,resume:15,wrap:15,vote:10,sort:10,rerun:10,done:12,read:8,open:5,ask:5,pull:3,later:0,rest:6,set:30,rep:5,next:2,bottom:50,gymclear:30},yn={answer:"Unblocked an agent",dispatch:"Handed off",approve:"Reply sent",followup:"Ghost busted",file:"Filed to memory",draft:"Draft summoned",vote:"Upvoted a file",done:"Cleared",read:"Caught up",open:"Jumped in",ask:"Asked the core",pull:"Pulled a file",later:"Dodged",rest:"Laid to rest",bottom:"Inbox Boss defeated",gymclear:"Gym cleared - every set done",set:"Set complete - task done",rep:"Rep",next:"Moved on",prep:"Prepped for a meeting",resume:"Agent back on its feet",wrap:"Session saved",sort:"Sorted away",rerun:"Report rerun"},kn={approve:"approve",redraft:"draft",reply:"draft",coder:"dispatch",regular_agent:"dispatch",mine:"done",not_ours:"sort",not_ours_sender:"sort",block_sender:"sort",archive:"sort",close:"done",done:"done",later:"later",skip:"later",defer:"later",continue:"dispatch",answer_agent:"answer",stop_agent:"wrap",rerun:"rerun",split:"done",prep:"prep",followup:"followup"},ht=["Intern","Inbox Rookie","Reply Ranger","Agent Wrangler","Combo Clerk","Thread Slayer","Ghostbuster","Chief of Vibes","Office Legend","Inbox Zero Deity"],De=e=>50*e*(e+1);function ye(e=0){let i=0;for(;e>=De(i+1);)i+=1;const r=De(i),s=De(i+1);return{level:i+1,title:ht[Math.min(i,ht.length-1)],into:e-r,span:s-r,pct:(e-r)/(s-r)}}const mt=45e3,yt=e=>1+Math.min(4,Math.max(0,e-1))*.25,ze=[{key:"first",name:"First Blood",says:"your first move in the office",test:e=>e.moves>=1},{key:"unblock",name:"Unblocker",says:"answered an agent that was stuck",test:e=>(e.by.answer||0)>=1},{key:"handoff3",name:"Matchmaker",says:"handed 3 things to the right agent",test:e=>(e.by.dispatch||0)>=3},{key:"ghost3",name:"Ghostbuster",says:"busted 3 ghost threads",test:e=>(e.by.followup||0)+(e.by.rest||0)>=3},{key:"coffee",name:"Coffee Break",says:"emptied the coffee room",test:(e,i)=>(i==null?void 0:i.coffee)===0&&(e.by.read||0)>=1},{key:"meeting",name:"Room Cleared",says:"nobody left waiting in the meeting room",test:(e,i)=>(i==null?void 0:i.meeting)===0&&e.moves>=1},{key:"gymrat",name:"Gym Rat",says:"finished 3 of your own tasks",test:e=>(e.by.set||0)>=3},{key:"combo5",name:"On Fire",says:"a 5-move combo",test:e=>e.best>=5},{key:"librarian",name:"Librarian",says:"filed a lesson to memory",test:e=>(e.by.file||0)>=1},{key:"sender",name:"Send It",says:"sent 5 replies",test:e=>(e.by.approve||0)>=5},{key:"bottom",name:"Boss Slayer",says:"beat the Inbox Boss - walked to the bottom of the pile",test:e=>(e.by.bottom||0)>=1},{key:"gymclear",name:"Rest Day Earned",says:"finished every one of your own tasks",test:e=>(e.by.gymclear||0)>=1},{key:"century",name:"Triple Digits",says:"100 XP in one day",test:e=>e.today>=100}],Be=e=>new Date(e).toISOString().slice(0,10),Ie=(e=Date.now())=>({xp:0,moves:0,by:{},dayBy:{},quests:[],combo:0,best:0,lastAt:0,day:Be(e),today:0,got:[],runStart:e});function Fe(e,i,r=Date.now(),s=null){const a={...Ie(r),...e,by:{...(e==null?void 0:e.by)||{}},dayBy:{...(e==null?void 0:e.dayBy)||{}},quests:[...(e==null?void 0:e.quests)||[]],got:[...(e==null?void 0:e.got)||[]]};a.day!==Be(r)&&Object.assign(a,{day:Be(r),today:0,runStart:r,dayBy:{},quests:[]}),a.combo=r-a.lastAt<=mt?a.combo+1:1;const u=yt(a.combo),y=Math.round((mn[i]??0)*u),I=ye(a.xp).level;Object.assign(a,{xp:a.xp+y,today:a.today+y,moves:a.moves+1,lastAt:r,best:Math.max(a.best,a.combo)}),a.by[i]=(a.by[i]||0)+1,a.dayBy[i]=(a.dayBy[i]||0)+1;const z=((s==null?void 0:s.quests)||kt).filter(g=>g.n>0&&!a.quests.includes(g.key)&&a.dayBy[g.move]>=g.n);for(const g of z)a.quests.push(g.key),a.xp+=g.xp,a.today+=g.xp;const x=ze.filter(g=>!a.got.includes(g.key)&&g.test(a,s));return a.got.push(...x.map(g=>g.key)),{state:a,gained:y,mult:u,unlocked:x,quests:z,levelUp:ye(a.xp).level>I?ye(a.xp):null}}const ve=(e,i,r)=>`${e} ${e===1?i:r}`,kt=[{key:"q-reply",says:e=>`Send ${ve(e,"reply","replies")}`,move:"approve",n:3,xp:50},{key:"q-hand",says:e=>`Hand ${ve(e,"thing","things")} to agents`,move:"dispatch",n:2,xp:50},{key:"q-coffee",says:e=>`Catch up on ${ve(e,"fyi","fyi's")}`,move:"read",n:4,xp:30},{key:"q-gym",says:e=>`Do ${ve(e,"rep","reps")}`,move:"rep",n:5,xp:40}];function bn(e,i={}){return kt.map(r=>{var u;const s=((u=e==null?void 0:e.dayBy)==null?void 0:u[r.move])||0,a=Math.min(r.n,s+(i[r.move]||0));return{...r,n:a,label:r.says(Math.max(a,1))}}).filter(r=>{var s;return r.n>0||((s=e==null?void 0:e.quests)==null?void 0:s.includes(r.key))})}const jn=(e,i)=>{var r;return Math.min(i.n,((r=e==null?void 0:e.dayBy)==null?void 0:r[i.move])||0)},bt="taskuary.assistantGame.v1";function wn(e=globalThis.localStorage,i=Date.now()){try{const r=JSON.parse((e==null?void 0:e.getItem(bt))||"null");return r&&typeof r.xp=="number"?{...Ie(i),...r}:Ie(i)}catch{return Ie(i)}}function Pe(e,i=globalThis.localStorage){try{i==null||i.setItem(bt,JSON.stringify(e))}catch{}}function Sn(e,i=Date.now()){const r=ye(e.xp),s=Math.max(0,Math.round((i-(e.runStart||i))/1e3)),a=`${Math.floor(s/60)}:${String(s%60).padStart(2,"0")}`,u=y=>{var I;return((I=e.by)==null?void 0:I[y])||0};return["🏢 Taskuary · Assistant Game",`Lv ${r.level} ${r.title} · ${e.xp} XP · best combo x${e.best}`,`📨 ${u("approve")} sent 🤖 ${u("dispatch")} handed off 🔓 ${u("answer")} unblocked 👻 ${u("followup")+u("rest")} ghosts ☕ ${u("read")} fyi`,`⏱ today's run ${a} · 🏆 ${e.got.length}/${ze.length}`].join(`
|
|
3
3
|
`)}const o={bg:"rgba(20,24,30,.9)",line:"rgba(255,255,255,.1)",ink:"#f3f1ec",dim:"#aeb6bf",faint:"#7c8590",gold:"#f0c05a",mint:"#7fd1c6",red:"#e0697d",green:"#8fcf8f",card:"rgba(255,255,255,.05)"},pe={bgcolor:o.bg,color:o.ink,border:`1px solid ${o.line}`,borderRadius:"14px",boxShadow:"0 18px 50px rgba(10,14,20,.35)",backdropFilter:"blur(10px)"},be=e=>{var i,r;return((r=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:r.detail)||(e==null?void 0:e.message)||"that did not go through"},Ee={width:"100%",boxSizing:"border-box",bgcolor:"rgba(0,0,0,.25)",color:o.ink,border:`1px solid ${o.line}`,borderRadius:"8px",p:.9,fontSize:12.5,fontFamily:"inherit",resize:"vertical"};function R({children:e,onClick:i,disabled:r,kind:s="ghost",title:a}){const u={gold:o.gold,mint:o.mint,ghost:o.card,red:"rgba(224,105,125,.15)"}[s];return t.jsx(l,{component:"button",type:"button",onClick:y=>{y.stopPropagation(),i==null||i(y)},disabled:r,title:a,sx:{border:`1px solid ${s==="ghost"?o.line:"transparent"}`,bgcolor:u,color:s==="gold"||s==="mint"?"#1c1f24":o.ink,borderRadius:"9px",px:1.1,py:.55,fontSize:11.5,fontWeight:800,cursor:r?"default":"pointer",opacity:r?.5:1,"&:hover":{filter:r?"none":"brightness(1.12)"}},children:e})}const K=({children:e})=>t.jsx(l,{sx:{display:"flex",gap:.5,mt:.8,flexWrap:"wrap"},onClick:i=>i.stopPropagation(),children:e}),je=({children:e})=>t.jsx(f,{sx:{fontSize:9.5,fontWeight:800,letterSpacing:1.1,color:o.faint,mt:1,mb:.4},children:e});function J({text:e,cap:i=150}){const[r,s]=h.useState(!1);if(!e)return null;const a=e.length>420;return t.jsxs(l,{onClick:u=>u.stopPropagation(),sx:{mt:.7},children:[t.jsx(l,{sx:{maxHeight:r?380:i,overflowY:r?"auto":"hidden",position:"relative",px:1,py:.8,borderRadius:"8px",bgcolor:"rgba(0,0,0,.22)",fontSize:12.5,lineHeight:1.55,color:o.ink,whiteSpace:it(e)?"normal":"pre-wrap","& a":{color:o.mint},"& p":{my:.5},"& table":{fontSize:11.5},"& h1,& h2,& h3":{fontSize:13.5,my:.6},...!r&&a?{maskImage:"linear-gradient(#000 70%, transparent)"}:{}},children:it(e)?t.jsx(Yt,{text:e}):e}),a&&t.jsx(l,{component:"button",type:"button",onClick:()=>s(u=>!u),sx:{border:0,bgcolor:"transparent",color:o.mint,fontSize:11.5,fontWeight:700,cursor:"pointer",p:0,mt:.4},children:r?"Less":"Read it all"})]})}function Te({mid:e}){const[i,r]=h.useState(null),[s,a]=h.useState(!1);if(h.useEffect(()=>{let x=!0;return e==null||e===""?(r({}),()=>{x=!1}):(E.get(`/api/messages/${e}`).then(({data:g})=>x&&r(g||{})).catch(g=>x&&r({error:be(g)})),()=>{x=!1})},[e]),!i)return t.jsx(f,{sx:{fontSize:11.5,color:o.faint,mt:.6},children:"opening it…"});if(i.error)return t.jsx(f,{sx:{fontSize:11.5,color:o.red,mt:.6},children:i.error});const u=at(i.BodyText||""),y=i.ReadText!=null?at(i.ReadText):u,I=s?u:y,z=I.indexOf(`
|
|
4
|
-
--- raw data ---`);return t.jsxs(t.Fragment,{children:[t.jsx(J,{text:(z>=0?I.slice(0,z):I).trim()||"(empty)"}),y!==u&&t.jsx(l,{component:"button",type:"button",onClick:x=>{x.stopPropagation(),a(g=>!g)},sx:{border:0,bgcolor:"transparent",color:o.faint,fontSize:11,cursor:"pointer",p:0,mt:.3},children:s?"Just what they wrote":"Show the whole email"}),i.SourceLink&&t.jsx(l,{component:"a",href:i.SourceLink,target:"_blank",rel:"noreferrer",onClick:x=>x.stopPropagation(),sx:{display:"block",fontSize:11,color:o.mint,mt:.3},children:"open the original ↗"})]})}function vn({tid:e}){const[i,r]=h.useState(null);return h.useEffect(()=>{let s=!0;return E.get(`/api/tasks/${e}/worker`).then(({data:a})=>s&&r(String((a==null?void 0:a.said)||"").trim())).catch(()=>s&&r("")),()=>{s=!1}},[e]),i?t.jsxs(t.Fragment,{children:[t.jsx(je,{children:"WHAT IT SAID LAST"}),t.jsx(J,{text:i,cap:120})]}):null}function Tn({tid:e}){const[i,r]=h.useState(null);return h.useEffect(()=>{let s=!0;return E.get(`/api/tasks/${e}`).then(({data:a})=>{const u=((a==null?void 0:a.comments)||[]).slice().reverse().find(y=>/^(CODER REPORT|HANDOVER NOTE)/.test(String(y.Body||"")));s&&r(u?u.Body.replace(/^(CODER REPORT|HANDOVER NOTE)\s*/,""):"No report was filed on this task.")}).catch(a=>s&&r(be(a))),()=>{s=!1}},[e]),i==null?null:t.jsxs(t.Fragment,{children:[t.jsx(je,{children:"ITS FINAL REPORT"}),t.jsx(J,{text:i})]})}function Cn({item:e,busy:i,play:r}){const[s,a]=h.useState(null),[u,y]=h.useState(null),[I,z]=h.useState(""),[x,g]=h.useState(""),S=()=>E.get("/api/reviews",{params:{status:"pending"}}).then(({data:v})=>a((v.data||[]).find(m=>m.ReviewId===e.rid)||{gone:!0})).catch(v=>g(be(v)));if(h.useEffect(()=>{S()},[e.rid]),!s)return t.jsx(f,{sx:{fontSize:11.5,color:o.faint,mt:.6},children:"fetching the draft…"});if(s.gone)return t.jsx(f,{sx:{fontSize:11.5,color:o.faint,mt:.6},children:"Already handled - nothing is waiting here."});const C=s.Kind==="action",b=Vt(s),$=u??(C?(()=>{try{const v=JSON.parse(s.DraftText||"");return v.text||`${v.action}${v.why?` — ${v.why}`:""}`}catch{return s.DraftText||""}})():s.DraftText||""),p=s.FromName||s.FromEmail||"them",A=()=>r("approve",e.key,async()=>{const{data:v}=await E.post(`/api/reviews/${e.rid}/decide`,{verb:"approve",final_text:C?null:$,note:null});if(v!=null&&v.send_error)throw new Error(v.send_error);return v}),O=async()=>{const v=await r("draft",null,async()=>(await E.post(`/api/messages/${e.mid}/reply`,{draft:!0,redraft:!0,instruction:I.trim()||null})).data);v&&(z(""),y(null),v.draft?a(m=>({...m,DraftText:v.draft,Stale:!1})):S())};return t.jsxs(l,{onClick:v=>v.stopPropagation(),children:[t.jsx(je,{children:b?"THE AGENT FINISHED - WHAT CLOSES IT":C?"WHAT THE AGENT WANTS TO DO":`THE DRAFT TO ${p.toUpperCase()} - EDIT, THEN SEND`}),t.jsx(l,{component:"textarea",rows:5,value:$,readOnly:C,onChange:v=>y(v.target.value),placeholder:"No draft yet - rewrite it below, or type your own",sx:Ee}),!!(s.Stale??e.stale)&&t.jsx(f,{sx:{fontSize:11.5,color:o.gold,mt:.4},children:"New messages came in after this draft - rewrite it before sending."}),t.jsxs(K,{children:[t.jsx(R,{kind:"gold",disabled:!!i||!C&&!$.trim(),onClick:A,title:b?`${b.label} - ${b.then}`:C?"Runs what the agent proposed":`Sends it to ${p}`,children:b?`✔ ${b.label} · +40`:C?"▶ Run it · +40":e.tid?`✔ ${Xt} · +40`:"📨 Send it · +40"}),(b==null?void 0:b.alt)&&t.jsxs(R,{disabled:!!i,title:`${b.alt.label} - ${b.alt.then}`,onClick:()=>r("approve",e.key,async()=>{const{data:v}=await E.post(`/api/reviews/${e.rid}/decide`,{verb:b.alt.verb,final_text:null,note:null});if(v!=null&&v.send_error)throw new Error(v.send_error);return v}),children:["✖ ",b.alt.label]})]}),!C&&e.mid&&t.jsx(t.Fragment,{children:t.jsxs(l,{sx:{display:"flex",gap:.5,mt:.8},children:[t.jsx(l,{component:"input",value:I,onChange:v=>z(v.target.value),placeholder:"Rewrite it… (shorter, warmer, say no)",onKeyDown:v=>{v.key==="Enter"&&O()},sx:{...Ee,py:.6}}),t.jsx(R,{disabled:!!i,onClick:O,title:"The assistant rewrites the draft - nothing is sent",children:"✍ Redraft"})]})}),x&&t.jsx(f,{sx:{fontSize:11.5,color:o.red,mt:.5},children:x})]})}function jt({item:e,covers:i=[],busy:r,play:s,onRepo:a,given:u=null,initial:y=null}){const[I,z]=h.useState(u),[x,g]=h.useState(y),[S,C]=h.useState(null);h.useEffect(()=>{if(u)return;let p=!0;return E.get("/api/concierge/chips",{params:{key:e.key}}).then(({data:A})=>p&&z(A.chips||[])).catch(()=>p&&z([])),()=>{p=!1}},[e.key,u]);const b=async p=>{const A=await s(kn[p.verb]||"done",e.key,async()=>{var m;let O;try{O=(await E.post(`/api/operations/${p.id}/execute`,{version:p.version})).data}catch(D){O={status:((m=D==null?void 0:D.response)==null?void 0:m.status)===409?"stale":"error",error:be(D)}}const v=Jt(p,O);if(v.repo&&(a==null||a(v.repo)),v.status!=="done")throw new Error(v.receipt);return v});return g(null),A},w=async(p,A)=>{if(p.ask)return null;if(p.verb==="defer")return(e.tid||e.idea)&&C(A||document.body),null;if(p.verb==="continue"&&e.tid)return s("dispatch",e.key,()=>E.post(`/api/tasks/${e.tid}/continue-work`,{note:null}));if((p.verb==="reply"||p.verb==="redraft")&&e.mid)return s("draft",null,()=>E.post(`/api/messages/${e.mid}/reply`,{draft:!0,redraft:p.verb==="redraft",instruction:null}));if(p.verb==="prep"&&e.event)return s("prep",e.key,()=>E.post("/api/calendar/prep",{...e.event,instruction:"Get me ready for this meeting: who is in it, what came before it, what I should say."}));const O=await s(null,null,async()=>(await E.post("/api/concierge/propose",{verb:p.verb,key:e.key,table:!0})).data);if(!O)return null;const v=ut({proposal:O})||O;return v.auto?b({...v,verb:p.verb}):(g({...v,verb:p.verb}),null)},$=(I||[]).filter(p=>p.verb!=="next"&&!i.includes(p.verb));return!$.length&&!x?null:t.jsxs(l,{onClick:p=>p.stopPropagation(),children:[t.jsx(je,{children:"MORE MOVES"}),t.jsx(l,{sx:{display:"flex",gap:.5,flexWrap:"wrap"},children:$.map(p=>t.jsx(R,{disabled:!!r||!!x,onClick:A=>w(p,A==null?void 0:A.currentTarget),title:p.hint,children:p.label},p.verb))}),S&&t.jsx(qt,{task:{TaskId:e.tid||`idea-${e.idea}`,RemindAt:""},anchor:S,onClose:()=>C(null),path:e.kind==="idea"&&e.idea?`/api/assistant/ideas/${e.idea}/snooze`:void 0,onDone:p=>(p==null?void 0:p.remindAt)&&s("later",e.key,async()=>p)}),x&&t.jsxs(l,{sx:{mt:.8,p:1,borderRadius:"9px",border:`1px dashed ${o.gold}`,bgcolor:"rgba(240,192,90,.07)"},children:[t.jsx(f,{sx:{fontSize:12,color:o.ink},children:x.say||x.label}),t.jsxs(K,{children:[t.jsxs(R,{kind:"gold",disabled:!!r,onClick:()=>b(x),children:["Confirm - ",x.label]}),t.jsx(R,{onClick:()=>{E.delete(`/api/operations/${x.id}`).catch(()=>{}),g(null)},children:"Cancel"})]})]})]})}function wt({item:e}){return t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.7},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:11,fontWeight:800,color:o.dim},children:e.who||"—"}),e.channel&&t.jsxs(f,{sx:{fontSize:10,color:o.faint},children:["· ",e.channel]}),e.ref&&t.jsx(f,{sx:{..._,fontSize:10,color:o.faint},children:e.ref}),t.jsx(f,{sx:{fontSize:10,fontWeight:800,color:q(e)?o.red:o.faint,ml:"auto",letterSpacing:.5,whiteSpace:"nowrap"},children:ft(e.lane).word})]})}function Le({item:e,agents:i,busy:r,play:s,onOpenTask:a,onNavigate:u,onNext:y}){var B;const[I,z]=h.useState(""),[x,g]=h.useState(null),[S,C]=h.useState(null),b=Kt(e)||"message",w=ke(e,i),$=e.coding||e.kind==="coding"||w.kind==="coding",p=d=>s("dispatch",e.key,async()=>{const{data:j}=await E.post(`/api/messages/${e.mid}/dispatch`,{kind:d});if((j==null?void 0:j.dispatch)==="needs_repo")throw C({taskId:j.taskId,agent:j.agent||"coder"}),new Error("pick the repository it works in first");return j}),A=()=>s("approve",e.key,async()=>{const{data:d}=await E.post(`/api/messages/${e.mid}/reply`,{draft:!0,instruction:null});if(!(d!=null&&d.reviewId))throw new Error("no draft slot came back - try Draft a reply");const j=(await E.post(`/api/reviews/${d.reviewId}/decide`,{verb:"approve",final_text:x,note:null})).data;if(j!=null&&j.send_error)throw new Error(j.send_error);return j}),O=()=>s("answer",e.key,()=>E.post(`/api/tasks/${e.tid}/waitroom`,{text:I})).then(d=>d&&z("")),v=d=>a==null?void 0:a(d,{start:!1});let m=null,D=[];if(e.kind==="connection")m=t.jsxs(t.Fragment,{children:[e.why&&t.jsx(J,{text:e.why,cap:80}),t.jsx(K,{children:t.jsx(R,{kind:"gold",onClick:()=>{window.location.hash=`connector=${e.channel}`,u==null||u("Connections")},children:"🔌 Open the connection"})}),t.jsx(f,{sx:{fontSize:11,color:o.faint,mt:.5},children:"Once it answers again this clears by itself."})]});else if(b==="reply")D=["approve","redraft"],m=t.jsxs(t.Fragment,{children:[e.mid&&t.jsx(Te,{mid:e.mid}),t.jsx(Cn,{item:e,busy:r,play:s})]});else if(b==="agent"){D=["answer_agent"];const d=e.lane==="working";m=t.jsxs(t.Fragment,{children:[t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.5},children:e.paused?"Saved when Taskuary stopped - ready to pick up where it was.":d?"Back at it - nothing for you until it stops.":e.why}),e.tid&&!d&&t.jsx(vn,{tid:e.tid}),!e.paused&&!!e.request_id&&(e.choices||[]).length>0&&t.jsxs(t.Fragment,{children:[t.jsx(je,{children:"ITS QUESTION - PICK ONE"}),t.jsx(l,{sx:{display:"flex",flexDirection:"column",gap:.5},onClick:j=>j.stopPropagation(),children:e.choices.map(j=>t.jsxs(R,{kind:"mint",disabled:!!r,onClick:()=>s("answer",e.key,()=>E.post(`/api/tasks/${e.tid}/worker/answer`,{request_id:e.request_id,text:j})),children:[j," · +60"]},j))})]}),!e.paused&&!d&&e.tid&&t.jsxs(l,{sx:{display:"flex",gap:.5,mt:.8},onClick:j=>j.stopPropagation(),children:[t.jsx(l,{component:"input",value:I,onChange:j=>z(j.target.value),placeholder:e.asking?"Or answer in your own words…":"Tell it what to do next…",onKeyDown:j=>{j.key==="Enter"&&I.trim()&&O()},sx:{...Ee,py:.6}}),t.jsx(R,{kind:"gold",disabled:!!r||!I.trim(),onClick:O,children:"Answer · +60"})]}),t.jsxs(K,{children:[e.paused&&t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("resume",e.key,()=>E.post(`/api/tasks/${e.tid}/resume`)).then(j=>j&&v(e.tid)),children:"▶ Continue session · +15"}),e.tid&&t.jsx(R,{onClick:()=>v(e.tid),children:"⌨ Jump into the code space"})]})]})}else if(b==="meeting"){const d=e.event||{};D=["prep"],m=t.jsxs(t.Fragment,{children:[t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.5},children:[d.start&&`starts ${String(d.start).slice(11,16)}`,((B=d.who)==null?void 0:B.length)&&`with ${d.who.slice(0,6).join(", ")}`,d.where].filter(Boolean).join(" · ")}),d.about&&t.jsx(J,{text:d.about,cap:90}),t.jsxs(K,{children:[t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("prep",e.key,async()=>{const{data:j}=await E.post("/api/calendar/prep",{...d,instruction:"Get me ready for this meeting: who is in it, what came before it, what I should say."});return j!=null&&j.taskId&&v(j.taskId),j}),children:"🎯 Prep me · +20"}),d.join&&t.jsx(l,{component:"a",href:d.join,target:"_blank",rel:"noreferrer",onClick:j=>j.stopPropagation(),sx:{px:1.1,py:.55,borderRadius:"9px",bgcolor:o.mint,color:"#1c1f24",fontSize:11.5,fontWeight:800,textDecoration:"none"},children:"Join ↗"})]})]})}else if(b==="report")m=t.jsxs(t.Fragment,{children:[e.bad&&t.jsx(f,{sx:{fontSize:12,color:o.red,mt:.5},children:"The run failed - the cause is in the report."}),e.mid&&t.jsx(Te,{mid:e.mid})]});else if(b==="agentdone"||b==="wrapup")D=b==="agentdone"&&e.mid?["reply"]:[],m=t.jsxs(t.Fragment,{children:[e.sent&&t.jsx(J,{text:`You sent: ${e.sent}`,cap:80}),e.summary&&t.jsx(J,{text:e.summary,cap:100}),e.tid&&t.jsx(Tn,{tid:e.tid}),t.jsxs(K,{children:[b==="agentdone"&&e.mid&&t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("draft",e.key,()=>E.post(`/api/messages/${e.mid}/reply`,{draft:!0,instruction:null})),title:"Drafts an answer to the sender from what the agent found - nothing is sent",children:"✍ Reply from this · +20"}),e.tid&&t.jsxs(R,{onClick:()=>v(e.tid),children:["Open ",e.ref]})]})]});else if(b==="fyis")D=["done"],m=t.jsxs(t.Fragment,{children:[(e.items||[]).map(d=>t.jsxs(f,{sx:{fontSize:12,color:o.dim,mt:.4},children:["• ",t.jsx("b",{style:{color:o.ink},children:d.who})," - ",d.title,d.summary?` - ${d.summary}`:""]},d.key)),t.jsx(K,{children:t.jsx(R,{kind:"mint",disabled:!!r,onClick:()=>s("read",e.key,()=>E.post("/api/funnel/settle",{key:e.key,verb:"done"})),children:"☕ All read · +8"})})]});else if(b==="idea")D=[],m=t.jsxs(t.Fragment,{children:[e.why&&t.jsx(J,{text:e.why,cap:90}),e.mid&&t.jsx(Te,{mid:e.mid})]});else{const d=e.kind!=="fyi"&&e.lane!=="fyi";D=["reply","coder","regular_agent"],m=t.jsxs(t.Fragment,{children:[e.mid?t.jsx(Te,{mid:e.mid}):e.preview&&t.jsx(J,{text:e.preview,cap:90}),e.lane==="unjudged"&&t.jsx(K,{children:t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("sort",e.key,()=>E.post(`/api/messages/${e.mid}/retriage`,{})),children:"🔁 Try triage again · +10"})}),d&&e.mid&&t.jsxs(K,{children:[t.jsx(R,{kind:w.verb==="draft"?"gold":"ghost",disabled:!!r,onClick:()=>s("draft",e.key,()=>E.post(`/api/messages/${e.mid}/reply`,{draft:!0,instruction:null})),children:"✍ Draft a reply · +20"}),t.jsxs(R,{kind:w.verb==="dispatch"?"gold":"ghost",disabled:!!r,onClick:()=>p($?"coding":"general"),children:["🤖 Hand to ",$?"a coding agent":"an agent"," · +45"]}),t.jsx(R,{disabled:!!r,onClick:()=>g(j=>j==null?"":null),children:"✎ Write it myself"})]}),x!=null&&t.jsxs(l,{onClick:j=>j.stopPropagation(),children:[t.jsx(l,{component:"textarea",rows:4,value:x,onChange:j=>g(j.target.value),placeholder:"Your reply, sent as you write it",sx:{...Ee,mt:.8}}),t.jsx(K,{children:t.jsx(R,{kind:"gold",disabled:!!r||!x.trim(),onClick:A,children:"📨 Send mine · +40"})})]}),!e.mid&&e.tid&&t.jsx(K,{children:t.jsxs(R,{onClick:()=>v(e.tid),children:["Open ",e.ref]})})]})}return t.jsxs(l,{children:[m,S&&t.jsxs(l,{onClick:d=>d.stopPropagation(),sx:{mt:1,p:1,borderRadius:"9px",bgcolor:"#f6f2ea",color:"#262521"},children:[t.jsx(f,{sx:{fontSize:12,fontWeight:700,mb:.5},children:"Which repository should the coding agent use?"}),t.jsx(Ut,{taskId:S.taskId,agent:S.agent,onDone:d=>{d!=null&&d.repo&&(C(null),p("coding"))}})]}),t.jsx(jt,{item:e,covers:D,busy:r,play:s,onRepo:C}),t.jsxs(K,{children:[y&&t.jsxs(R,{kind:"mint",disabled:!!r,onClick:()=>y(e),title:"Read - on to the next thing (N)",children:["Next ▶ · +",(e.lane==="fyi"||e.lane==="report"||e.kind==="fyis")&&!e.bad?8:2]}),e.tid&&b!=="agent"&&b!=="agentdone"&&b!=="wrapup"&&e.mid&&t.jsxs(R,{onClick:()=>v(e.tid),children:["Open ",e.ref]})]})]})}const In=gt.lazy(()=>nn(()=>import("./GameScene-DEtfroOB.js"),__vite__mapDeps([0,1,2,3])));function zn(){const[e,i]=h.useState(()=>{try{return localStorage.getItem("taskuary.assistantGame.sound")!=="0"}catch{return!0}}),r=h.useRef(null),s=h.useCallback(u=>{if(e)try{r.current||(r.current=new(window.AudioContext||window.webkitAudioContext));const y=r.current,I=y.currentTime;u.forEach(([z,x,g=.09,S="square"])=>{const C=y.createOscillator(),b=y.createGain();C.type=S,C.frequency.value=z,b.gain.setValueAtTime(1e-4,I+x),b.gain.exponentialRampToValueAtTime(.05,I+x+.01),b.gain.exponentialRampToValueAtTime(1e-4,I+x+g),C.connect(b).connect(y.destination),C.start(I+x),C.stop(I+x+g+.02)})}catch{}},[e]);return{on:e,toggle:()=>i(u=>{try{localStorage.setItem("taskuary.assistantGame.sound",u?"0":"1")}catch{}return!u}),coin:()=>s([[988,0],[1319,.07,.16]]),level:()=>s([[523,0],[659,.1],[784,.2],[1047,.3,.3]]),whoosh:()=>s([[220,0,.12,"sine"],[330,.05,.12,"sine"]]),nope:()=>s([[196,0,.18,"sawtooth"]])}}const En={approve:{glyph:"✓",tone:"send"},fyi:{glyph:"i",tone:"info"},report:{glyph:"i",tone:"info"},broken:{glyph:"!",tone:"bad"},forgotten:{glyph:"?",tone:"ask"}},Rn=e=>En[e.lane]||(q(e)?{glyph:"!",tone:"need"}:null);function Wn({onOpenTask:e,onExit:i,onNavigate:r,active:s=!0}){var ot,st,rt;const[a,u]=h.useState(null),[y,I]=h.useState([]),[z,x]=h.useState(null),[g,S]=h.useState({}),[C,b]=h.useState(null),[w,$]=h.useState(Date.now()),[p,A]=h.useState([]),[O,v]=h.useState({topics:[],data:[]}),[m,D]=h.useState("all"),[B,d]=h.useState(null),[j,te]=h.useState([]),[U,we]=h.useState(()=>new Set),[F,le]=h.useState(()=>wn()),[St,_e]=h.useState([]),[vt,Tt]=h.useState([]),G=vt[0]||null,ne=n=>Tt(c=>n?c.some(T=>T.title===n.title&&T.kind===n.kind)?c:n.kind==="bottom"||n.kind==="gymclear"?[n,...c]:[...c,n]:c.slice(1)),[Ct,We]=h.useState(""),[It,Ge]=h.useState(!1),[oe,zt]=h.useState(!1),[Et,Ke]=h.useState([{who:"core",text:"I'm the Assistant Core. Ask me who should take what, or what to do next - I read the same pile you do."}]),Y=zn(),Rt=Qt("(min-width:900px)"),Ue=h.useRef(new Set),se=h.useRef(F),fe=h.useRef(p),qe=h.useRef(0);fe.current=p;const ue=h.useCallback(async()=>{const[n,c,T]=await Promise.all([E.get("/api/tasks",{params:{active:1}}).catch(()=>({data:{}})),E.get("/api/agents").catch(()=>({data:{}})),E.get("/api/settings").catch(()=>({data:{}}))]),k=(n.data.data||[]).filter(M=>M.Status!=="dropped");u(k.filter(M=>Zt(M.Kind))),te(k.filter(M=>M.Kind==="task"&&M.Status!=="done")),I(c.data.data||c.data.agents||[]);const W=(T.data.data||[]).find(M=>M.Name==="auto_sessions");x(M=>M??Math.max(1,Math.min(8,parseInt(W==null?void 0:W.Value,10)||4)))},[]),Q=h.useCallback(async()=>{var T,k,W;const[n,c]=await Promise.all([E.get("/api/funnel/pile").catch(()=>null),E.get("/api/hub").catch(()=>null)]);n&&A(((T=n.data)==null?void 0:T.items)||[]),c&&v({topics:((k=c.data)==null?void 0:k.topics)||[],data:((W=c.data)==null?void 0:W.data)||[]})},[]);h.useEffect(()=>{if(!s)return;ue(),Q();const n=lt("task-changed",ue),c=lt(["feed-changed","task-changed"],Q,{wait:1200,max:5e3});return()=>{n==null||n(),c==null||c()}},[s,ue,Q]),h.useEffect(()=>{const n=()=>E.get("/api/runs/live").then(({data:T})=>{S(Object.fromEntries((T.data||[]).map(k=>[k.TaskId,k])))}).catch(()=>{});if(!s)return;n();const c=setInterval(n,3e3);return()=>clearInterval(c)},[s]),h.useEffect(()=>s?ct(()=>$(Date.now()),3e4):void 0,[s]),h.useEffect(()=>s?ct(Q,2e4):void 0,[s,Q]);const[,Wt]=h.useReducer(n=>n+1,0);h.useEffect(()=>{if(!s)return;const n=setInterval(Wt,1e3);return()=>clearInterval(n)},[s]);const V=h.useMemo(()=>en(a||[],z??4),[a,z]),$t=h.useMemo(()=>(a||[]).filter(n=>n.Status==="open"&&!tn(n)&&!V.includes(n)),[a,V]),Ot=h.useMemo(()=>V.map(n=>n?{task:n,liveRow:g[n.TaskId]||null,state:xt(n,g[n.TaskId],y,w)}:null),[V,g,y,w]),Ye=h.useMemo(()=>p.filter(n=>!U.has(n.key)||q(n)),[p,U]),N=h.useMemo(()=>ie(Ye),[Ye]),Z=h.useMemo(()=>{const n=Object.fromEntries(N.gym.filter(k=>k.tid).map(k=>[k.tid,k])),c=j.map(k=>{var W;return{key:((W=n[k.TaskId])==null?void 0:W.key)||`task:${k.TaskId}`,task:k,item:n[k.TaskId]||null}}),T=new Set(j.map(k=>k.TaskId));return[...c,...N.gym.filter(k=>!T.has(k.tid)).map(k=>({key:k.key,task:null,item:k}))]},[j,N]),Mt=h.useMemo(()=>[...["meeting","coffee","archive"].flatMap(n=>N[n].filter(c=>c.kind!=="meeting").map(c=>({key:c.key,zone:n,sub:Ce(c),who:c.who||ft(c.lane).word,title:c.title,mark:Rn(c)}))),...Z.map(n=>{var k,W,M,P;const c=He(n.task),T=c.filter(L=>L.done).length;return{key:n.key,zone:"gym",who:((k=n.task)==null?void 0:k.ref)||((W=n.item)==null?void 0:W.ref)||"your task",title:((M=n.task)==null?void 0:M.Title)||((P=n.item)==null?void 0:P.title),mark:n.item&&q(n.item)?{glyph:"!",tone:"need"}:c.length?{glyph:`${T}/${c.length}`,tone:"send"}:null}})],[N,Z]),At=h.useMemo(()=>N.meeting.filter(n=>n.kind==="meeting"||n.lane==="time").map(n=>{var c;return{title:n.title,when:String(((c=n.event)==null?void 0:c.start)||n.when||"").slice(11,16)}}),[N]),Ve=h.useMemo(()=>({floor:N.floor.filter(q).length,gym:Z.length,meeting:N.meeting.filter(q).length,coffee:N.coffee.length,archive:N.archive.length,hq:0}),[N,Z]),xe=h.useMemo(()=>Object.fromEntries(p.map(n=>[n.key,n])),[p]),X=gn(p,U),$e=h.useRef(1);$e.current=Math.max($e.current,X,1);const Oe=h.useMemo(()=>bn(F,{approve:p.filter(n=>n.lane==="approve"||n.lane==="asked"&&n.mid).length,dispatch:p.filter(n=>ke(n,y).verb==="dispatch").length,read:p.filter(n=>(n.lane==="fyi"||n.lane==="report"||n.kind==="fyis")&&!n.bad&&!U.has(n.key)).length,rep:j.reduce((n,c)=>n+He(c).filter(T=>!T.done).length,0)}),[F,p,y,j,U]),Xe=h.useRef(Oe);Xe.current=Oe,h.useEffect(()=>{C&&!V.some(n=>(n==null?void 0:n.TaskId)===C)&&b(null)},[V,C]),h.useEffect(()=>{if(!s)return;const n=c=>{var k,W;if((W=(k=c.target)==null?void 0:k.closest)!=null&&W.call(k,"input, textarea, [contenteditable=true]")||c.metaKey||c.ctrlKey||c.altKey)return;const T=Ne.find(M=>M.hotkey===c.key);T?(c.preventDefault(),H(T.key)):(c.key==="n"||c.key==="N")&&xe[B]?(c.preventDefault(),et(xe[B])):c.key==="Escape"&&(c.preventDefault(),H("all"))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)});const re=n=>{const c=Math.random().toString(36).slice(2);_e(T=>[...T.slice(-3),{id:c,...n}]),setTimeout(()=>_e(T=>T.filter(k=>k.id!==c)),n.ms||2600)},H=(n,c=null)=>{n!==m&&Y.whoosh(),D(n),d(c)},ge=async(n,c,T)=>{We(c||n||"busy");try{const k=await T(),W=c?fe.current.filter(L=>L.key!==c||n==="draft"):fe.current;fe.current=W;const M={meeting:ie(W).meeting.filter(q).length,coffee:ie(W).coffee.length,quests:Xe.current};if(!n)return c&&A(W),k;const P=Fe(se.current,n,Date.now(),M);return se.current=P.state,le(P.state),Pe(P.state),P.gained>0&&(Y.coin(),re({kind:"xp",text:`+${P.gained} XP`,sub:`${yn[n]}${P.mult>1?` · combo x${P.mult}`:""}`})),P.quests.forEach(L=>re({kind:"quest",text:`Quest done +${L.xp}`,sub:L.label||L.says(L.n),ms:3600})),P.levelUp&&(Y.level(),ne({kind:"level",title:`Level ${P.levelUp.level}`,sub:P.levelUp.title})),P.unlocked.forEach(L=>{Y.level(),ne({kind:"trophy",title:L.name,sub:L.says})}),c&&A(W),d(L=>L===c&&n!=="draft"?null:L),Q(),ue(),k}catch(k){return Y.nope(),re({kind:"err",text:"Didn't land",sub:be(k),ms:4200}),null}finally{We("")}};h.useEffect(()=>{if(!G)return;const n=setTimeout(()=>ne(null),G.kind==="bottom"||G.kind==="gymclear"?4200:2600);return()=>clearTimeout(n)},[G]);const Dt=(n,c,T)=>ge(T,n.key,()=>E.post("/api/funnel/settle",{key:n.key,verb:c})),Ft=n=>(n.lane==="fyi"||n.lane==="report"||n.kind==="fyis")&&!n.bad,Pt=n=>{const c=fe.current.filter(k=>k.key!==n&&!Se.current.has(k.key)&&k.lane!=="working"),T=p.findIndex(k=>k.key===n);return c.find(k=>p.indexOf(k)>T)||c[0]||null},Se=h.useRef(U),[Nt,Bt]=h.useState(0),Je=(n,c,T)=>{var W;if(Bt(M=>M+1),Y.level(),(W=se.current.dayBy)!=null&&W[n]){ne({kind:n,title:c,sub:T});return}const k=Fe(se.current,n);se.current=k.state,le(k.state),Pe(k.state),ne({kind:n,title:`${c} · +${k.gained} XP`,sub:T}),k.unlocked.forEach(M=>ne({kind:"trophy",title:M.name,sub:M.says}))},Qe=h.useRef(null),Ze=h.useRef(null);h.useEffect(()=>{Qe.current>0&&X===0&&Je("bottom","Inbox Boss defeated","The bottom of the pile - everything seen, nothing left behind"),Qe.current=X},[X]),h.useEffect(()=>{Ze.current>0&&Z.length===0&&Je("gymclear","Gym cleared","Every one of your own tasks is done"),Ze.current=Z.length},[Z.length]);const et=async n=>{const c=Ft(n);if(await ge(c?"read":"next",c?n.key:null,()=>E.post("/api/funnel/settle",{key:n.key,verb:"surfaced",read:!0}))==null)return;Se.current=new Set([...Se.current,n.key]),we(Se.current);const k=Pt(n.key);if(!k){re({kind:"quest",text:"Pile walked ✦",sub:"nothing left you haven't seen"}),H("all");return}const W=ie([k]);H(Object.keys(W).find(M=>W[M].length),k.key)},tt=(n,c)=>{if(!Ue.current.has(n)){Ue.current.add(n);const T=Fe(se.current,"open");se.current=T.state,le(T.state),Pe(T.state),re({kind:"xp",text:`+${T.gained} XP`,sub:"Jumped into the code space"})}e(n,c)},Ht=async n=>{var M;if(!n.trim())return;Ke(P=>[...P,{who:"you",text:n}]);const c=B&&xe[B]?B:null,T=Date.now()-qe.current>6e4;T&&(qe.current=Date.now()),We("ask");const k=await ge(T?"ask":null,null,async()=>(await E.post("/api/concierge/say",{text:n,key:c})).data);if(!k)return;const W=k.item||(c?xe[c]:null);Ke(P=>[...P,{who:"core",text:k.say||"Done.",chips:k.chips||[],options:k.options||[],proposal:ut(k),item:W}]),((M=k.decision)==null?void 0:M.verb)==="reply"&&(W!=null&&W.mid)&&ge("draft",W.key,()=>E.post(`/api/messages/${W.mid}/reply`,{draft:!0,instruction:k.decision.text||null}))},Lt=async()=>{try{await navigator.clipboard.writeText(Sn(F)),re({kind:"info",text:"Run copied",sub:"counts only - no names, no subjects"})}catch{re({kind:"err",text:"Couldn't copy",sub:"your browser blocked the clipboard"})}};if(!a)return t.jsx(dt,{size:22,sx:{m:4}});const ce={picked:B,setPicked:d,agents:y,busy:Ct,play:ge,onOpenTask:tt,onNavigate:r,onNext:et},de=ye(F.xp),nt=Math.max(0,1-(Date.now()-F.lastAt)/mt),he=nt>0?F.combo:0,_t=V.filter(Boolean),Gt=V.filter(n=>!n).length,Me=Math.max(0,Math.round((Date.now()-(F.runStart||Date.now()))/1e3));return t.jsxs(l,{sx:{position:"relative",width:"100%",height:"calc(100vh - 84px)",minHeight:560,overflow:"hidden",borderRadius:"14px",background:"radial-gradient(ellipse at 50% 40%, #f7f2e9 0%, #e7dfd1 70%, #d9d0c0 100%)"},children:[t.jsx(l,{sx:{position:"absolute",inset:0},children:t.jsx(gt.Suspense,{fallback:t.jsx(l,{sx:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:t.jsx(dt,{size:22})}),children:t.jsx(In,{seats:Ot,selectedId:C,onSelect:n=>{b(n),H("floor")},focus:m,onZone:n=>H(n),npcs:Mt,cabinets:O.topics,picked:B,zoneCounts:Ve,onPick:n=>{const c=xe[n];if(c){const T=ie([c]);H(Object.keys(T).find(k=>T[k].length),n)}else n.startsWith("task:")&&H("gym",n)},onCabinet:n=>H("archive",n),onCore:()=>H("hq"),onExit:i,inset:Rt?{left:180,right:oe?0:344}:{left:0,right:0},active:s,meetings:At})})}),t.jsxs(l,{sx:{...pe,position:"absolute",zIndex:8,top:10,left:12,right:12,px:1.25,py:.6,display:"flex",alignItems:"center",gap:1.75,flexWrap:"wrap"},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:1.1,minWidth:210},children:[t.jsx(l,{sx:{width:40,height:40,borderRadius:"50%",display:"grid",placeItems:"center",flexShrink:0,background:`conic-gradient(${o.gold} ${de.pct*360}deg, rgba(255,255,255,.12) 0deg)`},children:t.jsx(l,{sx:{width:32,height:32,borderRadius:"50%",bgcolor:"#171b21",display:"grid",placeItems:"center",fontWeight:900,fontSize:14,color:o.gold},children:de.level})}),t.jsxs(l,{sx:{minWidth:0},children:[t.jsx(f,{sx:{fontSize:10,letterSpacing:1.4,color:o.faint,fontWeight:800,textTransform:"uppercase"},children:"Assistant game"}),t.jsx(f,{noWrap:!0,sx:{fontSize:14,fontWeight:800,color:o.ink},children:de.title}),t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.dim},children:[F.xp," XP · ",de.span-de.into," to Lv ",de.level+1]})]})]}),t.jsxs(l,{sx:{minWidth:92,textAlign:"center"},children:[t.jsxs(f,{sx:{fontSize:22,fontWeight:900,lineHeight:1,color:he>1?o.gold:o.faint,transform:he>1?`scale(${1+Math.min(he,6)*.04})`:"none",transition:"transform .2s"},children:["x",yt(Math.max(he,1))]}),t.jsx(l,{sx:{height:3,mt:.5,borderRadius:2,bgcolor:"rgba(255,255,255,.1)",overflow:"hidden"},children:t.jsx(l,{sx:{height:"100%",width:`${nt*100}%`,bgcolor:o.gold,transition:"width 1s linear"}})}),t.jsx(f,{sx:{fontSize:9.5,color:o.faint,letterSpacing:1,fontWeight:700,mt:.25},children:he>1?`${he} COMBO`:"COMBO"})]}),t.jsxs(l,{sx:{flex:"1 1 220px",minWidth:180},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"baseline",gap:1},children:[t.jsx(f,{sx:{fontSize:10,letterSpacing:1.3,fontWeight:800,color:o.red},children:"INBOX BOSS"}),t.jsx(f,{sx:{..._,fontSize:10.5,color:o.dim,ml:"auto"},children:X?`${X} to the bottom`:"defeated ✦ you're at the bottom"})]}),t.jsx(l,{sx:{height:9,mt:.5,borderRadius:5,bgcolor:"rgba(255,255,255,.08)",overflow:"hidden",border:`1px solid ${o.line}`},children:t.jsx(l,{sx:{height:"100%",width:`${X/$e.current*100}%`,transition:"width .6s cubic-bezier(.2,.9,.3,1.2)",background:X?"linear-gradient(90deg, #b04a5c, #e0697d)":o.green}})})]}),t.jsx(l,{sx:{display:{xs:"none",xl:"flex"},gap:.75},children:Oe.map(n=>{var k;const c=jn(F,n),T=(k=F.quests)==null?void 0:k.includes(n.key);return t.jsxs(l,{title:`+${n.xp} XP when done today`,sx:{px:1,py:.5,borderRadius:"9px",bgcolor:T?"rgba(143,207,143,.15)":o.card,border:`1px solid ${T?"rgba(143,207,143,.5)":o.line}`,minWidth:118},children:[t.jsxs(f,{noWrap:!0,sx:{fontSize:10.5,fontWeight:700,color:T?o.green:o.ink},children:[T?"✓ ":"",n.label]}),t.jsx(l,{sx:{height:3,mt:.4,borderRadius:2,bgcolor:"rgba(255,255,255,.1)"},children:t.jsx(l,{sx:{height:"100%",width:`${n.n?c/n.n*100:100}%`,borderRadius:2,bgcolor:T?o.green:o.mint}})})]},n.key)})}),t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.5},children:[t.jsxs(f,{title:"time since today's run started",sx:{..._,fontSize:12,color:o.dim,mr:.5},children:["⏱ ",Math.floor(Me/3600)?`${Math.floor(Me/3600)}h `:"",Math.floor(Me%3600/60),"m"]}),t.jsxs(me,{onClick:()=>Ge(n=>!n),title:"Trophies",children:["🏆 ",F.got.length,"/",ze.length]}),t.jsx(me,{onClick:Y.toggle,title:Y.on?"Sound on":"Sound off",children:Y.on?"🔊":"🔇"}),t.jsx(me,{onClick:Lt,title:"Copy your run to share - counts only",gold:!0,children:"Share run"}),t.jsx(me,{onClick:i,title:"Back to the Assistant's chat - the same items, as a conversation",children:"💬 Back to chat"})]})]}),t.jsxs(l,{sx:{position:"absolute",zIndex:7,left:12,top:84,display:"flex",flexDirection:"column",gap:.5,width:{xs:54,md:158}},children:[t.jsx(pt,{on:m==="all",onClick:()=>H("all"),k:"Esc",name:"Whole office"}),Ne.map(n=>t.jsx(pt,{on:m===n.key,onClick:()=>H(n.key),k:n.hotkey,name:n.name,n:Ve[n.key]},n.key))]}),t.jsxs(l,{sx:{...pe,position:"absolute",zIndex:7,right:12,top:84,width:{xs:"calc(100% - 90px)",sm:320},maxHeight:oe?"none":"calc(100% - 100px)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[t.jsxs(l,{onClick:()=>zt(n=>!n),title:oe?"Open the panel":"Fold the panel",sx:{display:"flex",alignItems:"center",gap:1,px:1.4,py:.9,cursor:"pointer",borderBottom:oe?"none":`1px solid ${o.line}`},children:[t.jsx(l,{sx:{..._,px:.6,borderRadius:"5px",fontSize:10,fontWeight:800,bgcolor:"rgba(240,192,90,.15)",color:o.gold},children:m==="all"?"Esc":(ot=Ae(m))==null?void 0:ot.hotkey}),t.jsxs(l,{sx:{minWidth:0,flex:1},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:13.5,fontWeight:900},children:m==="all"?"Briefing":(st=Ae(m))==null?void 0:st.name}),!oe&&t.jsx(f,{noWrap:!0,sx:{fontSize:10.5,color:o.faint},children:m==="all"?"who should take what":(rt=Ae(m))==null?void 0:rt.blurb})]}),t.jsx(f,{sx:{fontSize:14,color:o.dim},children:oe?"▾":"▴"})]}),t.jsxs(l,{sx:{overflowY:"auto",minHeight:0,px:1,py:.9,display:oe?"none":"block"},children:[m==="all"&&t.jsx(On,{pile:p,agents:y,hp:X,passed:U,onGo:n=>{const c=ie([n]);H(Object.keys(c).find(T=>c[T].length),n.key)}}),m==="floor"&&t.jsx(Mn,{seated:_t,queue:$t,live:g,agents:y,clock:w,pick:C,setPick:b,...ce,items:N.floor,onJump:tt,cap:z,setCap:x,free:Gt,desks:V}),m==="meeting"&&t.jsx(An,{...ce,items:N.meeting}),m==="gym"&&t.jsx(Dn,{...ce,gym:Z,reload:()=>{ue(),Q()}}),m==="coffee"&&t.jsx(Fn,{...ce,items:N.coffee,onSettle:Dt}),m==="archive"&&t.jsx(Pn,{...ce,ghosts:N.archive,hub:O,reload:Q}),m==="hq"&&t.jsx(Nn,{chat:Et,onAsk:Ht,...ce,pile:p,onGo:n=>{const c=ie([n]);H(Object.keys(c).find(T=>c[T].length),n.key)}})]})]}),t.jsx(l,{sx:{position:"absolute",zIndex:9,top:88,left:"50%",transform:"translateX(-50%)",display:"flex",flexDirection:"column",alignItems:"center",gap:.6,pointerEvents:"none"},children:St.map(n=>t.jsxs(l,{sx:{...pe,px:1.6,py:.8,display:"flex",alignItems:"baseline",gap:1,animation:"sgPop .35s cubic-bezier(.2,.9,.3,1.4)",borderColor:n.kind==="err"?o.red:n.kind==="quest"?o.green:n.kind==="xp"?o.gold:o.line,"@keyframes sgPop":{from:{opacity:0,transform:"translateY(-10px) scale(.9)"},to:{opacity:1,transform:"none"}}},children:[t.jsx(f,{sx:{fontWeight:900,fontSize:n.kind==="xp"?18:14,color:n.kind==="err"?o.red:n.kind==="quest"?o.green:o.gold},children:n.text}),t.jsx(f,{sx:{fontSize:12,color:o.dim,maxWidth:360},noWrap:!0,children:n.sub})]},n.id))}),t.jsx(Bn,{burst:Nt}),G&&t.jsx(l,{onClick:()=>ne(null),sx:{position:"absolute",inset:0,zIndex:10,display:"grid",placeItems:"center",cursor:"pointer",background:"radial-gradient(circle, rgba(20,24,30,.35), rgba(20,24,30,0) 60%)"},children:t.jsxs(l,{sx:{...pe,px:5,py:3,textAlign:"center",borderColor:o.gold,animation:"sgBoom .5s cubic-bezier(.2,.9,.3,1.5)","@keyframes sgBoom":{from:{opacity:0,transform:"scale(.6) rotate(-3deg)"},to:{opacity:1,transform:"none"}}},children:[t.jsx(f,{sx:{fontSize:11,letterSpacing:3,color:o.gold,fontWeight:900},children:G.kind==="level"?"LEVEL UP":G.kind==="bottom"?"BOTTOM OF THE PILE":G.kind==="gymclear"?"EVERY SET DONE":"TROPHY UNLOCKED"}),t.jsxs(f,{sx:{fontSize:34,fontWeight:900},children:[G.kind==="level"?"⬆ ":G.kind==="bottom"?"⚔ ":G.kind==="gymclear"?"💪 ":"🏆 ",G.title]}),t.jsx(f,{sx:{fontSize:14,color:o.dim},children:G.sub})]})}),It&&t.jsxs(l,{sx:{...pe,position:"absolute",zIndex:9,top:84,left:{xs:12,md:180},width:300,maxHeight:"calc(100% - 110px)",overflowY:"auto",p:1.5},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",mb:1},children:[t.jsx(f,{sx:{fontWeight:900,flex:1},children:"Trophies"}),t.jsx(me,{onClick:()=>Ge(!1),children:"Close"})]}),ze.map(n=>{const c=F.got.includes(n.key);return t.jsxs(l,{sx:{display:"flex",gap:1,alignItems:"center",py:.7,opacity:c?1:.45},children:[t.jsx(l,{sx:{fontSize:20,filter:c?"none":"grayscale(1)"},children:"🏆"}),t.jsxs(l,{children:[t.jsx(f,{sx:{fontSize:12.5,fontWeight:800},children:n.name}),t.jsx(f,{sx:{fontSize:11,color:o.dim},children:n.says})]})]},n.key)}),t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.faint,mt:1},children:[F.moves," moves · best combo x",F.best," · ",F.today," XP today"]})]})]})}function me({children:e,onClick:i,title:r,gold:s}){return t.jsx(l,{component:"button",type:"button",onClick:i,title:r,sx:{border:`1px solid ${s?o.gold:o.line}`,bgcolor:s?o.gold:o.card,color:s?"#1c1f24":o.ink,borderRadius:"9px",px:1.1,py:.55,fontSize:12,fontWeight:800,cursor:"pointer",whiteSpace:"nowrap","&:hover":{filter:"brightness(1.15)"}},children:e})}function pt({on:e,onClick:i,k:r,name:s,n:a}){return t.jsxs(l,{component:"button",type:"button",onClick:i,title:s,sx:{...pe,display:"flex",alignItems:"center",gap:.8,px:.8,py:.5,cursor:"pointer",textAlign:"left",borderRadius:"10px",bgcolor:e?o.gold:o.bg,color:e?"#1c1f24":o.ink,borderColor:e?o.gold:o.line,transition:"transform .12s","&:hover":{transform:"translateX(3px)"}},children:[t.jsx(l,{sx:{..._,minWidth:26,height:22,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:10.5,fontWeight:800,bgcolor:e?"rgba(0,0,0,.15)":"rgba(255,255,255,.08)"},children:r}),t.jsx(f,{noWrap:!0,sx:{display:{xs:"none",md:"block"},fontSize:12,fontWeight:800,flex:1},children:s}),!!a&&t.jsx(l,{sx:{display:{xs:"none",md:"block"},px:.7,borderRadius:99,bgcolor:"#b04a5c",color:"#fff",fontSize:10.5,fontWeight:800},children:a})]})}function ee({on:e,onClick:i,children:r,accent:s}){return t.jsx(l,{onClick:i,sx:{mb:.9,p:1.15,borderRadius:"11px",cursor:i?"pointer":"default",bgcolor:e?"rgba(240,192,90,.08)":o.card,border:`1px solid ${e?o.gold:o.line}`,borderLeft:`3px solid ${s||(e?o.gold:"transparent")}`,"&:hover":i?{borderColor:e?o.gold:"rgba(255,255,255,.25)"}:{}},children:r})}const $n=({item:e,agents:i})=>{const r=ke(e,i);return t.jsx(l,{sx:{mt:.8,px:1,py:.6,borderRadius:"8px",bgcolor:"rgba(127,209,198,.08)",border:"1px dashed rgba(127,209,198,.35)"},children:t.jsxs(f,{sx:{fontSize:11,color:o.mint},children:["✦ Best match: ",t.jsx("b",{children:r.who})," — ",r.why]})})};function Re({items:e,picked:i,setPicked:r,agents:s,busy:a,play:u,onOpenTask:y,onNavigate:I,onNext:z,accent:x}){return e.map(g=>{const S=i===g.key;return t.jsxs(ee,{on:S,onClick:()=>r(S?null:g.key),accent:(x==null?void 0:x(g))||(q(g)?o.red:null),children:[t.jsx(wt,{item:g}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:g.title}),!S&&(g.preview||g.why)&&t.jsx(f,{noWrap:!0,sx:{fontSize:11.5,color:o.faint,mt:.2},children:g.preview||g.why}),S&&t.jsxs(t.Fragment,{children:[t.jsx($n,{item:g,agents:s}),t.jsx(Le,{item:g,agents:s,busy:a,play:u,onOpenTask:y,onNavigate:I,onNext:z})]})]},g.key)})}function On({pile:e,agents:i,onGo:r,hp:s,passed:a}){const u=e.filter(x=>x.lane!=="working"&&!x.surfaced&&!a.has(x.key)),y=e.filter(x=>q(x)&&!u.includes(x));if(!e.length)return t.jsx(ae,{text:"Nothing is waiting anywhere in the office. Inbox Boss defeated - go get a coffee."});const I=(x,g)=>{const S=ke(x,i);return t.jsxs(ee,{onClick:()=>r(x),accent:g,children:[t.jsx(wt,{item:x}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:x.title}),t.jsxs(f,{sx:{fontSize:11,color:o.mint,mt:.4},children:["✦ ",S.who," · ",S.why]})]},x.key)},z=(x,g)=>t.jsx(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:g,px:.5,mb:.6,mt:.4},children:x});return t.jsxs(t.Fragment,{children:[s>0?t.jsxs(t.Fragment,{children:[z(`⚔ NOT SEEN YET · ${s} TO THE BOTTOM`,o.red),u.slice(0,4).map(x=>I(x,o.red)),u.length>4&&t.jsxs(f,{sx:{fontSize:11.5,color:o.faint,px:.5,mb:1},children:["+",u.length-4," more - press N on any of them to walk the lot"]})]}):t.jsxs(l,{sx:{mb:1,p:1.1,borderRadius:"11px",bgcolor:"rgba(143,207,143,.1)",border:"1px solid rgba(143,207,143,.4)"},children:[t.jsx(f,{sx:{fontSize:13,fontWeight:900,color:o.green},children:"⚔ You're at the bottom"}),t.jsxs(f,{sx:{fontSize:11.5,color:o.dim},children:["Everything has been seen. ",y.length?"What is left is still yours to settle:":"Nothing is left on you."]})]}),y.length>0&&t.jsxs(t.Fragment,{children:[s>0&&z(`SEEN, STILL ON YOU · ${y.length}`,o.gold),y.slice(0,4).map(x=>I(x,o.gold))]})]})}function Mn({seated:e,queue:i,live:r,agents:s,clock:a,pick:u,setPick:y,items:I,busy:z,play:x,onJump:g,onOpenTask:S,onNavigate:C,onNext:b,picked:w,setPicked:$,cap:p,setCap:A,free:O,desks:v}){const m=new Set(e.map(d=>d.TaskId)),D=I.filter(d=>!(d.lane==="working"&&m.has(d.tid))),B=Object.fromEntries(I.filter(d=>d.tid).map(d=>[d.tid,d]));return t.jsxs(t.Fragment,{children:[D.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.red,px:.5,mb:.6},children:["ON THE FLOOR FOR YOU · ",D.length]}),t.jsx(Re,{items:D,picked:w,setPicked:$,agents:s,busy:z,play:x,onOpenTask:S,onNavigate:C,onNext:b})]}),t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,px:.5,mb:.6,mt:D.length?1.2:0},children:["AT THE DESKS · ",e.length]}),e.map(d=>{var F,le;const j=r[d.TaskId],te=xt(d,j,s,a),U=u===d.TaskId,we=B[d.TaskId];return t.jsxs(ee,{on:U,onClick:()=>y(U?null:d.TaskId),accent:te.tone==="waiting"?o.red:o.green,children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.7},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:11,fontWeight:800,color:te.tone==="waiting"?o.red:o.green},children:te.agent}),t.jsx(f,{sx:{..._,fontSize:10,color:o.faint,ml:"auto"},children:d.ref}),d.Waiting>0&&t.jsxs(f,{sx:{..._,fontSize:10,color:o.gold,fontWeight:700},title:`${d.Waiting} queued prompt${d.Waiting===1?"":"s"} waiting in the funnel`,children:["✎ ",d.Waiting]})]}),t.jsx(f,{noWrap:!0,sx:{fontSize:13,fontWeight:700,pt:.3},children:d.Title}),t.jsx(f,{sx:{fontSize:11,color:o.dim,pt:.2},children:te.label}),((j==null?void 0:j.work)||(j==null?void 0:j.promptPending))&&t.jsx(l,{sx:{pt:.5,bgcolor:"#f6f2ea",borderRadius:"6px",px:.75,pb:.5,mt:.5},children:t.jsx(on,{work:j.work,who:te.agent,waiting:j.kind==="session"&&sn(j),asking:j.asking,state:j.state,detail:(F=j.request)==null?void 0:F.text,startedAt:j.StartedAt,promptPending:j.promptPending})}),((le=j==null?void 0:j.files)==null?void 0:le.length)>0&&t.jsx(l,{sx:{pt:.6},children:t.jsx(rn,{files:j.files})}),U&&(we?t.jsx(Le,{item:we,agents:s,busy:z,play:x,onOpenTask:S,onNavigate:C,onNext:b}):t.jsx(l,{sx:{display:"flex",gap:.6,mt:.9},children:t.jsx(R,{kind:"gold",onClick:()=>g(d.TaskId),children:"⌨ Jump into the code space"})}))]},d.TaskId)}),!e.length&&t.jsx(ae,{text:"The desks are quiet. New work will bring an agent to one."}),i.length>0&&t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,px:.5,mt:1.2,mb:.6},children:["WAITING FOR A DESK · ",i.length]}),i.slice(0,6).map(d=>t.jsxs(ee,{onClick:()=>g(d.TaskId),children:[t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.faint},children:[d.ref,d.Waiting>0?` · ✎ ${d.Waiting}`:""]}),t.jsx(f,{noWrap:!0,sx:{fontSize:12.5,color:o.dim},children:d.Title})]},d.TaskId)),i.length>6&&t.jsxs(f,{sx:{fontSize:11,color:o.faint,px:.5},children:["+",i.length-6," more waiting"]}),t.jsxs(l,{sx:{mt:1.5,px:.5},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"baseline",gap:.75},children:[t.jsx(f,{sx:{fontSize:11.5,color:o.dim,flex:1},children:"Desks (agents at once)"}),t.jsx(f,{sx:{..._,fontSize:13,fontWeight:800},children:p??"—"}),t.jsxs(f,{sx:{fontSize:11,color:o.faint},children:[O," free of ",v.length]})]}),t.jsx(an,{size:"small",min:1,max:8,step:1,marks:!0,value:p??4,onChange:(d,j)=>A(j),onChangeCommitted:(d,j)=>E.patch("/api/settings",{name:"auto_sessions",value:String(j)}).catch(()=>{}),sx:{mt:.25,color:o.gold}})]})]})}const He=e=>{try{const i=JSON.parse((e==null?void 0:e.Checklist)||"[]");return Array.isArray(i)?i.filter(r=>r&&r.text):[]}catch{return[]}};function An({items:e,...i}){return e.length?[["📅 COMING UP",e.filter(s=>s.kind==="meeting"||s.lane==="time"),"#7fd1c6"],["✉ EMAIL · AT THE TABLE",e.filter(s=>s.kind!=="meeting"&&s.lane!=="time"&&Ce(s)==="email"),"#f0c05a"],["💬 CHAT · IN THE HUDDLE",e.filter(s=>s.kind!=="meeting"&&s.lane!=="time"&&Ce(s)==="chat"),"#b9c3ff"],["🔧 FROM YOUR TOOLS",e.filter(s=>s.kind!=="meeting"&&s.lane!=="time"&&Ce(s)==="tool"),"#aeb6bf"]].filter(([,s])=>s.length).map(([s,a,u],y)=>t.jsxs(l,{sx:{mt:y?1.2:0},children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:u,px:.5,mb:.6},children:[s," · ",a.length]}),t.jsx(Re,{...i,items:a})]},s)):t.jsx(ae,{text:"The meeting room is empty. Nobody is waiting on you."})}function Dn({gym:e,picked:i,setPicked:r,busy:s,play:a,reload:u,onOpenTask:y,onNext:I,...z}){if(!e.length)return t.jsx(ae,{text:"No tasks of your own. Rest day."});const x=(S,C)=>a(C.done?null:"rep",null,async()=>{const{data:b}=await E.patch(`/api/tasks/${S.TaskId}/checklist/${C.id}`,{done:!C.done});return b!=null&&b.closed&&await a("set",null,async()=>!0),u(),b}),g=S=>{var C;return a("set",((C=S.item)==null?void 0:C.key)||null,async()=>{const b=await ln(E,"task.complete",S.task.TaskId);return u(),b||!0})};return e.map(S=>{var A,O,v,m,D,B;const C=i===S.key,b=He(S.task),w=b.filter(d=>d.done).length,$=((A=S.task)==null?void 0:A.Title)||((O=S.item)==null?void 0:O.title),p=((v=S.task)==null?void 0:v.ref)||((m=S.item)==null?void 0:m.ref);return t.jsxs(ee,{on:C,onClick:()=>r(C?null:S.key),accent:S.item&&q(S.item)?o.red:o.gold,children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.7},children:[t.jsxs(f,{sx:{fontSize:11,fontWeight:800,color:o.gold},children:["🏋 ",p]}),b.length>0&&t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.dim,ml:"auto"},children:[w,"/",b.length," reps"]})]}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:$}),b.length>0&&t.jsx(l,{sx:{height:5,mt:.6,borderRadius:3,bgcolor:"rgba(255,255,255,.08)",overflow:"hidden"},children:t.jsx(l,{sx:{height:"100%",width:`${w/b.length*100}%`,bgcolor:w===b.length?o.green:o.gold,transition:"width .4s"}})}),C&&t.jsxs(l,{onClick:d=>d.stopPropagation(),children:[((D=S.task)==null?void 0:D.Summary)&&t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.7,whiteSpace:"pre-wrap"},children:S.task.Summary}),b.length>0&&t.jsx(l,{sx:{mt:.8},children:b.map(d=>t.jsxs(l,{component:"button",type:"button",disabled:!!s||!d.id,onClick:()=>x(S.task,d),sx:{display:"flex",alignItems:"center",gap:.8,width:"100%",textAlign:"left",border:0,bgcolor:"transparent",color:o.ink,px:.4,py:.45,borderRadius:"6px",cursor:"pointer","&:hover":{bgcolor:o.card}},children:[t.jsx(l,{sx:{width:16,height:16,borderRadius:"4px",flexShrink:0,display:"grid",placeItems:"center",fontSize:11,fontWeight:900,border:`2px solid ${d.done?o.green:o.faint}`,bgcolor:d.done?o.green:"transparent",color:"#1c1f24"},children:d.done?"✓":""}),t.jsx(f,{sx:{fontSize:12.5,color:d.done?o.faint:o.ink,textDecoration:d.done?"line-through":"none",flex:1},children:d.text}),!d.done&&t.jsx(f,{sx:{fontSize:10.5,color:o.gold,fontWeight:800},children:"+5"})]},d.id||d.text))}),S.item&&t.jsx(Le,{item:S.item,agents:z.agents,busy:s,play:a,onOpenTask:y,onNavigate:z.onNavigate,onNext:I}),t.jsxs(l,{sx:{display:"flex",gap:.5,mt:.9,flexWrap:"wrap"},children:[S.task&&t.jsx(R,{kind:"gold",disabled:!!s,onClick:()=>g(S),title:"Closes the task - every box on it is ticked",children:"🏁 Finish the set · +30"}),(S.task||((B=S.item)==null?void 0:B.tid))&&t.jsxs(R,{onClick:()=>y((S.task||S.item).TaskId||S.item.tid),children:["Open ",p]})]})]})]},S.key)})}function Fn({items:e,onSettle:i,...r}){if(!e.length)return t.jsx(ae,{text:"The pot is empty and so is the room. Nothing to catch up on."});const s=y=>(y.lane==="fyi"||y.lane==="report"||y.kind==="fyis")&&!y.bad,a=async()=>{for(const y of e)s(y)?await i(y,"done","read"):await r.play("next",y.key,()=>E.post("/api/funnel/settle",{key:y.key,verb:"surfaced",read:!0}))},u=e.filter(y=>!s(y)).length;return t.jsxs(t.Fragment,{children:[e.length>1&&t.jsx(l,{sx:{mb:1},children:t.jsxs(R,{kind:"mint",disabled:!!r.busy,onClick:a,title:u?`${u} broken - set aside until its error changes, never marked fixed`:void 0,children:["☕ Drain the pot - all ",e.length]})}),t.jsx(Re,{...r,items:e,accent:y=>y.lane==="broken"||y.bad?o.red:o.mint})]})}function Pn({ghosts:e,hub:i,picked:r,setPicked:s,busy:a,play:u,reload:y,...I}){var v;const[z,x]=h.useState(null),[g,S]=h.useState(null),C=h.useRef(new Set),b=h.useRef(new Set),w=((v=i.topics.find(m=>m.Topic===r))==null?void 0:v.Topic)||null;h.useEffect(()=>{if(!w){x(null);return}E.get("/api/hub",{params:{topic:w}}).then(({data:m})=>x(m.data||[])).catch(()=>x(i.data.filter(m=>m.Topic===w)))},[w,i.data]);const $=m=>{C.current.has(m.LoreId)||(C.current.add(m.LoreId),u("pull",null,async()=>!0))},p=m=>{b.current.has(m.LoreId)||(b.current.add(m.LoreId),u("vote",null,()=>E.post(`/api/hub/${m.LoreId}/vote?up=true`)))},A=async()=>{await u("file",null,()=>E.post("/api/hub",{title:g.title.trim(),body:g.body.trim(),topic:g.topic.trim(),kind:"new_idea"}))&&(S(null),y())},O={width:"100%",boxSizing:"border-box",bgcolor:"rgba(0,0,0,.25)",color:o.ink,border:`1px solid ${o.line}`,borderRadius:"8px",p:.9,fontSize:12.5,fontFamily:"inherit",mb:.6};return t.jsxs(t.Fragment,{children:[e.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:"#b9c3ff",px:.5,mb:.6},children:["👻 GHOSTS · THREADS THAT SLIPPED · ",e.length]}),t.jsx(Re,{...I,items:e,picked:r,setPicked:s,busy:a,play:u,accent:()=>"#b9c3ff"})]}),t.jsxs(l,{sx:{display:"flex",alignItems:"center",px:.5,mt:e.length?1.4:0,mb:.6},children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,flex:1},children:["🗄 FILING CABINETS · THE HUB · ",i.topics.length]}),t.jsx(R,{kind:"mint",onClick:()=>S({title:"",body:"",topic:w||""}),children:"+ File a lesson"})]}),g&&t.jsxs(ee,{on:!0,children:[t.jsx(l,{component:"input",placeholder:"What did we learn? (title)",value:g.title,onChange:m=>S({...g,title:m.target.value}),sx:O}),t.jsx(l,{component:"textarea",rows:4,placeholder:"The lesson, so the next person (or agent) doesn't relearn it",value:g.body,onChange:m=>S({...g,body:m.target.value}),sx:O}),t.jsx(l,{component:"input",placeholder:"cabinet (topic)",value:g.topic,onChange:m=>S({...g,topic:m.target.value}),sx:O}),t.jsxs(l,{sx:{display:"flex",gap:.6},children:[t.jsx(R,{kind:"gold",disabled:!!a||!g.title.trim()||!g.body.trim()||!g.topic.trim(),onClick:A,children:"🗂 File it · +25"}),t.jsx(R,{onClick:()=>S(null),children:"Cancel"})]})]}),t.jsxs(l,{sx:{display:"flex",flexWrap:"wrap",gap:.6,mb:1},children:[i.topics.map(m=>t.jsxs(l,{component:"button",type:"button",onClick:()=>s(m.Topic===r?null:m.Topic),sx:{..._,border:`1px solid ${m.Topic===r?o.gold:o.line}`,bgcolor:m.Topic===r?"rgba(240,192,90,.12)":o.card,color:o.ink,borderRadius:"8px",px:1,py:.5,fontSize:11.5,cursor:"pointer"},children:["🗄 ",m.Topic," ",t.jsx("span",{style:{color:o.faint},children:m.n})]},m.Topic)),!i.topics.length&&t.jsx(ae,{text:"The cabinets are empty. File the first lesson."})]}),w&&(z||[]).map(m=>t.jsxs(ee,{onClick:()=>$(m),children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.6},children:[t.jsx(f,{sx:{fontSize:10.5,fontWeight:800,color:o.dim},children:m.Author}),t.jsxs(f,{sx:{..._,fontSize:10,color:o.faint,ml:"auto"},children:["▲ ",m.Score+(b.current.has(m.LoreId)?1:0)]})]}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:m.Title}),t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.4},children:m.Body}),t.jsx(l,{sx:{mt:.7},children:t.jsx(R,{disabled:b.current.has(m.LoreId)||!!a,onClick:()=>p(m),children:"👍 Useful · +10"})})]},m.LoreId))]})}function Nn({chat:e,onAsk:i,busy:r,play:s,pile:a,agents:u,picked:y,onGo:I}){const[z,x]=h.useState(""),g=h.useRef(null);h.useEffect(()=>{var w;(w=g.current)==null||w.scrollIntoView({block:"end"})},[e.length]);const S=w=>{i(w),x("")},C=a.filter(w=>q(w)||w.kind==="agent").slice(0,5),b=a.find(w=>w.key===y);return t.jsxs(t.Fragment,{children:[t.jsxs(l,{sx:{mb:1},children:[e.map((w,$)=>{var p,A,O;return t.jsxs(l,{sx:{display:"flex",flexDirection:"column",alignItems:w.who==="you"?"flex-end":"flex-start",mb:.6},children:[t.jsx(l,{sx:{maxWidth:"88%",px:1.1,py:.7,borderRadius:w.who==="you"?"11px 11px 2px 11px":"11px 11px 11px 2px",bgcolor:w.who==="you"?o.gold:"rgba(127,209,198,.12)",color:w.who==="you"?"#1c1f24":o.ink,border:w.who==="you"?"none":"1px solid rgba(127,209,198,.3)"},children:t.jsx(f,{sx:{fontSize:12.5,whiteSpace:"pre-wrap"},children:w.text})}),w.who==="core"&&$===e.length-1&&t.jsxs(l,{sx:{maxWidth:"94%",width:"100%"},children:[w.item&&t.jsx(l,{sx:{mt:.5},children:t.jsxs(R,{kind:"mint",onClick:()=>I(w.item),children:["Go to it → ",w.item.title]})}),!!((p=w.options)!=null&&p.length)&&t.jsx(l,{sx:{display:"flex",gap:.5,flexWrap:"wrap",mt:.5},children:w.options.map(v=>t.jsx(R,{disabled:!!r,onClick:()=>S(v),children:v},v))}),(!!((A=w.chips)!=null&&A.length)||w.proposal)&&((O=w.item)==null?void 0:O.key)&&t.jsx(jt,{item:w.item,given:w.chips,initial:w.proposal,busy:r,play:s})]})]},$)}),r==="busy"&&t.jsx(f,{sx:{fontSize:11.5,color:o.mint,px:.5},children:"✦ thinking…"}),t.jsx("div",{ref:g})]}),b&&t.jsxs(f,{sx:{fontSize:11,color:o.faint,mb:.5},children:["Asking about: ",t.jsx("b",{style:{color:o.dim},children:b.title})]}),t.jsx(l,{sx:{display:"flex",gap:.5,flexWrap:"wrap",mb:.8},children:["What should I do next?","Who should take the top thing?","What's slipping?"].map(w=>t.jsx(R,{disabled:!!r,onClick:()=>S(w),children:w},w))}),t.jsxs(l,{component:"form",onSubmit:w=>{w.preventDefault(),z.trim()&&S(z)},sx:{display:"flex",gap:.6,mb:1.5},children:[t.jsx(l,{component:"input",value:z,onChange:w=>x(w.target.value),placeholder:"Ask the core…",sx:{flex:1,bgcolor:"rgba(0,0,0,.25)",color:o.ink,border:`1px solid ${o.line}`,borderRadius:"9px",px:1,py:.7,fontSize:12.5,fontFamily:"inherit"}}),t.jsx(R,{kind:"mint",disabled:!!r||!z.trim(),onClick:()=>S(z),children:"Ask"})]}),t.jsx(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,px:.5,mb:.6},children:"✦ MATCHMAKER · WHO SHOULD TAKE WHAT"}),C.map(w=>{const $=ke(w,u);return t.jsxs(ee,{onClick:()=>I(w),children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.8},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:12.5,fontWeight:700,flex:1},children:w.title}),t.jsxs(f,{sx:{fontSize:11,fontWeight:800,color:$.who==="you"?o.gold:o.mint,whiteSpace:"nowrap"},children:["→ ",$.who]})]}),t.jsxs(f,{sx:{fontSize:11,color:o.faint},children:[w.who," · ",$.why]})]},w.key)}),!C.length&&t.jsx(ae,{text:"Nothing to match. Everyone has what they need."})]})}function Bn({burst:e}){const i=h.useRef(null);return h.useEffect(()=>{const r=i.current;if(!e||!r||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const s=r.getContext("2d"),a=Math.min(window.devicePixelRatio||1,2),u=r.clientWidth,y=r.clientHeight;r.width=u*a,r.height=y*a,s.scale(a,a);const I=[o.gold,o.mint,o.red,"#b9c3ff",o.green,"#ffffff"],z=Array.from({length:280},()=>({x:Math.random()*u,y:-10-Math.random()*y*.35,vx:(Math.random()-.5)*120,vy:160+Math.random()*260,r:Math.random()*Math.PI,vr:(Math.random()-.5)*12,s:6+Math.random()*8,c:I[Math.floor(Math.random()*I.length)],round:Math.random()<.25})),x=performance.now();let g=0,S=x;const C=b=>{const w=(b-x)/1e3,$=Math.min(.1,(b-S)/1e3);S=b,s.clearRect(0,0,u,y),s.globalAlpha=Math.max(0,Math.min(1,4.2-w));for(const p of z)p.x+=(p.vx+Math.sin(b/400+p.r)*40)*$,p.y+=p.vy*$,p.r+=p.vr*$,s.save(),s.translate(p.x,p.y),s.rotate(p.r),s.fillStyle=p.c,p.round?(s.beginPath(),s.arc(0,0,p.s/2.5,0,Math.PI*2),s.fill()):s.fillRect(-p.s/2,-p.s/4,p.s,p.s/2),s.restore();w<4.2?g=requestAnimationFrame(C):s.clearRect(0,0,u,y)};return g=requestAnimationFrame(C),()=>cancelAnimationFrame(g)},[e]),t.jsx(l,{component:"canvas",ref:i,sx:{position:"absolute",inset:0,width:"100%",height:"100%",zIndex:11,pointerEvents:"none"}})}const ae=({text:e})=>t.jsx(f,{sx:{fontSize:12,color:o.faint,px:.75,py:1,lineHeight:1.55},children:e}),_n=Object.freeze(Object.defineProperty({__proto__:null,default:Wn},Symbol.toStringTag,{value:"Module"}));export{_n as A,Ln as z};
|
|
4
|
+
--- raw data ---`);return t.jsxs(t.Fragment,{children:[t.jsx(J,{text:(z>=0?I.slice(0,z):I).trim()||"(empty)"}),y!==u&&t.jsx(l,{component:"button",type:"button",onClick:x=>{x.stopPropagation(),a(g=>!g)},sx:{border:0,bgcolor:"transparent",color:o.faint,fontSize:11,cursor:"pointer",p:0,mt:.3},children:s?"Just what they wrote":"Show the whole email"}),i.SourceLink&&t.jsx(l,{component:"a",href:i.SourceLink,target:"_blank",rel:"noreferrer",onClick:x=>x.stopPropagation(),sx:{display:"block",fontSize:11,color:o.mint,mt:.3},children:"open the original ↗"})]})}function vn({tid:e}){const[i,r]=h.useState(null);return h.useEffect(()=>{let s=!0;return E.get(`/api/tasks/${e}/worker`).then(({data:a})=>s&&r(String((a==null?void 0:a.said)||"").trim())).catch(()=>s&&r("")),()=>{s=!1}},[e]),i?t.jsxs(t.Fragment,{children:[t.jsx(je,{children:"WHAT IT SAID LAST"}),t.jsx(J,{text:i,cap:120})]}):null}function Tn({tid:e}){const[i,r]=h.useState(null);return h.useEffect(()=>{let s=!0;return E.get(`/api/tasks/${e}`).then(({data:a})=>{const u=((a==null?void 0:a.comments)||[]).slice().reverse().find(y=>/^(CODER REPORT|HANDOVER NOTE)/.test(String(y.Body||"")));s&&r(u?u.Body.replace(/^(CODER REPORT|HANDOVER NOTE)\s*/,""):"No report was filed on this task.")}).catch(a=>s&&r(be(a))),()=>{s=!1}},[e]),i==null?null:t.jsxs(t.Fragment,{children:[t.jsx(je,{children:"ITS FINAL REPORT"}),t.jsx(J,{text:i})]})}function Cn({item:e,busy:i,play:r}){const[s,a]=h.useState(null),[u,y]=h.useState(null),[I,z]=h.useState(""),[x,g]=h.useState(""),S=()=>E.get("/api/reviews",{params:{status:"pending"}}).then(({data:v})=>a((v.data||[]).find(m=>m.ReviewId===e.rid)||{gone:!0})).catch(v=>g(be(v)));if(h.useEffect(()=>{S()},[e.rid]),!s)return t.jsx(f,{sx:{fontSize:11.5,color:o.faint,mt:.6},children:"fetching the draft…"});if(s.gone)return t.jsx(f,{sx:{fontSize:11.5,color:o.faint,mt:.6},children:"Already handled - nothing is waiting here."});const C=s.Kind==="action",b=Vt(s),$=u??(C?(()=>{try{const v=JSON.parse(s.DraftText||"");return v.text||`${v.action}${v.why?` — ${v.why}`:""}`}catch{return s.DraftText||""}})():s.DraftText||""),p=s.FromName||s.FromEmail||"them",A=()=>r("approve",e.key,async()=>{const{data:v}=await E.post(`/api/reviews/${e.rid}/decide`,{verb:"approve",final_text:C?null:$,note:null});if(v!=null&&v.send_error)throw new Error(v.send_error);return v}),O=async()=>{const v=await r("draft",null,async()=>(await E.post(`/api/messages/${e.mid}/reply`,{draft:!0,redraft:!0,instruction:I.trim()||null})).data);v&&(z(""),y(null),v.draft?a(m=>({...m,DraftText:v.draft,Stale:!1})):S())};return t.jsxs(l,{onClick:v=>v.stopPropagation(),children:[t.jsx(je,{children:b?"THE AGENT FINISHED - WHAT CLOSES IT":C?"WHAT THE AGENT WANTS TO DO":`THE DRAFT TO ${p.toUpperCase()} - EDIT, THEN SEND`}),t.jsx(l,{component:"textarea",rows:5,value:$,readOnly:C,onChange:v=>y(v.target.value),placeholder:"No draft yet - rewrite it below, or type your own",sx:Ee}),!!(s.Stale??e.stale)&&t.jsx(f,{sx:{fontSize:11.5,color:o.gold,mt:.4},children:"New messages came in after this draft - rewrite it before sending."}),t.jsxs(K,{children:[t.jsx(R,{kind:"gold",disabled:!!i||!C&&!$.trim(),onClick:A,title:b?`${b.label} - ${b.then}`:C?"Runs what the agent proposed":`Sends it to ${p}`,children:b?`✔ ${b.label} · +40`:C?"▶ Run it · +40":e.tid?`✔ ${Xt} · +40`:"📨 Send it · +40"}),(b==null?void 0:b.alt)&&t.jsxs(R,{disabled:!!i,title:`${b.alt.label} - ${b.alt.then}`,onClick:()=>r("approve",e.key,async()=>{const{data:v}=await E.post(`/api/reviews/${e.rid}/decide`,{verb:b.alt.verb,final_text:null,note:null});if(v!=null&&v.send_error)throw new Error(v.send_error);return v}),children:["✖ ",b.alt.label]})]}),!C&&e.mid&&t.jsx(t.Fragment,{children:t.jsxs(l,{sx:{display:"flex",gap:.5,mt:.8},children:[t.jsx(l,{component:"input",value:I,onChange:v=>z(v.target.value),placeholder:"Rewrite it… (shorter, warmer, say no)",onKeyDown:v=>{v.key==="Enter"&&O()},sx:{...Ee,py:.6}}),t.jsx(R,{disabled:!!i,onClick:O,title:"The assistant rewrites the draft - nothing is sent",children:"✍ Redraft"})]})}),x&&t.jsx(f,{sx:{fontSize:11.5,color:o.red,mt:.5},children:x})]})}function jt({item:e,covers:i=[],busy:r,play:s,onRepo:a,given:u=null,initial:y=null}){const[I,z]=h.useState(u),[x,g]=h.useState(y),[S,C]=h.useState(null);h.useEffect(()=>{if(u)return;let p=!0;return E.get("/api/concierge/chips",{params:{key:e.key}}).then(({data:A})=>p&&z(A.chips||[])).catch(()=>p&&z([])),()=>{p=!1}},[e.key,u]);const b=async p=>{const A=await s(kn[p.verb]||"done",e.key,async()=>{var m;let O;try{O=(await E.post(`/api/operations/${p.id}/execute`,{version:p.version})).data}catch(D){O={status:((m=D==null?void 0:D.response)==null?void 0:m.status)===409?"stale":"error",error:be(D)}}const v=Jt(p,O);if(v.repo&&(a==null||a(v.repo)),v.status!=="done")throw new Error(v.receipt);return v});return g(null),A},w=async(p,A)=>{if(p.ask)return null;if(p.verb==="defer")return(e.tid||e.idea)&&C(A||document.body),null;if(p.verb==="continue"&&e.tid)return s("dispatch",e.key,()=>E.post(`/api/tasks/${e.tid}/continue-work`,{note:null}));if((p.verb==="reply"||p.verb==="redraft")&&e.mid)return s("draft",null,()=>E.post(`/api/messages/${e.mid}/reply`,{draft:!0,redraft:p.verb==="redraft",instruction:null}));if(p.verb==="prep"&&e.event)return s("prep",e.key,()=>E.post("/api/calendar/prep",{...e.event,instruction:"Get me ready for this meeting: who is in it, what came before it, what I should say."}));const O=await s(null,null,async()=>(await E.post("/api/concierge/propose",{verb:p.verb,key:e.key,table:!0})).data);if(!O)return null;const v=ut({proposal:O})||O;return v.auto?b({...v,verb:p.verb}):(g({...v,verb:p.verb}),null)},$=(I||[]).filter(p=>p.verb!=="next"&&!i.includes(p.verb));return!$.length&&!x?null:t.jsxs(l,{onClick:p=>p.stopPropagation(),children:[t.jsx(je,{children:"MORE MOVES"}),t.jsx(l,{sx:{display:"flex",gap:.5,flexWrap:"wrap"},children:$.map(p=>t.jsx(R,{disabled:!!r||!!x,onClick:A=>w(p,A==null?void 0:A.currentTarget),title:p.hint,children:p.label},p.verb))}),S&&t.jsx(qt,{task:{TaskId:e.tid||`idea-${e.idea}`,RemindAt:""},anchor:S,onClose:()=>C(null),path:e.kind==="idea"&&e.idea?`/api/assistant/ideas/${e.idea}/snooze`:void 0,onDone:p=>(p==null?void 0:p.remindAt)&&s("later",e.key,async()=>p)}),x&&t.jsxs(l,{sx:{mt:.8,p:1,borderRadius:"9px",border:`1px dashed ${o.gold}`,bgcolor:"rgba(240,192,90,.07)"},children:[t.jsx(f,{sx:{fontSize:12,color:o.ink},children:x.say||x.label}),t.jsxs(K,{children:[t.jsxs(R,{kind:"gold",disabled:!!r,onClick:()=>b(x),children:["Confirm - ",x.label]}),t.jsx(R,{onClick:()=>{E.delete(`/api/operations/${x.id}`).catch(()=>{}),g(null)},children:"Cancel"})]})]})]})}function wt({item:e}){return t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.7},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:11,fontWeight:800,color:o.dim},children:e.who||"—"}),e.channel&&t.jsxs(f,{sx:{fontSize:10,color:o.faint},children:["· ",e.channel]}),e.ref&&t.jsx(f,{sx:{..._,fontSize:10,color:o.faint},children:e.ref}),t.jsx(f,{sx:{fontSize:10,fontWeight:800,color:q(e)?o.red:o.faint,ml:"auto",letterSpacing:.5,whiteSpace:"nowrap"},children:ft(e.lane).word})]})}function Le({item:e,agents:i,busy:r,play:s,onOpenTask:a,onNavigate:u,onNext:y}){var B;const[I,z]=h.useState(""),[x,g]=h.useState(null),[S,C]=h.useState(null),b=Kt(e)||"message",w=ke(e,i),$=e.coding||e.kind==="coding"||w.kind==="coding",p=d=>s("dispatch",e.key,async()=>{const{data:j}=await E.post(`/api/messages/${e.mid}/dispatch`,{kind:d});if((j==null?void 0:j.dispatch)==="needs_repo")throw C({taskId:j.taskId,agent:j.agent||"coder"}),new Error("pick the repository it works in first");return j}),A=()=>s("approve",e.key,async()=>{const{data:d}=await E.post(`/api/messages/${e.mid}/reply`,{draft:!0,instruction:null});if(!(d!=null&&d.reviewId))throw new Error("no draft slot came back - try Draft a reply");const j=(await E.post(`/api/reviews/${d.reviewId}/decide`,{verb:"approve",final_text:x,note:null})).data;if(j!=null&&j.send_error)throw new Error(j.send_error);return j}),O=()=>s("answer",e.key,()=>E.post(`/api/tasks/${e.tid}/waitroom`,{text:I})).then(d=>d&&z("")),v=d=>a==null?void 0:a(d,{start:!1});let m=null,D=[];if(e.kind==="connection")m=t.jsxs(t.Fragment,{children:[e.why&&t.jsx(J,{text:e.why,cap:80}),t.jsx(K,{children:t.jsx(R,{kind:"gold",onClick:()=>{window.location.hash=`connector=${e.channel}`,u==null||u("Connections")},children:"🔌 Open the connection"})}),t.jsx(f,{sx:{fontSize:11,color:o.faint,mt:.5},children:"Once it answers again this clears by itself."})]});else if(b==="reply")D=["approve","redraft"],m=t.jsxs(t.Fragment,{children:[e.mid&&t.jsx(Te,{mid:e.mid}),t.jsx(Cn,{item:e,busy:r,play:s})]});else if(b==="agent"){D=["answer_agent"];const d=e.lane==="working";m=t.jsxs(t.Fragment,{children:[t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.5},children:e.paused?"Saved when Taskuary stopped - ready to pick up where it was.":d?"Back at it - nothing for you until it stops.":e.why}),e.tid&&!d&&t.jsx(vn,{tid:e.tid}),!e.paused&&!!e.request_id&&(e.choices||[]).length>0&&t.jsxs(t.Fragment,{children:[t.jsx(je,{children:"ITS QUESTION - PICK ONE"}),t.jsx(l,{sx:{display:"flex",flexDirection:"column",gap:.5},onClick:j=>j.stopPropagation(),children:e.choices.map(j=>t.jsxs(R,{kind:"mint",disabled:!!r,onClick:()=>s("answer",e.key,()=>E.post(`/api/tasks/${e.tid}/worker/answer`,{request_id:e.request_id,text:j})),children:[j," · +60"]},j))})]}),!e.paused&&!d&&e.tid&&t.jsxs(l,{sx:{display:"flex",gap:.5,mt:.8},onClick:j=>j.stopPropagation(),children:[t.jsx(l,{component:"input",value:I,onChange:j=>z(j.target.value),placeholder:e.asking?"Or answer in your own words…":"Tell it what to do next…",onKeyDown:j=>{j.key==="Enter"&&I.trim()&&O()},sx:{...Ee,py:.6}}),t.jsx(R,{kind:"gold",disabled:!!r||!I.trim(),onClick:O,children:"Answer · +60"})]}),t.jsxs(K,{children:[e.paused&&t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("resume",e.key,()=>E.post(`/api/tasks/${e.tid}/resume`)).then(j=>j&&v(e.tid)),children:"▶ Continue session · +15"}),e.tid&&t.jsx(R,{onClick:()=>v(e.tid),children:"⌨ Jump into the code space"})]})]})}else if(b==="meeting"){const d=e.event||{};D=["prep"],m=t.jsxs(t.Fragment,{children:[t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.5},children:[d.start&&`starts ${String(d.start).slice(11,16)}`,((B=d.who)==null?void 0:B.length)&&`with ${d.who.slice(0,6).join(", ")}`,d.where].filter(Boolean).join(" · ")}),d.about&&t.jsx(J,{text:d.about,cap:90}),t.jsxs(K,{children:[t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("prep",e.key,async()=>{const{data:j}=await E.post("/api/calendar/prep",{...d,instruction:"Get me ready for this meeting: who is in it, what came before it, what I should say."});return j!=null&&j.taskId&&v(j.taskId),j}),children:"🎯 Prep me · +20"}),d.join&&t.jsx(l,{component:"a",href:d.join,target:"_blank",rel:"noreferrer",onClick:j=>j.stopPropagation(),sx:{px:1.1,py:.55,borderRadius:"9px",bgcolor:o.mint,color:"#1c1f24",fontSize:11.5,fontWeight:800,textDecoration:"none"},children:"Join ↗"})]})]})}else if(b==="report")m=t.jsxs(t.Fragment,{children:[e.bad&&t.jsx(f,{sx:{fontSize:12,color:o.red,mt:.5},children:"The run failed - the cause is in the report."}),e.mid&&t.jsx(Te,{mid:e.mid})]});else if(b==="agentdone"||b==="wrapup")D=b==="agentdone"&&e.mid?["reply"]:[],m=t.jsxs(t.Fragment,{children:[e.sent&&t.jsx(J,{text:`You sent: ${e.sent}`,cap:80}),e.summary&&t.jsx(J,{text:e.summary,cap:100}),e.tid&&t.jsx(Tn,{tid:e.tid}),t.jsxs(K,{children:[b==="agentdone"&&e.mid&&t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("draft",e.key,()=>E.post(`/api/messages/${e.mid}/reply`,{draft:!0,instruction:null})),title:"Drafts an answer to the sender from what the agent found - nothing is sent",children:"✍ Reply from this · +20"}),e.tid&&t.jsxs(R,{onClick:()=>v(e.tid),children:["Open ",e.ref]})]})]});else if(b==="fyis")D=["done"],m=t.jsxs(t.Fragment,{children:[(e.items||[]).map(d=>t.jsxs(f,{sx:{fontSize:12,color:o.dim,mt:.4},children:["• ",t.jsx("b",{style:{color:o.ink},children:d.who})," - ",d.title,d.summary?` - ${d.summary}`:""]},d.key)),t.jsx(K,{children:t.jsx(R,{kind:"mint",disabled:!!r,onClick:()=>s("read",e.key,()=>E.post("/api/funnel/settle",{key:e.key,verb:"done"})),children:"☕ All read · +8"})})]});else if(b==="idea")D=[],m=t.jsxs(t.Fragment,{children:[e.why&&t.jsx(J,{text:e.why,cap:90}),e.mid&&t.jsx(Te,{mid:e.mid})]});else{const d=e.kind!=="fyi"&&e.lane!=="fyi";D=["reply","coder","regular_agent"],m=t.jsxs(t.Fragment,{children:[e.mid?t.jsx(Te,{mid:e.mid}):e.preview&&t.jsx(J,{text:e.preview,cap:90}),e.lane==="unjudged"&&t.jsx(K,{children:t.jsx(R,{kind:"gold",disabled:!!r,onClick:()=>s("sort",e.key,()=>E.post(`/api/messages/${e.mid}/retriage`,{})),children:"🔁 Try triage again · +10"})}),d&&e.mid&&t.jsxs(K,{children:[t.jsx(R,{kind:w.verb==="draft"?"gold":"ghost",disabled:!!r,onClick:()=>s("draft",e.key,()=>E.post(`/api/messages/${e.mid}/reply`,{draft:!0,instruction:null})),children:"✍ Draft a reply · +20"}),t.jsxs(R,{kind:w.verb==="dispatch"?"gold":"ghost",disabled:!!r,onClick:()=>p($?"coding":"general"),children:["🤖 Hand to ",$?"a coding agent":"an agent"," · +45"]}),t.jsx(R,{disabled:!!r,onClick:()=>g(j=>j==null?"":null),children:"✎ Write it myself"})]}),x!=null&&t.jsxs(l,{onClick:j=>j.stopPropagation(),children:[t.jsx(l,{component:"textarea",rows:4,value:x,onChange:j=>g(j.target.value),placeholder:"Your reply, sent as you write it",sx:{...Ee,mt:.8}}),t.jsx(K,{children:t.jsx(R,{kind:"gold",disabled:!!r||!x.trim(),onClick:A,children:"📨 Send mine · +40"})})]}),!e.mid&&e.tid&&t.jsx(K,{children:t.jsxs(R,{onClick:()=>v(e.tid),children:["Open ",e.ref]})})]})}return t.jsxs(l,{children:[m,S&&t.jsxs(l,{onClick:d=>d.stopPropagation(),sx:{mt:1,p:1,borderRadius:"9px",bgcolor:"#f6f2ea",color:"#262521"},children:[t.jsx(f,{sx:{fontSize:12,fontWeight:700,mb:.5},children:"Which repository should the coding agent use?"}),t.jsx(Ut,{taskId:S.taskId,agent:S.agent,onDone:d=>{d!=null&&d.repo&&(C(null),p("coding"))}})]}),t.jsx(jt,{item:e,covers:D,busy:r,play:s,onRepo:C}),t.jsxs(K,{children:[y&&t.jsxs(R,{kind:"mint",disabled:!!r,onClick:()=>y(e),title:"Read - on to the next thing (N)",children:["Next ▶ · +",(e.lane==="fyi"||e.lane==="report"||e.kind==="fyis")&&!e.bad?8:2]}),e.tid&&b!=="agent"&&b!=="agentdone"&&b!=="wrapup"&&e.mid&&t.jsxs(R,{onClick:()=>v(e.tid),children:["Open ",e.ref]})]})]})}const In=gt.lazy(()=>nn(()=>import("./GameScene-CfqHp5AM.js"),__vite__mapDeps([0,1,2,3])));function zn(){const[e,i]=h.useState(()=>{try{return localStorage.getItem("taskuary.assistantGame.sound")!=="0"}catch{return!0}}),r=h.useRef(null),s=h.useCallback(u=>{if(e)try{r.current||(r.current=new(window.AudioContext||window.webkitAudioContext));const y=r.current,I=y.currentTime;u.forEach(([z,x,g=.09,S="square"])=>{const C=y.createOscillator(),b=y.createGain();C.type=S,C.frequency.value=z,b.gain.setValueAtTime(1e-4,I+x),b.gain.exponentialRampToValueAtTime(.05,I+x+.01),b.gain.exponentialRampToValueAtTime(1e-4,I+x+g),C.connect(b).connect(y.destination),C.start(I+x),C.stop(I+x+g+.02)})}catch{}},[e]);return{on:e,toggle:()=>i(u=>{try{localStorage.setItem("taskuary.assistantGame.sound",u?"0":"1")}catch{}return!u}),coin:()=>s([[988,0],[1319,.07,.16]]),level:()=>s([[523,0],[659,.1],[784,.2],[1047,.3,.3]]),whoosh:()=>s([[220,0,.12,"sine"],[330,.05,.12,"sine"]]),nope:()=>s([[196,0,.18,"sawtooth"]])}}const En={approve:{glyph:"✓",tone:"send"},fyi:{glyph:"i",tone:"info"},report:{glyph:"i",tone:"info"},broken:{glyph:"!",tone:"bad"},forgotten:{glyph:"?",tone:"ask"}},Rn=e=>En[e.lane]||(q(e)?{glyph:"!",tone:"need"}:null);function Wn({onOpenTask:e,onExit:i,onNavigate:r,active:s=!0}){var ot,st,rt;const[a,u]=h.useState(null),[y,I]=h.useState([]),[z,x]=h.useState(null),[g,S]=h.useState({}),[C,b]=h.useState(null),[w,$]=h.useState(Date.now()),[p,A]=h.useState([]),[O,v]=h.useState({topics:[],data:[]}),[m,D]=h.useState("all"),[B,d]=h.useState(null),[j,te]=h.useState([]),[U,we]=h.useState(()=>new Set),[F,le]=h.useState(()=>wn()),[St,_e]=h.useState([]),[vt,Tt]=h.useState([]),G=vt[0]||null,ne=n=>Tt(c=>n?c.some(T=>T.title===n.title&&T.kind===n.kind)?c:n.kind==="bottom"||n.kind==="gymclear"?[n,...c]:[...c,n]:c.slice(1)),[Ct,We]=h.useState(""),[It,Ge]=h.useState(!1),[oe,zt]=h.useState(!1),[Et,Ke]=h.useState([{who:"core",text:"I'm the Assistant Core. Ask me who should take what, or what to do next - I read the same pile you do."}]),Y=zn(),Rt=Qt("(min-width:900px)"),Ue=h.useRef(new Set),se=h.useRef(F),fe=h.useRef(p),qe=h.useRef(0);fe.current=p;const ue=h.useCallback(async()=>{const[n,c,T]=await Promise.all([E.get("/api/tasks",{params:{active:1}}).catch(()=>({data:{}})),E.get("/api/agents").catch(()=>({data:{}})),E.get("/api/settings").catch(()=>({data:{}}))]),k=(n.data.data||[]).filter(M=>M.Status!=="dropped");u(k.filter(M=>Zt(M.Kind))),te(k.filter(M=>M.Kind==="task"&&M.Status!=="done")),I(c.data.data||c.data.agents||[]);const W=(T.data.data||[]).find(M=>M.Name==="auto_sessions");x(M=>M??Math.max(1,Math.min(8,parseInt(W==null?void 0:W.Value,10)||4)))},[]),Q=h.useCallback(async()=>{var T,k,W;const[n,c]=await Promise.all([E.get("/api/funnel/pile").catch(()=>null),E.get("/api/hub").catch(()=>null)]);n&&A(((T=n.data)==null?void 0:T.items)||[]),c&&v({topics:((k=c.data)==null?void 0:k.topics)||[],data:((W=c.data)==null?void 0:W.data)||[]})},[]);h.useEffect(()=>{if(!s)return;ue(),Q();const n=lt("task-changed",ue),c=lt(["feed-changed","task-changed"],Q,{wait:1200,max:5e3});return()=>{n==null||n(),c==null||c()}},[s,ue,Q]),h.useEffect(()=>{const n=()=>E.get("/api/runs/live").then(({data:T})=>{S(Object.fromEntries((T.data||[]).map(k=>[k.TaskId,k])))}).catch(()=>{});if(!s)return;n();const c=setInterval(n,3e3);return()=>clearInterval(c)},[s]),h.useEffect(()=>s?ct(()=>$(Date.now()),3e4):void 0,[s]),h.useEffect(()=>s?ct(Q,2e4):void 0,[s,Q]);const[,Wt]=h.useReducer(n=>n+1,0);h.useEffect(()=>{if(!s)return;const n=setInterval(Wt,1e3);return()=>clearInterval(n)},[s]);const V=h.useMemo(()=>en(a||[],z??4),[a,z]),$t=h.useMemo(()=>(a||[]).filter(n=>n.Status==="open"&&!tn(n)&&!V.includes(n)),[a,V]),Ot=h.useMemo(()=>V.map(n=>n?{task:n,liveRow:g[n.TaskId]||null,state:xt(n,g[n.TaskId],y,w)}:null),[V,g,y,w]),Ye=h.useMemo(()=>p.filter(n=>!U.has(n.key)||q(n)),[p,U]),N=h.useMemo(()=>ie(Ye),[Ye]),Z=h.useMemo(()=>{const n=Object.fromEntries(N.gym.filter(k=>k.tid).map(k=>[k.tid,k])),c=j.map(k=>{var W;return{key:((W=n[k.TaskId])==null?void 0:W.key)||`task:${k.TaskId}`,task:k,item:n[k.TaskId]||null}}),T=new Set(j.map(k=>k.TaskId));return[...c,...N.gym.filter(k=>!T.has(k.tid)).map(k=>({key:k.key,task:null,item:k}))]},[j,N]),Mt=h.useMemo(()=>[...["meeting","coffee","archive"].flatMap(n=>N[n].filter(c=>c.kind!=="meeting").map(c=>({key:c.key,zone:n,sub:Ce(c),who:c.who||ft(c.lane).word,title:c.title,mark:Rn(c)}))),...Z.map(n=>{var k,W,M,P;const c=He(n.task),T=c.filter(L=>L.done).length;return{key:n.key,zone:"gym",who:((k=n.task)==null?void 0:k.ref)||((W=n.item)==null?void 0:W.ref)||"your task",title:((M=n.task)==null?void 0:M.Title)||((P=n.item)==null?void 0:P.title),mark:n.item&&q(n.item)?{glyph:"!",tone:"need"}:c.length?{glyph:`${T}/${c.length}`,tone:"send"}:null}})],[N,Z]),At=h.useMemo(()=>N.meeting.filter(n=>n.kind==="meeting"||n.lane==="time").map(n=>{var c;return{title:n.title,when:String(((c=n.event)==null?void 0:c.start)||n.when||"").slice(11,16)}}),[N]),Ve=h.useMemo(()=>({floor:N.floor.filter(q).length,gym:Z.length,meeting:N.meeting.filter(q).length,coffee:N.coffee.length,archive:N.archive.length,hq:0}),[N,Z]),xe=h.useMemo(()=>Object.fromEntries(p.map(n=>[n.key,n])),[p]),X=gn(p,U),$e=h.useRef(1);$e.current=Math.max($e.current,X,1);const Oe=h.useMemo(()=>bn(F,{approve:p.filter(n=>n.lane==="approve"||n.lane==="asked"&&n.mid).length,dispatch:p.filter(n=>ke(n,y).verb==="dispatch").length,read:p.filter(n=>(n.lane==="fyi"||n.lane==="report"||n.kind==="fyis")&&!n.bad&&!U.has(n.key)).length,rep:j.reduce((n,c)=>n+He(c).filter(T=>!T.done).length,0)}),[F,p,y,j,U]),Xe=h.useRef(Oe);Xe.current=Oe,h.useEffect(()=>{C&&!V.some(n=>(n==null?void 0:n.TaskId)===C)&&b(null)},[V,C]),h.useEffect(()=>{if(!s)return;const n=c=>{var k,W;if((W=(k=c.target)==null?void 0:k.closest)!=null&&W.call(k,"input, textarea, [contenteditable=true]")||c.metaKey||c.ctrlKey||c.altKey)return;const T=Ne.find(M=>M.hotkey===c.key);T?(c.preventDefault(),H(T.key)):(c.key==="n"||c.key==="N")&&xe[B]?(c.preventDefault(),et(xe[B])):c.key==="Escape"&&(c.preventDefault(),H("all"))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)});const re=n=>{const c=Math.random().toString(36).slice(2);_e(T=>[...T.slice(-3),{id:c,...n}]),setTimeout(()=>_e(T=>T.filter(k=>k.id!==c)),n.ms||2600)},H=(n,c=null)=>{n!==m&&Y.whoosh(),D(n),d(c)},ge=async(n,c,T)=>{We(c||n||"busy");try{const k=await T(),W=c?fe.current.filter(L=>L.key!==c||n==="draft"):fe.current;fe.current=W;const M={meeting:ie(W).meeting.filter(q).length,coffee:ie(W).coffee.length,quests:Xe.current};if(!n)return c&&A(W),k;const P=Fe(se.current,n,Date.now(),M);return se.current=P.state,le(P.state),Pe(P.state),P.gained>0&&(Y.coin(),re({kind:"xp",text:`+${P.gained} XP`,sub:`${yn[n]}${P.mult>1?` · combo x${P.mult}`:""}`})),P.quests.forEach(L=>re({kind:"quest",text:`Quest done +${L.xp}`,sub:L.label||L.says(L.n),ms:3600})),P.levelUp&&(Y.level(),ne({kind:"level",title:`Level ${P.levelUp.level}`,sub:P.levelUp.title})),P.unlocked.forEach(L=>{Y.level(),ne({kind:"trophy",title:L.name,sub:L.says})}),c&&A(W),d(L=>L===c&&n!=="draft"?null:L),Q(),ue(),k}catch(k){return Y.nope(),re({kind:"err",text:"Didn't land",sub:be(k),ms:4200}),null}finally{We("")}};h.useEffect(()=>{if(!G)return;const n=setTimeout(()=>ne(null),G.kind==="bottom"||G.kind==="gymclear"?4200:2600);return()=>clearTimeout(n)},[G]);const Dt=(n,c,T)=>ge(T,n.key,()=>E.post("/api/funnel/settle",{key:n.key,verb:c})),Ft=n=>(n.lane==="fyi"||n.lane==="report"||n.kind==="fyis")&&!n.bad,Pt=n=>{const c=fe.current.filter(k=>k.key!==n&&!Se.current.has(k.key)&&k.lane!=="working"),T=p.findIndex(k=>k.key===n);return c.find(k=>p.indexOf(k)>T)||c[0]||null},Se=h.useRef(U),[Nt,Bt]=h.useState(0),Je=(n,c,T)=>{var W;if(Bt(M=>M+1),Y.level(),(W=se.current.dayBy)!=null&&W[n]){ne({kind:n,title:c,sub:T});return}const k=Fe(se.current,n);se.current=k.state,le(k.state),Pe(k.state),ne({kind:n,title:`${c} · +${k.gained} XP`,sub:T}),k.unlocked.forEach(M=>ne({kind:"trophy",title:M.name,sub:M.says}))},Qe=h.useRef(null),Ze=h.useRef(null);h.useEffect(()=>{Qe.current>0&&X===0&&Je("bottom","Inbox Boss defeated","The bottom of the pile - everything seen, nothing left behind"),Qe.current=X},[X]),h.useEffect(()=>{Ze.current>0&&Z.length===0&&Je("gymclear","Gym cleared","Every one of your own tasks is done"),Ze.current=Z.length},[Z.length]);const et=async n=>{const c=Ft(n);if(await ge(c?"read":"next",c?n.key:null,()=>E.post("/api/funnel/settle",{key:n.key,verb:"surfaced",read:!0}))==null)return;Se.current=new Set([...Se.current,n.key]),we(Se.current);const k=Pt(n.key);if(!k){re({kind:"quest",text:"Pile walked ✦",sub:"nothing left you haven't seen"}),H("all");return}const W=ie([k]);H(Object.keys(W).find(M=>W[M].length),k.key)},tt=(n,c)=>{if(!Ue.current.has(n)){Ue.current.add(n);const T=Fe(se.current,"open");se.current=T.state,le(T.state),Pe(T.state),re({kind:"xp",text:`+${T.gained} XP`,sub:"Jumped into the code space"})}e(n,c)},Ht=async n=>{var M;if(!n.trim())return;Ke(P=>[...P,{who:"you",text:n}]);const c=B&&xe[B]?B:null,T=Date.now()-qe.current>6e4;T&&(qe.current=Date.now()),We("ask");const k=await ge(T?"ask":null,null,async()=>(await E.post("/api/concierge/say",{text:n,key:c})).data);if(!k)return;const W=k.item||(c?xe[c]:null);Ke(P=>[...P,{who:"core",text:k.say||"Done.",chips:k.chips||[],options:k.options||[],proposal:ut(k),item:W}]),((M=k.decision)==null?void 0:M.verb)==="reply"&&(W!=null&&W.mid)&&ge("draft",W.key,()=>E.post(`/api/messages/${W.mid}/reply`,{draft:!0,instruction:k.decision.text||null}))},Lt=async()=>{try{await navigator.clipboard.writeText(Sn(F)),re({kind:"info",text:"Run copied",sub:"counts only - no names, no subjects"})}catch{re({kind:"err",text:"Couldn't copy",sub:"your browser blocked the clipboard"})}};if(!a)return t.jsx(dt,{size:22,sx:{m:4}});const ce={picked:B,setPicked:d,agents:y,busy:Ct,play:ge,onOpenTask:tt,onNavigate:r,onNext:et},de=ye(F.xp),nt=Math.max(0,1-(Date.now()-F.lastAt)/mt),he=nt>0?F.combo:0,_t=V.filter(Boolean),Gt=V.filter(n=>!n).length,Me=Math.max(0,Math.round((Date.now()-(F.runStart||Date.now()))/1e3));return t.jsxs(l,{sx:{position:"relative",width:"100%",height:"calc(100vh - 84px)",minHeight:560,overflow:"hidden",borderRadius:"14px",background:"radial-gradient(ellipse at 50% 40%, #f7f2e9 0%, #e7dfd1 70%, #d9d0c0 100%)"},children:[t.jsx(l,{sx:{position:"absolute",inset:0},children:t.jsx(gt.Suspense,{fallback:t.jsx(l,{sx:{position:"absolute",inset:0,display:"grid",placeItems:"center"},children:t.jsx(dt,{size:22})}),children:t.jsx(In,{seats:Ot,selectedId:C,onSelect:n=>{b(n),H("floor")},focus:m,onZone:n=>H(n),npcs:Mt,cabinets:O.topics,picked:B,zoneCounts:Ve,onPick:n=>{const c=xe[n];if(c){const T=ie([c]);H(Object.keys(T).find(k=>T[k].length),n)}else n.startsWith("task:")&&H("gym",n)},onCabinet:n=>H("archive",n),onCore:()=>H("hq"),onExit:i,inset:Rt?{left:180,right:oe?0:344}:{left:0,right:0},active:s,meetings:At})})}),t.jsxs(l,{sx:{...pe,position:"absolute",zIndex:8,top:10,left:12,right:12,px:1.25,py:.6,display:"flex",alignItems:"center",gap:1.75,flexWrap:"wrap"},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:1.1,minWidth:210},children:[t.jsx(l,{sx:{width:40,height:40,borderRadius:"50%",display:"grid",placeItems:"center",flexShrink:0,background:`conic-gradient(${o.gold} ${de.pct*360}deg, rgba(255,255,255,.12) 0deg)`},children:t.jsx(l,{sx:{width:32,height:32,borderRadius:"50%",bgcolor:"#171b21",display:"grid",placeItems:"center",fontWeight:900,fontSize:14,color:o.gold},children:de.level})}),t.jsxs(l,{sx:{minWidth:0},children:[t.jsx(f,{sx:{fontSize:10,letterSpacing:1.4,color:o.faint,fontWeight:800,textTransform:"uppercase"},children:"Assistant game"}),t.jsx(f,{noWrap:!0,sx:{fontSize:14,fontWeight:800,color:o.ink},children:de.title}),t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.dim},children:[F.xp," XP · ",de.span-de.into," to Lv ",de.level+1]})]})]}),t.jsxs(l,{sx:{minWidth:92,textAlign:"center"},children:[t.jsxs(f,{sx:{fontSize:22,fontWeight:900,lineHeight:1,color:he>1?o.gold:o.faint,transform:he>1?`scale(${1+Math.min(he,6)*.04})`:"none",transition:"transform .2s"},children:["x",yt(Math.max(he,1))]}),t.jsx(l,{sx:{height:3,mt:.5,borderRadius:2,bgcolor:"rgba(255,255,255,.1)",overflow:"hidden"},children:t.jsx(l,{sx:{height:"100%",width:`${nt*100}%`,bgcolor:o.gold,transition:"width 1s linear"}})}),t.jsx(f,{sx:{fontSize:9.5,color:o.faint,letterSpacing:1,fontWeight:700,mt:.25},children:he>1?`${he} COMBO`:"COMBO"})]}),t.jsxs(l,{sx:{flex:"1 1 220px",minWidth:180},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"baseline",gap:1},children:[t.jsx(f,{sx:{fontSize:10,letterSpacing:1.3,fontWeight:800,color:o.red},children:"INBOX BOSS"}),t.jsx(f,{sx:{..._,fontSize:10.5,color:o.dim,ml:"auto"},children:X?`${X} to the bottom`:"defeated ✦ you're at the bottom"})]}),t.jsx(l,{sx:{height:9,mt:.5,borderRadius:5,bgcolor:"rgba(255,255,255,.08)",overflow:"hidden",border:`1px solid ${o.line}`},children:t.jsx(l,{sx:{height:"100%",width:`${X/$e.current*100}%`,transition:"width .6s cubic-bezier(.2,.9,.3,1.2)",background:X?"linear-gradient(90deg, #b04a5c, #e0697d)":o.green}})})]}),t.jsx(l,{sx:{display:{xs:"none",xl:"flex"},gap:.75},children:Oe.map(n=>{var k;const c=jn(F,n),T=(k=F.quests)==null?void 0:k.includes(n.key);return t.jsxs(l,{title:`+${n.xp} XP when done today`,sx:{px:1,py:.5,borderRadius:"9px",bgcolor:T?"rgba(143,207,143,.15)":o.card,border:`1px solid ${T?"rgba(143,207,143,.5)":o.line}`,minWidth:118},children:[t.jsxs(f,{noWrap:!0,sx:{fontSize:10.5,fontWeight:700,color:T?o.green:o.ink},children:[T?"✓ ":"",n.label]}),t.jsx(l,{sx:{height:3,mt:.4,borderRadius:2,bgcolor:"rgba(255,255,255,.1)"},children:t.jsx(l,{sx:{height:"100%",width:`${n.n?c/n.n*100:100}%`,borderRadius:2,bgcolor:T?o.green:o.mint}})})]},n.key)})}),t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.5},children:[t.jsxs(f,{title:"time since today's run started",sx:{..._,fontSize:12,color:o.dim,mr:.5},children:["⏱ ",Math.floor(Me/3600)?`${Math.floor(Me/3600)}h `:"",Math.floor(Me%3600/60),"m"]}),t.jsxs(me,{onClick:()=>Ge(n=>!n),title:"Trophies",children:["🏆 ",F.got.length,"/",ze.length]}),t.jsx(me,{onClick:Y.toggle,title:Y.on?"Sound on":"Sound off",children:Y.on?"🔊":"🔇"}),t.jsx(me,{onClick:Lt,title:"Copy your run to share - counts only",gold:!0,children:"Share run"}),t.jsx(me,{onClick:i,title:"Back to the Assistant's chat - the same items, as a conversation",children:"💬 Back to chat"})]})]}),t.jsxs(l,{sx:{position:"absolute",zIndex:7,left:12,top:84,display:"flex",flexDirection:"column",gap:.5,width:{xs:54,md:158}},children:[t.jsx(pt,{on:m==="all",onClick:()=>H("all"),k:"Esc",name:"Whole office"}),Ne.map(n=>t.jsx(pt,{on:m===n.key,onClick:()=>H(n.key),k:n.hotkey,name:n.name,n:Ve[n.key]},n.key))]}),t.jsxs(l,{sx:{...pe,position:"absolute",zIndex:7,right:12,top:84,width:{xs:"calc(100% - 90px)",sm:320},maxHeight:oe?"none":"calc(100% - 100px)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[t.jsxs(l,{onClick:()=>zt(n=>!n),title:oe?"Open the panel":"Fold the panel",sx:{display:"flex",alignItems:"center",gap:1,px:1.4,py:.9,cursor:"pointer",borderBottom:oe?"none":`1px solid ${o.line}`},children:[t.jsx(l,{sx:{..._,px:.6,borderRadius:"5px",fontSize:10,fontWeight:800,bgcolor:"rgba(240,192,90,.15)",color:o.gold},children:m==="all"?"Esc":(ot=Ae(m))==null?void 0:ot.hotkey}),t.jsxs(l,{sx:{minWidth:0,flex:1},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:13.5,fontWeight:900},children:m==="all"?"Briefing":(st=Ae(m))==null?void 0:st.name}),!oe&&t.jsx(f,{noWrap:!0,sx:{fontSize:10.5,color:o.faint},children:m==="all"?"who should take what":(rt=Ae(m))==null?void 0:rt.blurb})]}),t.jsx(f,{sx:{fontSize:14,color:o.dim},children:oe?"▾":"▴"})]}),t.jsxs(l,{sx:{overflowY:"auto",minHeight:0,px:1,py:.9,display:oe?"none":"block"},children:[m==="all"&&t.jsx(On,{pile:p,agents:y,hp:X,passed:U,onGo:n=>{const c=ie([n]);H(Object.keys(c).find(T=>c[T].length),n.key)}}),m==="floor"&&t.jsx(Mn,{seated:_t,queue:$t,live:g,agents:y,clock:w,pick:C,setPick:b,...ce,items:N.floor,onJump:tt,cap:z,setCap:x,free:Gt,desks:V}),m==="meeting"&&t.jsx(An,{...ce,items:N.meeting}),m==="gym"&&t.jsx(Dn,{...ce,gym:Z,reload:()=>{ue(),Q()}}),m==="coffee"&&t.jsx(Fn,{...ce,items:N.coffee,onSettle:Dt}),m==="archive"&&t.jsx(Pn,{...ce,ghosts:N.archive,hub:O,reload:Q}),m==="hq"&&t.jsx(Nn,{chat:Et,onAsk:Ht,...ce,pile:p,onGo:n=>{const c=ie([n]);H(Object.keys(c).find(T=>c[T].length),n.key)}})]})]}),t.jsx(l,{sx:{position:"absolute",zIndex:9,top:88,left:"50%",transform:"translateX(-50%)",display:"flex",flexDirection:"column",alignItems:"center",gap:.6,pointerEvents:"none"},children:St.map(n=>t.jsxs(l,{sx:{...pe,px:1.6,py:.8,display:"flex",alignItems:"baseline",gap:1,animation:"sgPop .35s cubic-bezier(.2,.9,.3,1.4)",borderColor:n.kind==="err"?o.red:n.kind==="quest"?o.green:n.kind==="xp"?o.gold:o.line,"@keyframes sgPop":{from:{opacity:0,transform:"translateY(-10px) scale(.9)"},to:{opacity:1,transform:"none"}}},children:[t.jsx(f,{sx:{fontWeight:900,fontSize:n.kind==="xp"?18:14,color:n.kind==="err"?o.red:n.kind==="quest"?o.green:o.gold},children:n.text}),t.jsx(f,{sx:{fontSize:12,color:o.dim,maxWidth:360},noWrap:!0,children:n.sub})]},n.id))}),t.jsx(Bn,{burst:Nt}),G&&t.jsx(l,{onClick:()=>ne(null),sx:{position:"absolute",inset:0,zIndex:10,display:"grid",placeItems:"center",cursor:"pointer",background:"radial-gradient(circle, rgba(20,24,30,.35), rgba(20,24,30,0) 60%)"},children:t.jsxs(l,{sx:{...pe,px:5,py:3,textAlign:"center",borderColor:o.gold,animation:"sgBoom .5s cubic-bezier(.2,.9,.3,1.5)","@keyframes sgBoom":{from:{opacity:0,transform:"scale(.6) rotate(-3deg)"},to:{opacity:1,transform:"none"}}},children:[t.jsx(f,{sx:{fontSize:11,letterSpacing:3,color:o.gold,fontWeight:900},children:G.kind==="level"?"LEVEL UP":G.kind==="bottom"?"BOTTOM OF THE PILE":G.kind==="gymclear"?"EVERY SET DONE":"TROPHY UNLOCKED"}),t.jsxs(f,{sx:{fontSize:34,fontWeight:900},children:[G.kind==="level"?"⬆ ":G.kind==="bottom"?"⚔ ":G.kind==="gymclear"?"💪 ":"🏆 ",G.title]}),t.jsx(f,{sx:{fontSize:14,color:o.dim},children:G.sub})]})}),It&&t.jsxs(l,{sx:{...pe,position:"absolute",zIndex:9,top:84,left:{xs:12,md:180},width:300,maxHeight:"calc(100% - 110px)",overflowY:"auto",p:1.5},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",mb:1},children:[t.jsx(f,{sx:{fontWeight:900,flex:1},children:"Trophies"}),t.jsx(me,{onClick:()=>Ge(!1),children:"Close"})]}),ze.map(n=>{const c=F.got.includes(n.key);return t.jsxs(l,{sx:{display:"flex",gap:1,alignItems:"center",py:.7,opacity:c?1:.45},children:[t.jsx(l,{sx:{fontSize:20,filter:c?"none":"grayscale(1)"},children:"🏆"}),t.jsxs(l,{children:[t.jsx(f,{sx:{fontSize:12.5,fontWeight:800},children:n.name}),t.jsx(f,{sx:{fontSize:11,color:o.dim},children:n.says})]})]},n.key)}),t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.faint,mt:1},children:[F.moves," moves · best combo x",F.best," · ",F.today," XP today"]})]})]})}function me({children:e,onClick:i,title:r,gold:s}){return t.jsx(l,{component:"button",type:"button",onClick:i,title:r,sx:{border:`1px solid ${s?o.gold:o.line}`,bgcolor:s?o.gold:o.card,color:s?"#1c1f24":o.ink,borderRadius:"9px",px:1.1,py:.55,fontSize:12,fontWeight:800,cursor:"pointer",whiteSpace:"nowrap","&:hover":{filter:"brightness(1.15)"}},children:e})}function pt({on:e,onClick:i,k:r,name:s,n:a}){return t.jsxs(l,{component:"button",type:"button",onClick:i,title:s,sx:{...pe,display:"flex",alignItems:"center",gap:.8,px:.8,py:.5,cursor:"pointer",textAlign:"left",borderRadius:"10px",bgcolor:e?o.gold:o.bg,color:e?"#1c1f24":o.ink,borderColor:e?o.gold:o.line,transition:"transform .12s","&:hover":{transform:"translateX(3px)"}},children:[t.jsx(l,{sx:{..._,minWidth:26,height:22,borderRadius:"6px",display:"grid",placeItems:"center",fontSize:10.5,fontWeight:800,bgcolor:e?"rgba(0,0,0,.15)":"rgba(255,255,255,.08)"},children:r}),t.jsx(f,{noWrap:!0,sx:{display:{xs:"none",md:"block"},fontSize:12,fontWeight:800,flex:1},children:s}),!!a&&t.jsx(l,{sx:{display:{xs:"none",md:"block"},px:.7,borderRadius:99,bgcolor:"#b04a5c",color:"#fff",fontSize:10.5,fontWeight:800},children:a})]})}function ee({on:e,onClick:i,children:r,accent:s}){return t.jsx(l,{onClick:i,sx:{mb:.9,p:1.15,borderRadius:"11px",cursor:i?"pointer":"default",bgcolor:e?"rgba(240,192,90,.08)":o.card,border:`1px solid ${e?o.gold:o.line}`,borderLeft:`3px solid ${s||(e?o.gold:"transparent")}`,"&:hover":i?{borderColor:e?o.gold:"rgba(255,255,255,.25)"}:{}},children:r})}const $n=({item:e,agents:i})=>{const r=ke(e,i);return t.jsx(l,{sx:{mt:.8,px:1,py:.6,borderRadius:"8px",bgcolor:"rgba(127,209,198,.08)",border:"1px dashed rgba(127,209,198,.35)"},children:t.jsxs(f,{sx:{fontSize:11,color:o.mint},children:["✦ Best match: ",t.jsx("b",{children:r.who})," — ",r.why]})})};function Re({items:e,picked:i,setPicked:r,agents:s,busy:a,play:u,onOpenTask:y,onNavigate:I,onNext:z,accent:x}){return e.map(g=>{const S=i===g.key;return t.jsxs(ee,{on:S,onClick:()=>r(S?null:g.key),accent:(x==null?void 0:x(g))||(q(g)?o.red:null),children:[t.jsx(wt,{item:g}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:g.title}),!S&&(g.preview||g.why)&&t.jsx(f,{noWrap:!0,sx:{fontSize:11.5,color:o.faint,mt:.2},children:g.preview||g.why}),S&&t.jsxs(t.Fragment,{children:[t.jsx($n,{item:g,agents:s}),t.jsx(Le,{item:g,agents:s,busy:a,play:u,onOpenTask:y,onNavigate:I,onNext:z})]})]},g.key)})}function On({pile:e,agents:i,onGo:r,hp:s,passed:a}){const u=e.filter(x=>x.lane!=="working"&&!x.surfaced&&!a.has(x.key)),y=e.filter(x=>q(x)&&!u.includes(x));if(!e.length)return t.jsx(ae,{text:"Nothing is waiting anywhere in the office. Inbox Boss defeated - go get a coffee."});const I=(x,g)=>{const S=ke(x,i);return t.jsxs(ee,{onClick:()=>r(x),accent:g,children:[t.jsx(wt,{item:x}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:x.title}),t.jsxs(f,{sx:{fontSize:11,color:o.mint,mt:.4},children:["✦ ",S.who," · ",S.why]})]},x.key)},z=(x,g)=>t.jsx(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:g,px:.5,mb:.6,mt:.4},children:x});return t.jsxs(t.Fragment,{children:[s>0?t.jsxs(t.Fragment,{children:[z(`⚔ NOT SEEN YET · ${s} TO THE BOTTOM`,o.red),u.slice(0,4).map(x=>I(x,o.red)),u.length>4&&t.jsxs(f,{sx:{fontSize:11.5,color:o.faint,px:.5,mb:1},children:["+",u.length-4," more - press N on any of them to walk the lot"]})]}):t.jsxs(l,{sx:{mb:1,p:1.1,borderRadius:"11px",bgcolor:"rgba(143,207,143,.1)",border:"1px solid rgba(143,207,143,.4)"},children:[t.jsx(f,{sx:{fontSize:13,fontWeight:900,color:o.green},children:"⚔ You're at the bottom"}),t.jsxs(f,{sx:{fontSize:11.5,color:o.dim},children:["Everything has been seen. ",y.length?"What is left is still yours to settle:":"Nothing is left on you."]})]}),y.length>0&&t.jsxs(t.Fragment,{children:[s>0&&z(`SEEN, STILL ON YOU · ${y.length}`,o.gold),y.slice(0,4).map(x=>I(x,o.gold))]})]})}function Mn({seated:e,queue:i,live:r,agents:s,clock:a,pick:u,setPick:y,items:I,busy:z,play:x,onJump:g,onOpenTask:S,onNavigate:C,onNext:b,picked:w,setPicked:$,cap:p,setCap:A,free:O,desks:v}){const m=new Set(e.map(d=>d.TaskId)),D=I.filter(d=>!(d.lane==="working"&&m.has(d.tid))),B=Object.fromEntries(I.filter(d=>d.tid).map(d=>[d.tid,d]));return t.jsxs(t.Fragment,{children:[D.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.red,px:.5,mb:.6},children:["ON THE FLOOR FOR YOU · ",D.length]}),t.jsx(Re,{items:D,picked:w,setPicked:$,agents:s,busy:z,play:x,onOpenTask:S,onNavigate:C,onNext:b})]}),t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,px:.5,mb:.6,mt:D.length?1.2:0},children:["AT THE DESKS · ",e.length]}),e.map(d=>{var F,le;const j=r[d.TaskId],te=xt(d,j,s,a),U=u===d.TaskId,we=B[d.TaskId];return t.jsxs(ee,{on:U,onClick:()=>y(U?null:d.TaskId),accent:te.tone==="waiting"?o.red:o.green,children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.7},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:11,fontWeight:800,color:te.tone==="waiting"?o.red:o.green},children:te.agent}),t.jsx(f,{sx:{..._,fontSize:10,color:o.faint,ml:"auto"},children:d.ref}),d.Waiting>0&&t.jsxs(f,{sx:{..._,fontSize:10,color:o.gold,fontWeight:700},title:`${d.Waiting} queued prompt${d.Waiting===1?"":"s"} waiting in the funnel`,children:["✎ ",d.Waiting]})]}),t.jsx(f,{noWrap:!0,sx:{fontSize:13,fontWeight:700,pt:.3},children:d.Title}),t.jsx(f,{sx:{fontSize:11,color:o.dim,pt:.2},children:te.label}),((j==null?void 0:j.work)||(j==null?void 0:j.promptPending))&&t.jsx(l,{sx:{pt:.5,bgcolor:"#f6f2ea",borderRadius:"6px",px:.75,pb:.5,mt:.5},children:t.jsx(on,{work:j.work,who:te.agent,waiting:j.kind==="session"&&sn(j),asking:j.asking,state:j.state,detail:(F=j.request)==null?void 0:F.text,startedAt:j.StartedAt,promptPending:j.promptPending})}),((le=j==null?void 0:j.files)==null?void 0:le.length)>0&&t.jsx(l,{sx:{pt:.6},children:t.jsx(rn,{files:j.files})}),U&&(we?t.jsx(Le,{item:we,agents:s,busy:z,play:x,onOpenTask:S,onNavigate:C,onNext:b}):t.jsx(l,{sx:{display:"flex",gap:.6,mt:.9},children:t.jsx(R,{kind:"gold",onClick:()=>g(d.TaskId),children:"⌨ Jump into the code space"})}))]},d.TaskId)}),!e.length&&t.jsx(ae,{text:"The desks are quiet. New work will bring an agent to one."}),i.length>0&&t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,px:.5,mt:1.2,mb:.6},children:["WAITING FOR A DESK · ",i.length]}),i.slice(0,6).map(d=>t.jsxs(ee,{onClick:()=>g(d.TaskId),children:[t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.faint},children:[d.ref,d.Waiting>0?` · ✎ ${d.Waiting}`:""]}),t.jsx(f,{noWrap:!0,sx:{fontSize:12.5,color:o.dim},children:d.Title})]},d.TaskId)),i.length>6&&t.jsxs(f,{sx:{fontSize:11,color:o.faint,px:.5},children:["+",i.length-6," more waiting"]}),t.jsxs(l,{sx:{mt:1.5,px:.5},children:[t.jsxs(l,{sx:{display:"flex",alignItems:"baseline",gap:.75},children:[t.jsx(f,{sx:{fontSize:11.5,color:o.dim,flex:1},children:"Desks (agents at once)"}),t.jsx(f,{sx:{..._,fontSize:13,fontWeight:800},children:p??"—"}),t.jsxs(f,{sx:{fontSize:11,color:o.faint},children:[O," free of ",v.length]})]}),t.jsx(an,{size:"small",min:1,max:8,step:1,marks:!0,value:p??4,onChange:(d,j)=>A(j),onChangeCommitted:(d,j)=>E.patch("/api/settings",{name:"auto_sessions",value:String(j)}).catch(()=>{}),sx:{mt:.25,color:o.gold}})]})]})}const He=e=>{try{const i=JSON.parse((e==null?void 0:e.Checklist)||"[]");return Array.isArray(i)?i.filter(r=>r&&r.text):[]}catch{return[]}};function An({items:e,...i}){return e.length?[["📅 COMING UP",e.filter(s=>s.kind==="meeting"||s.lane==="time"),"#7fd1c6"],["✉ EMAIL · AT THE TABLE",e.filter(s=>s.kind!=="meeting"&&s.lane!=="time"&&Ce(s)==="email"),"#f0c05a"],["💬 CHAT · IN THE HUDDLE",e.filter(s=>s.kind!=="meeting"&&s.lane!=="time"&&Ce(s)==="chat"),"#b9c3ff"],["🔧 FROM YOUR TOOLS",e.filter(s=>s.kind!=="meeting"&&s.lane!=="time"&&Ce(s)==="tool"),"#aeb6bf"]].filter(([,s])=>s.length).map(([s,a,u],y)=>t.jsxs(l,{sx:{mt:y?1.2:0},children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:u,px:.5,mb:.6},children:[s," · ",a.length]}),t.jsx(Re,{...i,items:a})]},s)):t.jsx(ae,{text:"The meeting room is empty. Nobody is waiting on you."})}function Dn({gym:e,picked:i,setPicked:r,busy:s,play:a,reload:u,onOpenTask:y,onNext:I,...z}){if(!e.length)return t.jsx(ae,{text:"No tasks of your own. Rest day."});const x=(S,C)=>a(C.done?null:"rep",null,async()=>{const{data:b}=await E.patch(`/api/tasks/${S.TaskId}/checklist/${C.id}`,{done:!C.done});return b!=null&&b.closed&&await a("set",null,async()=>!0),u(),b}),g=S=>{var C;return a("set",((C=S.item)==null?void 0:C.key)||null,async()=>{const b=await ln(E,"task.complete",S.task.TaskId);return u(),b||!0})};return e.map(S=>{var A,O,v,m,D,B;const C=i===S.key,b=He(S.task),w=b.filter(d=>d.done).length,$=((A=S.task)==null?void 0:A.Title)||((O=S.item)==null?void 0:O.title),p=((v=S.task)==null?void 0:v.ref)||((m=S.item)==null?void 0:m.ref);return t.jsxs(ee,{on:C,onClick:()=>r(C?null:S.key),accent:S.item&&q(S.item)?o.red:o.gold,children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.7},children:[t.jsxs(f,{sx:{fontSize:11,fontWeight:800,color:o.gold},children:["🏋 ",p]}),b.length>0&&t.jsxs(f,{sx:{..._,fontSize:10.5,color:o.dim,ml:"auto"},children:[w,"/",b.length," reps"]})]}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:$}),b.length>0&&t.jsx(l,{sx:{height:5,mt:.6,borderRadius:3,bgcolor:"rgba(255,255,255,.08)",overflow:"hidden"},children:t.jsx(l,{sx:{height:"100%",width:`${w/b.length*100}%`,bgcolor:w===b.length?o.green:o.gold,transition:"width .4s"}})}),C&&t.jsxs(l,{onClick:d=>d.stopPropagation(),children:[((D=S.task)==null?void 0:D.Summary)&&t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.7,whiteSpace:"pre-wrap"},children:S.task.Summary}),b.length>0&&t.jsx(l,{sx:{mt:.8},children:b.map(d=>t.jsxs(l,{component:"button",type:"button",disabled:!!s||!d.id,onClick:()=>x(S.task,d),sx:{display:"flex",alignItems:"center",gap:.8,width:"100%",textAlign:"left",border:0,bgcolor:"transparent",color:o.ink,px:.4,py:.45,borderRadius:"6px",cursor:"pointer","&:hover":{bgcolor:o.card}},children:[t.jsx(l,{sx:{width:16,height:16,borderRadius:"4px",flexShrink:0,display:"grid",placeItems:"center",fontSize:11,fontWeight:900,border:`2px solid ${d.done?o.green:o.faint}`,bgcolor:d.done?o.green:"transparent",color:"#1c1f24"},children:d.done?"✓":""}),t.jsx(f,{sx:{fontSize:12.5,color:d.done?o.faint:o.ink,textDecoration:d.done?"line-through":"none",flex:1},children:d.text}),!d.done&&t.jsx(f,{sx:{fontSize:10.5,color:o.gold,fontWeight:800},children:"+5"})]},d.id||d.text))}),S.item&&t.jsx(Le,{item:S.item,agents:z.agents,busy:s,play:a,onOpenTask:y,onNavigate:z.onNavigate,onNext:I}),t.jsxs(l,{sx:{display:"flex",gap:.5,mt:.9,flexWrap:"wrap"},children:[S.task&&t.jsx(R,{kind:"gold",disabled:!!s,onClick:()=>g(S),title:"Closes the task - every box on it is ticked",children:"🏁 Finish the set · +30"}),(S.task||((B=S.item)==null?void 0:B.tid))&&t.jsxs(R,{onClick:()=>y((S.task||S.item).TaskId||S.item.tid),children:["Open ",p]})]})]})]},S.key)})}function Fn({items:e,onSettle:i,...r}){if(!e.length)return t.jsx(ae,{text:"The pot is empty and so is the room. Nothing to catch up on."});const s=y=>(y.lane==="fyi"||y.lane==="report"||y.kind==="fyis")&&!y.bad,a=async()=>{for(const y of e)s(y)?await i(y,"done","read"):await r.play("next",y.key,()=>E.post("/api/funnel/settle",{key:y.key,verb:"surfaced",read:!0}))},u=e.filter(y=>!s(y)).length;return t.jsxs(t.Fragment,{children:[e.length>1&&t.jsx(l,{sx:{mb:1},children:t.jsxs(R,{kind:"mint",disabled:!!r.busy,onClick:a,title:u?`${u} broken - set aside until its error changes, never marked fixed`:void 0,children:["☕ Drain the pot - all ",e.length]})}),t.jsx(Re,{...r,items:e,accent:y=>y.lane==="broken"||y.bad?o.red:o.mint})]})}function Pn({ghosts:e,hub:i,picked:r,setPicked:s,busy:a,play:u,reload:y,...I}){var v;const[z,x]=h.useState(null),[g,S]=h.useState(null),C=h.useRef(new Set),b=h.useRef(new Set),w=((v=i.topics.find(m=>m.Topic===r))==null?void 0:v.Topic)||null;h.useEffect(()=>{if(!w){x(null);return}E.get("/api/hub",{params:{topic:w}}).then(({data:m})=>x(m.data||[])).catch(()=>x(i.data.filter(m=>m.Topic===w)))},[w,i.data]);const $=m=>{C.current.has(m.LoreId)||(C.current.add(m.LoreId),u("pull",null,async()=>!0))},p=m=>{b.current.has(m.LoreId)||(b.current.add(m.LoreId),u("vote",null,()=>E.post(`/api/hub/${m.LoreId}/vote?up=true`)))},A=async()=>{await u("file",null,()=>E.post("/api/hub",{title:g.title.trim(),body:g.body.trim(),topic:g.topic.trim(),kind:"new_idea"}))&&(S(null),y())},O={width:"100%",boxSizing:"border-box",bgcolor:"rgba(0,0,0,.25)",color:o.ink,border:`1px solid ${o.line}`,borderRadius:"8px",p:.9,fontSize:12.5,fontFamily:"inherit",mb:.6};return t.jsxs(t.Fragment,{children:[e.length>0&&t.jsxs(t.Fragment,{children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:"#b9c3ff",px:.5,mb:.6},children:["👻 GHOSTS · THREADS THAT SLIPPED · ",e.length]}),t.jsx(Re,{...I,items:e,picked:r,setPicked:s,busy:a,play:u,accent:()=>"#b9c3ff"})]}),t.jsxs(l,{sx:{display:"flex",alignItems:"center",px:.5,mt:e.length?1.4:0,mb:.6},children:[t.jsxs(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,flex:1},children:["🗄 FILING CABINETS · THE HUB · ",i.topics.length]}),t.jsx(R,{kind:"mint",onClick:()=>S({title:"",body:"",topic:w||""}),children:"+ File a lesson"})]}),g&&t.jsxs(ee,{on:!0,children:[t.jsx(l,{component:"input",placeholder:"What did we learn? (title)",value:g.title,onChange:m=>S({...g,title:m.target.value}),sx:O}),t.jsx(l,{component:"textarea",rows:4,placeholder:"The lesson, so the next person (or agent) doesn't relearn it",value:g.body,onChange:m=>S({...g,body:m.target.value}),sx:O}),t.jsx(l,{component:"input",placeholder:"cabinet (topic)",value:g.topic,onChange:m=>S({...g,topic:m.target.value}),sx:O}),t.jsxs(l,{sx:{display:"flex",gap:.6},children:[t.jsx(R,{kind:"gold",disabled:!!a||!g.title.trim()||!g.body.trim()||!g.topic.trim(),onClick:A,children:"🗂 File it · +25"}),t.jsx(R,{onClick:()=>S(null),children:"Cancel"})]})]}),t.jsxs(l,{sx:{display:"flex",flexWrap:"wrap",gap:.6,mb:1},children:[i.topics.map(m=>t.jsxs(l,{component:"button",type:"button",onClick:()=>s(m.Topic===r?null:m.Topic),sx:{..._,border:`1px solid ${m.Topic===r?o.gold:o.line}`,bgcolor:m.Topic===r?"rgba(240,192,90,.12)":o.card,color:o.ink,borderRadius:"8px",px:1,py:.5,fontSize:11.5,cursor:"pointer"},children:["🗄 ",m.Topic," ",t.jsx("span",{style:{color:o.faint},children:m.n})]},m.Topic)),!i.topics.length&&t.jsx(ae,{text:"The cabinets are empty. File the first lesson."})]}),w&&(z||[]).map(m=>t.jsxs(ee,{onClick:()=>$(m),children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.6},children:[t.jsx(f,{sx:{fontSize:10.5,fontWeight:800,color:o.dim},children:m.Author}),t.jsxs(f,{sx:{..._,fontSize:10,color:o.faint,ml:"auto"},children:["▲ ",m.Score+(b.current.has(m.LoreId)?1:0)]})]}),t.jsx(f,{sx:{fontSize:13,fontWeight:700,mt:.3},children:m.Title}),t.jsx(f,{sx:{fontSize:12,color:o.dim,mt:.4},children:m.Body}),t.jsx(l,{sx:{mt:.7},children:t.jsx(R,{disabled:b.current.has(m.LoreId)||!!a,onClick:()=>p(m),children:"👍 Useful · +10"})})]},m.LoreId))]})}function Nn({chat:e,onAsk:i,busy:r,play:s,pile:a,agents:u,picked:y,onGo:I}){const[z,x]=h.useState(""),g=h.useRef(null);h.useEffect(()=>{var w;(w=g.current)==null||w.scrollIntoView({block:"end"})},[e.length]);const S=w=>{i(w),x("")},C=a.filter(w=>q(w)||w.kind==="agent").slice(0,5),b=a.find(w=>w.key===y);return t.jsxs(t.Fragment,{children:[t.jsxs(l,{sx:{mb:1},children:[e.map((w,$)=>{var p,A,O;return t.jsxs(l,{sx:{display:"flex",flexDirection:"column",alignItems:w.who==="you"?"flex-end":"flex-start",mb:.6},children:[t.jsx(l,{sx:{maxWidth:"88%",px:1.1,py:.7,borderRadius:w.who==="you"?"11px 11px 2px 11px":"11px 11px 11px 2px",bgcolor:w.who==="you"?o.gold:"rgba(127,209,198,.12)",color:w.who==="you"?"#1c1f24":o.ink,border:w.who==="you"?"none":"1px solid rgba(127,209,198,.3)"},children:t.jsx(f,{sx:{fontSize:12.5,whiteSpace:"pre-wrap"},children:w.text})}),w.who==="core"&&$===e.length-1&&t.jsxs(l,{sx:{maxWidth:"94%",width:"100%"},children:[w.item&&t.jsx(l,{sx:{mt:.5},children:t.jsxs(R,{kind:"mint",onClick:()=>I(w.item),children:["Go to it → ",w.item.title]})}),!!((p=w.options)!=null&&p.length)&&t.jsx(l,{sx:{display:"flex",gap:.5,flexWrap:"wrap",mt:.5},children:w.options.map(v=>t.jsx(R,{disabled:!!r,onClick:()=>S(v),children:v},v))}),(!!((A=w.chips)!=null&&A.length)||w.proposal)&&((O=w.item)==null?void 0:O.key)&&t.jsx(jt,{item:w.item,given:w.chips,initial:w.proposal,busy:r,play:s})]})]},$)}),r==="busy"&&t.jsx(f,{sx:{fontSize:11.5,color:o.mint,px:.5},children:"✦ thinking…"}),t.jsx("div",{ref:g})]}),b&&t.jsxs(f,{sx:{fontSize:11,color:o.faint,mb:.5},children:["Asking about: ",t.jsx("b",{style:{color:o.dim},children:b.title})]}),t.jsx(l,{sx:{display:"flex",gap:.5,flexWrap:"wrap",mb:.8},children:["What should I do next?","Who should take the top thing?","What's slipping?"].map(w=>t.jsx(R,{disabled:!!r,onClick:()=>S(w),children:w},w))}),t.jsxs(l,{component:"form",onSubmit:w=>{w.preventDefault(),z.trim()&&S(z)},sx:{display:"flex",gap:.6,mb:1.5},children:[t.jsx(l,{component:"input",value:z,onChange:w=>x(w.target.value),placeholder:"Ask the core…",sx:{flex:1,bgcolor:"rgba(0,0,0,.25)",color:o.ink,border:`1px solid ${o.line}`,borderRadius:"9px",px:1,py:.7,fontSize:12.5,fontFamily:"inherit"}}),t.jsx(R,{kind:"mint",disabled:!!r||!z.trim(),onClick:()=>S(z),children:"Ask"})]}),t.jsx(f,{sx:{fontSize:10,fontWeight:800,letterSpacing:1.2,color:o.faint,px:.5,mb:.6},children:"✦ MATCHMAKER · WHO SHOULD TAKE WHAT"}),C.map(w=>{const $=ke(w,u);return t.jsxs(ee,{onClick:()=>I(w),children:[t.jsxs(l,{sx:{display:"flex",alignItems:"center",gap:.8},children:[t.jsx(f,{noWrap:!0,sx:{fontSize:12.5,fontWeight:700,flex:1},children:w.title}),t.jsxs(f,{sx:{fontSize:11,fontWeight:800,color:$.who==="you"?o.gold:o.mint,whiteSpace:"nowrap"},children:["→ ",$.who]})]}),t.jsxs(f,{sx:{fontSize:11,color:o.faint},children:[w.who," · ",$.why]})]},w.key)}),!C.length&&t.jsx(ae,{text:"Nothing to match. Everyone has what they need."})]})}function Bn({burst:e}){const i=h.useRef(null);return h.useEffect(()=>{const r=i.current;if(!e||!r||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const s=r.getContext("2d"),a=Math.min(window.devicePixelRatio||1,2),u=r.clientWidth,y=r.clientHeight;r.width=u*a,r.height=y*a,s.scale(a,a);const I=[o.gold,o.mint,o.red,"#b9c3ff",o.green,"#ffffff"],z=Array.from({length:280},()=>({x:Math.random()*u,y:-10-Math.random()*y*.35,vx:(Math.random()-.5)*120,vy:160+Math.random()*260,r:Math.random()*Math.PI,vr:(Math.random()-.5)*12,s:6+Math.random()*8,c:I[Math.floor(Math.random()*I.length)],round:Math.random()<.25})),x=performance.now();let g=0,S=x;const C=b=>{const w=(b-x)/1e3,$=Math.min(.1,(b-S)/1e3);S=b,s.clearRect(0,0,u,y),s.globalAlpha=Math.max(0,Math.min(1,4.2-w));for(const p of z)p.x+=(p.vx+Math.sin(b/400+p.r)*40)*$,p.y+=p.vy*$,p.r+=p.vr*$,s.save(),s.translate(p.x,p.y),s.rotate(p.r),s.fillStyle=p.c,p.round?(s.beginPath(),s.arc(0,0,p.s/2.5,0,Math.PI*2),s.fill()):s.fillRect(-p.s/2,-p.s/4,p.s,p.s/2),s.restore();w<4.2?g=requestAnimationFrame(C):s.clearRect(0,0,u,y)};return g=requestAnimationFrame(C),()=>cancelAnimationFrame(g)},[e]),t.jsx(l,{component:"canvas",ref:i,sx:{position:"absolute",inset:0,width:"100%",height:"100%",zIndex:11,pointerEvents:"none"}})}const ae=({text:e})=>t.jsx(f,{sx:{fontSize:12,color:o.faint,px:.75,py:1,lineHeight:1.55},children:e}),_n=Object.freeze(Object.defineProperty({__proto__:null,default:Wn},Symbol.toStringTag,{value:"Module"}));export{_n as A,Ln as z};
|