Repository navigation
Bump oliexe/bots to 0.3.1 - #2568
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Bots 0.3.1 is approved and merging, @oliexe. Nothing is needed from you.
The update ships its own OVERVIEW.md, so this PR removes the registry copy and the listing now shows yours. I made no other edits.
Advice for the next release: the old registry overview told readers that testing a stdio MCP server starts it as a process on the host with the daemon's environment, and that Import config reads the MCP lists from Claude Code, Claude Desktop and Cursor, which can contain secrets. Your overview does not say either. Adding two sentences under "Data and permissions" would keep that information on the listing page. Format notes: https://paseo.sh/docs/plugins/publishing#your-listing-page
Review data
- Artifact: npm
@oliexe/paseo-bots@0.3.1(latest dist-tag). Downloaded tarball SHA-512 matchesartifact.integrityand the npm registry value. No absolute or..paths in the archive. - Compared against 0.2.0 file by file (about 90 files changed). Nothing was installed, built or run.
- Install:
npm-shrinkwrap.jsonfixes 471 packages, all from registry.npmjs.org with integrity. The only install-script package is dev-onlyfsevents. The package has no lifecycle scripts of its own, and the production dependencies are@getpaseo/clientand@modelcontextprotocol/sdk. - Network: Composio (
backend.composio.dev,dashboard.composio.dev) for connected apps. The new browser sign-in replaces the pasted project key and sends no redirects. GitHub (api.github.com,raw.githubusercontent.com) for skill import. MCP servers you configure. The OpenAI avatar generation and its key storage were removed. - New MCP OAuth (
server/mcp-oauth*.ts): discovery and token requests use a pinned-DNS client that refuses private and reserved addresses (other than the MCP host you configured), requires HTTPS, S256 PKCE and a matching issuer, and does not follow redirects. Tokens are kept inmcp-oauth.json(mode 0600) in the plugin data folder. Agents get only a scoped local bearer token for a loopback proxy bound to 127.0.0.1, and the proxy checks that the bot still has access before forwarding. Tokens are removed when the server is removed or its URL or headers change. - Execution:
execFile("paseo", ["daemon","status","--json","--home",…])with a fixed argument list, used to reach the local daemon for scheduled routines.spawnfor the stdio MCP test that you start, as in 0.2.0, now run in its own process group and killed on timeout. No eval or dynamic code. - Filesystem: writes and deletes stay in the plugin data folder (symlinks refused for reads and imports). The legacy
.bots/<id>migration validates the bot ID first. - Listing: six PNG screenshots resolve with
image/png. The manifest has a description. REVIEW.md blob3c5e763. - Validation:
node scripts/validate.ts --online --changed --base origin/mainpassed; the PR's Validate check passed on this head. - Not inspected: client UI components were skimmed for DOM injection (one
innerHTMLwith fixed labels); the plugin was not run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
oliexe/bots: 0.2.0 → 0.3.1
@oliexe, this update is ready for review. The published version stays unchanged until approval.
Artifact and validation details
Package:
@oliexe/paseo-bots.{ "previous": { "kind": "npm", "package": "@oliexe/paseo-bots", "version": "0.2.0", "resolved": "https://registry.npmjs.org/@oliexe/paseo-bots/-/paseo-bots-0.2.0.tgz", "integrity": "sha512-ClK2r+tzpKSTOHwdyGR+0sXJlM/JFi+kepi6Vbmm9VyaUSdsFegIwXJSJevTaO2Btt9wR4PVN7QcJ+LR1ZcROg==" }, "proposed": { "kind": "npm", "package": "@oliexe/paseo-bots", "version": "0.3.1", "resolved": "https://registry.npmjs.org/@oliexe/paseo-bots/-/paseo-bots-0.3.1.tgz", "integrity": "sha512-2V4eJ0sje2cJ8Bbog+5QBxikEb5P9nCUMD3RnrcrOq7SN3q3T+Y7T7T9Gu99aXlKE4maJS03850uM0wUDDw5Pg==" } }This version ships OVERVIEW.md, so the registry's copy is removed in this bump.
Inline validation passed: tests and artifact checks. Run
node scripts/validate.ts --online --changedon the completed listing before merging. The default GITHUB_TOKEN does not trigger the PR validation workflow.Artifact diff (truncated)
-Or paste
npm:@oliexe/paseo-botsinto Settings → Plugins → Plugin source in Paseo. Requires Paseo 0.9.2 or later.+Or paste
npm:@oliexe/paseo-botsinto Settings → Plugins → Plugin source in Paseo. To update an npm installation, runpaseo plugin update paseo-bots.+
+To run the current repository version, install a local checkout on the Paseo host:
+
+
bash +git clone https://github.com/oliexe/paseo-bots.git +cd paseo-bots +npm ci +paseo plugin install "$PWD" ++
+For an existing checkout, pull changes, run
npm ci, thenpaseo plugin reload paseo-bots. Installations are per host; choose that host in Paseo when opening Bots.+
+You can use Bots through Paseo's desktop, browser or mobile client, including when the Paseo host runs on another machine. Separately, a bot's Host setting can send its chats to another machine. That target does not receive this installation's memory, skills, connected apps or bot tools, so handoffs and
/learnare unavailable there. File uploads also require the bot to run on the host selected for Bots; images and text attachments work with other targets. For all features on another machine, install Bots there and select that installation in Paseo.Usage
Bots
-2. Chat with it. Every chat is a thread in the bot's workspace; Open in Paseo in a chat's menu shows it in Paseo's own view.
+2. Expand a bot to see its threads. Press + beside the bot or New chat beneath it to start a conversation. New chats use the bot's hidden background workspace; Open in Paseo in a chat's menu opens it in Paseo's workspace view.
Bots can do the setting up too. Ask one in a chat, for example "Create a research team of three bots with Scout as Chief of Staff", and it shows every change on one card; Apply changes makes them. A bot can create, edit and delete bots, teams, routines, library skills and MCP servers, and change what new bots start with. Each bot's earlier settings stay under History in its settings.
+Applying or dismissing a proposal notifies the chat that proposed it, so the bot can continue. Changes are confirmed only after saving succeeds; notifications wait while the bot is working or needs permission. If notification fails, Retry notification sends the saved decision without applying it again.
+
+Use Pin to top in a bot's menu for quick access. The same action on a chat puts it in the Pinned section. Find bots… filters the bot list; Bot list options controls archived bots and chat order. Threads stay nested beneath bots inside the single Bots sidebar entry. Existing conversations remain accessible, and older visible workspaces keep their original visibility. Command Center also offers Open Bots and New bot.
+
+The chat menu also offers Copy transcript, Copy path, Copy chat ID and Archive.
+
+### Drafts and sending
+
+Unsent replies and their attachments are saved on this device, separately for each host, bot and chat. They restore when you return to the conversation. Failed sends keep the reply available for retry. Queued messages are separate from saved drafts and last only for the current app session.
+
+Draft storage keeps up to 50 recent replies within a 2 MB budget. Large image attachments and older drafts may be omitted on reload; a single oversized reply may be shortened to fit.
+
+While a bot is working, sending follows Paseo's When the agent is working preference. Stop agent interrupts its current work and pauses queued replies while preserving the conversation. It cannot undo actions the bot already completed.
+
+On desktop and web, use + to add images or files, or drag them into the composer. Mobile clients offer Paste text. Use Find in chat in the chat header to search a conversation.
+
Memory
A bot updates its
MEMORY.mdwhen it learns something worth keeping, for example when you say "Remember that I prefer short answers". New chats start with it.In the bot's settings, Memory shows
MEMORY.mdand its topic files, which you can edit, a Daily log of its chats, and Changes, where Undo puts a file back the way it was.+The memory panel shows how much enters each chat: up to 200 lines or 24 KB of
MEMORY.md. It warns when the end is left out; topic files remain available for the bot to read when needed. If a file changes while you are editing it, saving reports the conflict instead of overwriting the newer version.+
Routines
-3. Pick when it repeats: a preset such as Weekdays 9:00 or your own cron expression, Once, or When its webhook is called.
+3. Pick when it repeats: a preset such as Weekdays 9:00, your own cron expression, a Fixed interval of 5–1440 minutes, Once, or When its webhook is called.
Bots can propose routines too: ask in a chat, then press Create routine on the card. A webhook routine's URL is under Copy webhook URL in its menu;
POSTto it from this computer.+For an overview across bots on the current host, open Bot list options beside the Bots list heading, then Manage routines. It includes search, pause/resume, manual runs and run history. Cron routines can use an explicit IANA time zone; otherwise they follow the host's time zone. Interval routines retain their cadence across restarts. Scheduled and manual triggers skip a routine while an earlier run is working or waiting for permission; webhooks allow up to three unfinished runs.
+
+Routines run on the host that stores the bot and are unavailable when that bot targets another host. The daemon must remain running, but an open Bots screen is not required. Unattended startup uses the installed
paseoCLI, which must be available on the daemon'sPATH.+
+Ask a bot to list its routines and recent runs, run a routine now, or stop an active run. The
list_routines,run_routineandcancel_routine_runtools operate on that bot's routines. Stopping a run keeps its conversation and history, leaves its schedule unchanged, and cannot undo actions already completed.+
+You can also open Activity → Runs in a bot's routines and press Stop for an active run. The same control is available from the routines overview. If interruption fails, the run stays visible with Retry stop; a run that finishes during the request keeps its actual outcome.
+
+### Interactive chat
+
+Bots can show confirmation cards, single- or multiple-choice questions, forms and editable drafts with the
show_cardtool. Your answer returns to the original chat. Approving a draft sends its edited content back to the bot; it does not itself send an email or publish anything. Add to reply puts a draft in the composer and preserves text already there.+
+Cards retain their answers across reloads and reject changed answers after submission. Failed deliveries can be retried with the same answer. Successful background tool calls are grouped into expandable steps; active calls, failures and cards that need an answer stay visible. Search and fetch results expose clickable sources.
+
+In Bots, recognized card answers appear as readable confirmations and labeled fields; Show original response reveals the full message sent to the bot. Some restored conversations may show the original response instead. User and assistant messages have Quote in reply and Save message actions. Open Saved messages from the chat header to return to the original message. Bookmarks sync with the host and stay out of bot and team exports.
+
+When one bot asks another for help, a handoff card shows the receiving bot's status and latest reply. Open conversation takes you to that bot's chat; Review request appears when it needs approval. Each bot retains its own tools and permissions.
+
+
ask_botsends a completion update back to the asking chat, including whenwait: falseis used or the 50-second wait expires. Setnotify: falseon a call to check the answer manually withcheck_chat. Updates include the delegated chat ID and a shortened answer. They wait while the asking chat is busy or awaiting approval; archived or deleted chats are not reactivated. Pending updates are saved on the host and retried after a connection failure or plugin reload. Paseo acknowledges bot messages before dispatch, so a daemon crash at that point can lose an update;check_chatremains available to retrieve the answer.+
+For follow-up work, call
ask_botwith the same target bot and the earlierchat_id. The worker keeps its conversation and context. Only the bot that started the delegation can continue it, and the worker must finish its current turn and any approval request first. The follow-up's completion returns to the chat that sent it;notify: falseapplies to that request too. Omitchat_idto start a separate task.+
+### Avatars and defaults
+
+Open Identity → Picture, choose Pixel, Modern or Orbital, then adjust the palette, seed and shape. These built-in generators work without an image service or API key. Desktop and web clients can upload a picture; every client can use an image URL.
+
+In New bot, press Configure beside Defaults for new bots to set the provider, model and permissions inline. Manage under Your presets lets you delete saved presets without changing bots created from them. Shared apps, skills and MCP servers remain under Skills & Tools. Controls use Paseo's UI and appearance settings.
+
Teams
-With teams, the Bots screen gets a tab for each team, and Other bots for bots without one (a menu on phones); + next to the tabs adds a team, and right-clicking a tab edits it. A team file carries your bots and their teams: find it in Settings → Plugins, under Bots in the paseo-bots menu.
+With teams, the Bots screen gets a tab for each team, and Other bots for bots without one (a menu on phones); + next to the tabs adds a team, and right-clicking a tab edits it. To import or export your bots and their teams together, open Team map, then Team file in its toolbar.
+
+Bot and team files can include memory and skills. Imported routines start paused, imported skills need review, and MCP credentials must be entered again. Chat history, saved-message bookmarks and device drafts are not included.
Whether a bot may ask others for help is set in its settings under Permissions → Contact other bots: Ask first, Allowed or Off.
@@ -82,28 +151,43 @@
Then give them to a bot in its settings: skills under Skills, MCP servers under Access.
+Remote HTTP and SSE servers also support OAuth under Authentication. Save the server, then press Connect to approve access in your browser. Tokens and client secrets stay on the host; the local proxy refreshes tokens for bots automatically. Client registration accepts a pre-registered client ID and optional secret when automatic registration is unavailable, and shows the redirect URI to register. From another device, use Signing in from another device? and paste the complete callback URL if the browser cannot reach the host's loopback address. Disconnect removes the saved credentials and blocks existing proxy connections. Start a new chat after changing a server from headers to OAuth; OAuth connections run on the host where this plugin is installed. In Paseo 0.16, exact Always allowed OAuth tool grants work with Claude; other providers keep their native approval rules. Legacy SSE requires a provider that supports it, such as Claude; use Streamable HTTP with Codex.
+
Learning
After a task, send
/learnin the chat, or/learn <what to focus on>. The bot writes up what worked as a skill and shows it as a card; press Save skill to add it to Skills & Tools and turn it on for that bot.Connected apps
-Connected apps run on your own Composio account.
+Connected apps use your personal Composio account and its existing app connections. Sign-in works from desktop and mobile, including when the Paseo host runs elsewhere.
-1. Create a project at platform.composio.dev and copy its API key (it starts with
ak_).-2. In Paseo, open Bots, then Skills & Tools at the bottom of the bot list.
-3. Next to Connected apps, press +, paste the key and press Connect.
+1. In Paseo, open Bots, then Skills & Tools at the bottom of the bot list.
+2. Open Connected apps and press Sign in to Composio.
+3. Approve the sign-in in your browser. Check that the approval code matches the one in Bots.
4. Find an app, press Connect and finish signing in in your browser.
5. Switch the app on for a bot under the bot's Access settings, or on the app's page.
+Existing project-key installations keep working. Signing in switches Bots to your personal Composio project; connections in the old project stay there. Signing out removes credentials from this host and leaves app connections in Composio.
+
To add a second account of an app, such as a work and a personal Gmail, open the app's page and press Connect next to Add another account. Bots pick an account by its name.
When a bot needs an app that isn't connected, its chat shows a card: press Sign in, finish on Composio's page, then Continue. Signing in from the card also switches the app on for that bot.
To limit what a bot does with an app, open the app under the bot's Access settings: allow all of its tools, only the read-only ones, or the ones you choose, and keep the bot to one account. The relay refuses anything else, and turns off Composio's remote workbench for bots with limits, since code there could run any app's tools.
-The key stays on the Paseo host and never reaches the agents: bots reach Composio through a local relay that only lets each bot use the apps you switched on for it.
+Your Composio credentials stay on the Paseo host and never reach the agents: bots reach Composio through a local relay that only lets each bot use the apps you switched on for it.
Paseo tools
Bots get Paseo's own tools, so you can ask one in a chat to start other agents, open workspaces and terminals, set up schedules or use the browser. A bot's Access settings show whether they're on, and Turn on there switches them on for every agent on the host.
+
+## Development
+
+
bash +npm ci +npm test +npm run typecheck +paseo plugin reload paseo-bots ++
+The reload command applies changes to a local checkout already installed on that host.
paseo plugin lsshows its status;paseo plugin logs paseo-botsshows startup and runtime errors. Source changes do not require restarting the Paseo daemon.diff -ruN a/package/client/AttachmentPill.tsx b/package/client/AttachmentPill.tsx
--- a/package/client/AttachmentPill.tsx 1985-10-26 08:15:00.000000000 +0000
+++ b/package/client/AttachmentPill.tsx 1985-10-26 08:15:00.000000000 +0000
@@ -1,5 +1,5 @@
import type { PluginTheme } from "@getpaseo/plugin";
-import { Icon, Modal, ScrollView } from "@getpaseo/plugin/client/react-native";
+import { Icon, Modal, ScrollView } from "@getpaseo/plugin/client/ui";
import { useState, type ReactNode } from "react";
import { ActivityIndicator, Image, Platform, Pressable, Text, View, useWindowDimensions } from "react-native";
import { getFileTypeLabel, type ComposerAttachment } from "../shared/attachments";
diff -ruN a/package/client/Avatar.tsx b/package/client/Avatar.tsx
--- a/package/client/Avatar.tsx 1985-10-26 08:15:00.000000000 +0000
+++ b/package/client/Avatar.tsx 1985-10-26 08:15:00.000000000 +0000
@@ -1,9 +1,11 @@
-import { createContext, useContext, useMemo, type ReactNode } from "react";
-import { Image, View } from "react-native";
+import { createContext, useContext, useMemo, useState, type ReactNode } from "react";
+import { Image, Platform, View } from "react-native";
import { pixelAvatar, SPRITE_SIZE } from "../shared/avatar";
+import { avatarStyle, smoothAvatar, type AvatarStyle } from "../shared/avatar-options";
import type { BotAvatar, BotGroup } from "../shared/bot";
import { teamLogoOf } from "../shared/groups";
import type { PixelRun } from "../shared/pixel";
+import { pixelSpriteDataUri } from "../shared/pixel-svg";
import { LOGO_SIZE, teamLogo } from "../shared/team-logo";
interface AvatarProps {
@@ -28,11 +30,23 @@
const themeDark = useContext(AvatarThemeContext);
const dark = darkProp ?? themeDark;
const palette = avatar.palette ?? null;
const radius = radiusFor(avatar.shape, size);
}
+}
+function GeneratedAvatar({ seed, palette, style, dark, size, radius }: { seed: string; palette: number | null; style: AvatarStyle; dark: boolean; size: number; radius: number }) {
return ;
}
@@ -55,9 +69,11 @@
insetfalse fills it (team logos).*/
export function PixelSprite({ sprite, size, radius = size / 2, grid = SPRITE_SIZE, inset = true }: { sprite: { background: string; rows: PixelRun[][] }; size: number; radius?: number; grid?: number; inset?: boolean }) {
// Small avatars (sidebar rows) use the full frame so each sprite pixel stays about one point.
const inner = !inset || size <= 24 ? size : size * 0.82;
const pixel = inner / grid;
return (
<View
accessibilityElementsHidden
diff -ruN a/package/client/BotDialogs.tsx b/package/client/BotDialogs.tsx
--- a/package/client/BotDialogs.tsx 1985-10-26 08:15:00.000000000 +0000
+++ b/package/client/BotDialogs.tsx 1985-10-26 08:15:00.000000000 +0000
@@ -1,15 +1,16 @@
import type { PluginTheme } from "@getpaseo/plugin";
import { useRpc } from "@getpaseo/plugin/client";
-import { Icon, Modal, TextInput, copyText, useToast } from "@getpaseo/plugin/client/react-native";
-import { SettingsAction, SettingsCard, SettingsSection, SettingsSwitch } from "@getpaseo/plugin/client/ui";
-import { useEffect, useState } from "react";
+import { copyText, Icon, Modal, SettingsAction, SettingsCard, SettingsSection, SettingsSwitch, TextInput, useToast } from "@getpaseo/plugin/client/ui";
+import { useEffect, useRef, useState } from "react";
import { Pressable, Text, View } from "react-native";
-import type { Bot, BotAvatar, Preset } from "../shared/bot";
+import type { Bot, BotAvatar, BotDefaults, Preset } from "../shared/bot";
import { exportBotRpc } from "../shared/rpc";
import { BOT_TEMPLATES, type BotTemplate } from "../shared/templates";
import { Avatar } from "./Avatar";
+import { NewBotDefaults } from "./NewBotDefaults";
+import type { LocalHost } from "./data";
import { errorText, MONO_FONT, MONO_PROPS, nativeTokens, useHover } from "./native";
-import { Button, FormTextArea, SheetActions } from "./panel/controls";
+import { Button, FormTextArea, SectionLink, SheetActions } from "./panel/controls";
import type { MenuEntry } from "./ui/Menu";
import { code, codeLine, ui } from "./typography";
@@ -20,39 +21,61 @@
export function NewBotDialog({
colors,
presets,
onClose,
onCreate,
onImport,
}: {
colors: Colors;
presets: readonly Preset[];
onClose(): void;
onImport(json: string): Promise;
}) {
const [json, setJson] = useState("");
const [importing, setImporting] = useState(false);
const toast = useToast();
return (
<Modal title="New bot" open onOpenChange={(open) => !open && onClose()}>
<Modal.Content>
diff -ruN a/package/client/BotSidebar.tsx b/package/client/BotSidebar.tsx
--- a/package/client/BotSidebar.tsx 1985-10-26 08:15:00.000000000 +0000
+++ b/package/client/BotSidebar.tsx 1985-10-26 08:15:00.000000000 +0000
@@ -1,6 +1,6 @@
import type { PluginTheme } from "@getpaseo/plugin";
-import type { PaseoAgent } from "@getpaseo/client";
-import { Icon, ScrollView } from "@getpaseo/plugin/client/react-native";
+import type { PaseoAgent } from "./paseo";
+import { Icon, ScrollView } from "@getpaseo/plugin/client/ui";
import { memo, useEffect, useRef, useState, type ReactNode, type RefObject } from "react";
import { Animated, Easing, Platform, Pressable, Text, View, type LayoutRectangle } from "react-native";
import type { Bot, BotGroup, BotListUi } from "../shared/bot";
@@ -9,10 +9,11 @@
import { aggregateBuckets, BUCKET_LABELS, chatBucket, orderChats, SIDEBAR_GROUP_LIMIT, type ChatBucket } from "../shared/sidebar";
import { Avatar } from "./Avatar";
import { useBotChats, useBotHost, type LocalHost } from "./data";
-import { openLibrary } from "./navigation";
+import { useOpenLibrary } from "./navigation";
import { nativeTokens, useHover, type NativeTokens } from "./native";
import { Splash } from "./Splash";
import { ui } from "./typography";
+import { SearchField } from "./panel/controls";
import { contextMenuProps, measureAnchor } from "./ui/Menu";
import { tooltip } from "./ui/Tooltip";
@@ -27,6 +28,8 @@
chatId: string | null;
/** First message to send straight away when starting a new chat. */
prompt?: string;
promptstarts; Paseo derives one from the prompt otherwise. */}
export type MenuSource = "kebab" | "context";
@@ -72,7 +75,13 @@
export function BotSidebar(props: BotSidebarProps) {
const { colors, bots, openTab, ui: listUi, hiddenArchivedCount, bottomInset, onNewBot, onShowArchived, onTeamMap, onEditTeam } = props;
const tokens = nativeTokens(colors);
${bot.name} ${bot.title} ${bot.description}.toLocaleLowerCase();const pinnedIds = new Set(listUi.pinnedChats.map((pin) => pin.chatId));
const listedBots = new Map(shown.map((bot) => [bot.id, bot]));
const pins = listUi.pinnedChats.filter((pin) => listedBots.has(pin.botId));
@@ -87,6 +96,7 @@
}
return (
<View style={{ flex: 1, paddingBottom: bottomInset, backgroundColor: tokens.surfaceSidebar }}>
@@ -94,11 +104,11 @@
contentContainerStyle={{ paddingHorizontal: 8, paddingTop: 2, paddingBottom: 16 }}
>
{pins.length > 0 ? <PinnedSection {...props} pins={pins} botById={listedBots} tokens={tokens} /> : null}
@@ -129,8 +139,8 @@
<Pressable
ref={ref}
accessibilityRole="button"
@@ -142,6 +152,7 @@
}
function Footer({ colors, onNewBot, onTeamMap }: { colors: Colors; onNewBot(): void; onTeamMap(): void }) {
const { hovered, hoverProps } = useHover();
return (
<View style={{ flexDirection: "row", alignItems: "center", gap: 8, paddingHorizontal: 8, paddingVertical: 12, borderTopWidth: 1, borderTopColor: colors.border }}>
diff -ruN a/package/client/BotsSurface.tsx b/package/client/BotsSurface.tsx
--- a/package/client/BotsSurface.tsx 1985-10-26 08:15:00.000000000 +0000
+++ b/package/client/BotsSurface.tsx 1985-10-26 08:15:00.000000000 +0000
@@ -1,12 +1,11 @@
import type { PluginTheme } from "@getpaseo/plugin";
-import type { PaseoAgent } from "@getpaseo/client";
-import type { PluginSurfaceProps } from "@getpaseo/plugin/client";
+import type { PaseoAgent } from "./paseo";
+import type { PluginScreenProps, PluginOpenScreenInput } from "@getpaseo/plugin/client";
import { useRpc } from "@getpaseo/plugin/client";
-import { copyText, useToast } from "@getpaseo/plugin/client/react-native";
-import { SettingsAction, SettingsCard } from "@getpaseo/plugin/client/ui";
+import { copyText, Icon, SettingsAction, SettingsCard, useToast } from "@getpaseo/plugin/client/ui";
import { useQueryClient } from "@tanstack/react-query";
import { useEffect, useRef, useState } from "react";
-import { ActivityIndicator, BackHandler, type LayoutRectangle, Platform, Text, View } from "react-native";
+import { ActivityIndicator, BackHandler, type LayoutRectangle, Platform, Pressable, Text, View } from "react-native";
import { randomSeed } from "../shared/avatar";
import { applyDefaults, DEFAULT_BOT_DEFAULTS, DEFAULT_BOT_LIST_UI, EMPTY_LIBRARY, newBotId, newGroupId, presetFromBot, pushHistory, type Bot, type BotGroup, type BotListUi, type Library } from "../shared/bot";
import { saveTeam, tabOf, teamTabs, withoutBot } from "../shared/groups";
@@ -23,23 +22,31 @@
import { useBotHost, useChatInvalidation, useHostResolver, useProviders, type LocalHost } from "./data";
import { takeIntent } from "./intent";
import { LibraryView } from "./library/LibraryView";
-import { onLibraryTarget, type LibraryTarget } from "./navigation";
+import { LibraryNavigation, type LibraryTarget } from "./navigation";
+import { chatScreen, chatSelectionKey, libraryScreen as libraryRoute, libraryTarget, startedChat, rememberStartedChat, claimAutomaticChat, retryAutomaticChat, parentScreen, teamMapScreen, type BotScreen } from "./screen-navigation";
import { Splash } from "./Splash";
import { TeamMap } from "./teams/TeamMap";
import { TeamSheet } from "./teams/TeamSheet";
+import { TeamFileDialog } from "./teams/TeamFileDialog";
import { TeamTabsRow, TeamTabSwitcher } from "./teams/TeamTabs";
import { ResizeHandle, SlideOver } from "./ui/Columns";
-import { fitColumns } from "../shared/layout";
+import { hasTouchScreen } from "./web";
+import { fitColumns, isTouchLayout } from "../shared/layout";
import { confirmDialog, errorText, nativeTokens } from "./native";
import { measureAnchor, MenuProvider, useMenu } from "./ui/Menu";
import { useTooltipTheme } from "./ui/Tooltip";
import { homeIndicatorInset, useKeyboardHeight } from "./keyboard";
import { newMessageId } from "./sent-attachments";
-import { BotPanel, type SectionId } from "./panel/BotPanel";
+import { BotPanel, botSectionTitle, type SectionId } from "./panel/BotPanel";
import { useBotSettings } from "./useBotSettings";
import { fullTimeline, useChat } from "./useChat";
import { newUuid } from "../shared/uuid";
import { ui, useTypeScale } from "./typography";
+import { mergeBotEdit, type BotEdit } from "../shared/bot-edits";
+import { useSurfaceVisibility } from "./useSurfaceVisibility";
+import { useDraftStore } from "./chat/composer/drafts";
+import { composerDraftKey } from "./chat/composer/logic";
+import { beginDraftCreation } from "./chat/composer/draft-creation";
type Colors = PluginTheme["colors"];
@@ -50,7 +57,12 @@
/** Autosave delay after the last edit in the settings panel. */
const SAVE_DELAY_MS = 600;
-export function BotsSurface(props: PluginSurfaceProps) {
+interface BotsSurfaceProps extends PluginScreenProps {
+}
+export function BotsSurface(props: BotsSurfaceProps) {
const { colors } = props.theme;
useTooltipTheme(colors);
return (
@@ -63,11 +75,12 @@
}
-function BotsSurfaceContent({ theme, layout, host, navigation }: PluginSurfaceProps) {
+function BotsSurfaceContent({ theme, layout, host, navigation, params, screen = "bots", openScreen }: BotsSurfaceProps) {
const { colors } = theme;
const { settings, latest, commit } = useBotSettings();
const toast = useToast();
const menu = useMenu();
const queryClient = useQueryClient();
const localHost: LocalHost = { id: host.id, label: host.label };
const localProviders = useProviders(useBotHost(null, localHost));
@@ -76,18 +89,35 @@
const importBot = useRpc(importBotRpc);
const importTeam = useRpc(importTeamRpc);
const [panelVersion, setPanelVersion] = useState(0);
const [creating, setCreating] = useState(false);
/** The team map replaces the chat pane while open. */
const [editingTeam, setEditingTeam] = useState<BotGroup | "new" | null>(null);
/** Skills & Tools replaces the bot list and chat while open;
targetis its page (null: the list, on compact). */const [renaming, setRenaming] = useState<Bot | null>(null);
const [exporting, setExporting] = useState<Bot | null>(null);
// List state (collapsed groups, pins, order, display options) applies at once and saves behind.
const [uiOverride, setUiOverride] = useState<BotListUi | null>(null);
const uiRef = useRef<BotListUi | null>(null);
@@ -98,7 +128,7 @@
const [surfaceWidth, setSurfaceWidth] = useState(0);
/** Widths while a resize handle is being dragged; saved to the list UI on release. */
const [dragWidths, setDragWidths] = useState<{ list?: number; panel?: number }>({});
const typeVersion = useTypeScale();
useChatInvalidation();
@@ -118,24 +148,25 @@
const draft = pending[bot.id];
if (!draft) return bot;
history = pushHistory(history, bot);
if (ok) {
}
};
const patchBot = (botId: string, patch: Partial) => {
if (saveTimer.current) clearTimeout(saveTimer.current);
saveTimer.current = setTimeout(() => void flush(), SAVE_DELAY_MS);
};
@@ -155,7 +186,12 @@
/** Applies a patch to the saved bot and to any unsaved draft of it, so autosave can't undo it. */
const updateBot = (botId: string, patch: Partial, recordHistory = false) => {
return commit((values) => {
const previous = values.bots.find((entry) => entry.id === botId);
if (!previous) return values;
@@ -170,20 +206,15 @@
/** Opens Skills & Tools. Unsaved bot edits are saved first so the library sees them. */
const enterLibrary = (target: LibraryTarget | null) => {
void flush();
setLibraryView({ target });
};
// the settings list, then the settings, Skills & Tools (page, then list), and on phones the
// team map or a chat back to the bot list. Android's Back and the phone swipes use it; with
@@ -214,10 +245,10 @@
const goBackRef = useRef(goBack);
goBackRef.current = goBack;
useEffect(() => {
const subscription = BackHandler.addEventListener("hardwareBackPress", () => goBackRef.current());
return () => subscription.remove();
}, [routed]);
// "New bot" from the Command Center opens a fresh Bots screen; only that one consumes it.
useEffect(() => {
@@ -235,7 +266,7 @@
)}
{settings.status === "invalid" ? (
@@ -252,7 +283,7 @@
setDragWidths({});
updateUi((current) => ({ ...current, [key]: Math.round(width) }));
};
const allBots = settings.values.bots.map((bot) => drafts[bot.id] ? mergeBotEdit(bot, drafts[bot.id]!) : bot);
const library = settings.values.library ?? EMPTY_LIBRARY;
const groups = settings.values.groups ?? [];
const listed = allBots
@@ -266,17 +297,28 @@
// ------------------------------------------------------------ actions
/** Opens a chat, showing its bot in the list: expanded, and its team's tab open. */
const tab = openTab && tabOf(next.botId, groups) !== openTab.id ? tabOf(next.botId, groups) : null;
if (tab || currentUi().collapsed.includes(next.botId)) {
updateUi((current) => ({ ...current, tab: tab ?? current.tab, collapsed: current.collapsed.filter((id) => id !== next.botId) }));
}
};
const openPanel = (bot: Bot, section: SectionId | null) => {
setPanel({ open: true, section });
};
@@ -284,8 +326,11 @@
const addBot = async (bot: Bot, section: SectionId = "identity") => {
const saved = await commit((values) => ({ ...values, bots: [...values.bots, bot] }));
if (saved) {
};
@@ -316,6 +361,7 @@
...values,
bots: values.bots.filter((entry) => entry.id !== bot.id),
history: values.history.filter((entry) => entry.botId !== bot.id),
if (!ok) return;
@@ -468,7 +514,7 @@
}
try {
await botHost.api.agents.ref(chat.id).archive();
@@ -484,7 +530,7 @@
anchor,
align: "end",
width: 232,
@@ -496,6 +542,7 @@
trailing: listUi.chatSort === "manual" ? "Manual" : "Last activity",
onSelect: () => updateUi((current) => ({ ...current, chatSort: current.chatSort === "manual" ? "activity" : "manual" })),
},
};
@@ -515,7 +562,7 @@
selection={selection}
ui={listUi}
localHost={localHost}
@@ -532,7 +579,7 @@
onChatMenu={openChatMenu}
onDisplayMenu={openDisplayMenu}
onEditTeam={setEditingTeam}
);
@@ -540,6 +587,36 @@
? { colors, tabs, openTab, onTab: (tab: string) => updateUi((current) => ({ ...current, tab })), onTeamMenu: openTeamMenu, onNewTeam: () => setEditingTeam("new" as const) }
: null;
<TeamMap
colors={colors}
@@ -547,32 +624,20 @@
bots={allBots}
localHost={localHost}
compact={layout.compact}
) : selectedBot && selection ? (
) : (
);
@@ -583,6 +648,7 @@
key={
${selectedBot.id}:${panelVersion}}