Add workspaces, conversation sessions, app-managed computers and pictures
- Rail: Add icon with stacked form modals (bot, workspace, computer), coordinator, recent bots with "See all bots", Workspaces section, and a workspace mode listing only its crew - Workspaces: page for context, bots (per-workspace instructions and memory), computers (default, link, unlink), models and delete; conversations scoped per bot per workspace - Sessions: conversations split into searchable, reopenable sessions with carry-over summaries; sessions and new-session header icons - Computers: created and provisioned over the docker socket, home dir kept at DATA_DIR/computers/<id> after delete; super admins only - Models: workspace settings win over a bot's own, then the defaults - Pictures for bots and workspaces; bots editable from the header - Coordinator tools: update_workspace, set_bot_workspace_instructions Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+56
-3
@@ -27,15 +27,40 @@ export const AppData = {
|
||||
PasswordMaxLength: 128,
|
||||
PasswordAttemptLimit: 10,
|
||||
/**
|
||||
* Docker network shared by the main container and every computer. The
|
||||
* installer creates it, and the main computer's container on it.
|
||||
* Docker network shared by the app and every computer. The app creates
|
||||
* it when it sets up its first computer and joins it when it runs in
|
||||
* docker.
|
||||
*/
|
||||
DockerNetworkName: SiteData["SiteSlug"],
|
||||
MainComputerContainerName: `${SiteData["SiteSlug"]}-computer`,
|
||||
/**
|
||||
* Port the AIO sandbox listens on inside its container.
|
||||
*/
|
||||
ComputerPort: 8080,
|
||||
/**
|
||||
* Every computer the app creates runs this image, named
|
||||
* `<ComputerContainerPrefix>-<computer id>` on `DockerNetworkName`.
|
||||
*/
|
||||
ComputerImage: "ghcr.io/agent-infra/sandbox:latest",
|
||||
ComputerContainerPrefix: `${SiteData["SiteSlug"]}-computer`,
|
||||
/**
|
||||
* A computer's home directory (`ComputerHomeDir` in its container) is
|
||||
* kept at `DATA_DIR/<ComputerDataDir>/<id>`, owned by the sandbox's
|
||||
* user. It stays when the computer is deleted.
|
||||
*/
|
||||
ComputerDataDir: "computers",
|
||||
ComputerHomeDir: "/home/gem",
|
||||
ComputerUserUid: 1000,
|
||||
ComputerUserGid: 1000,
|
||||
/**
|
||||
* Per computer container.
|
||||
*/
|
||||
ComputerMemoryBytes: 4 * 1024 * 1024 * 1024,
|
||||
ComputerCpus: 2,
|
||||
ComputerShmBytes: 2 * 1024 * 1024 * 1024,
|
||||
/**
|
||||
* The docker engine API, reached over its unix socket.
|
||||
*/
|
||||
DockerSocketPath: "/var/run/docker.sock",
|
||||
/**
|
||||
* Cap on a bot's `system_prompt` and `memory`, and on a workspace's
|
||||
* `system_prompt`, so self-updates can't grow a prompt without bound.
|
||||
@@ -128,6 +153,30 @@ export const AppData = {
|
||||
* How much of the conversation a bot sees when it replies.
|
||||
*/
|
||||
BotReplyHistoryMessages: 40,
|
||||
/**
|
||||
* A session with this many messages is closed when the user writes
|
||||
* again, and the message starts the next one (carrying a summary).
|
||||
*/
|
||||
BotSessionMaxMessages: 120,
|
||||
/**
|
||||
* How much of a closed session the bot reads to summarize it, and how
|
||||
* long the summary may be.
|
||||
*/
|
||||
BotSessionSummaryMessages: 80,
|
||||
BotSessionSummaryMaxChars: 4000,
|
||||
/**
|
||||
* Sessions listed per page in a conversation's sessions modal.
|
||||
*/
|
||||
BotSessionsPageSize: 30,
|
||||
/**
|
||||
* Worker bots the rail lists, most recently active first, before
|
||||
* "See all bots".
|
||||
*/
|
||||
RailRecentBots: 8,
|
||||
/**
|
||||
* Stones shown beside "See all bots".
|
||||
*/
|
||||
RailSeeAllStones: 4,
|
||||
/**
|
||||
* Tool turns a chat reply may take. Long work goes to a task instead.
|
||||
*/
|
||||
@@ -144,4 +193,8 @@ export const AppData = {
|
||||
* themselves to a reply; older ones are named.
|
||||
*/
|
||||
BotReplyAttachmentMessages: 4,
|
||||
/**
|
||||
* Largest picture a bot or a workspace can have.
|
||||
*/
|
||||
ProfileImageMaxBytes: 5 * 1024 * 1024,
|
||||
} as const;
|
||||
|
||||
@@ -47,3 +47,24 @@ export const CoordinatorSoloNote = `You have no worker bots yet: you do all the
|
||||
export const TaskRunNote = `# Working on a task
|
||||
|
||||
You are working through a task on your own; the user isn't watching. Use your tools until the task is done, then answer with the report for the user: what you did, what you found, and anything left for them. Keep the report short and in markdown. If you're blocked on something only the user can give you, stop and ask for it in the report. If they need to do it on the computer themselves (log in, a captcha, a code), call ask_user_to_take_over first.`;
|
||||
|
||||
/**
|
||||
* Added to a bot's prompt when it works in a workspace: what it learns
|
||||
* there stays there unless it applies everywhere.
|
||||
*/
|
||||
export const WorkspaceLearningNote = `# Learning in this workspace
|
||||
|
||||
update_memory and update_instructions save to this workspace by default: what you learn here applies here. Save to your core memory or instructions (scope "core") only when the user asks for it to apply in every workspace, or when it's plainly about how you work everywhere, not about this workspace. When something learned here looks useful everywhere, suggest saving it to your core and do it once the user agrees.`;
|
||||
|
||||
/**
|
||||
* Asks the text model for a closed session's summary, carried into the
|
||||
* next session's prompt.
|
||||
*/
|
||||
export const SessionSummaryPrompt = `Summarize this conversation for whoever picks it up next: what the user wanted, what was done, decisions made, open questions and anything still in progress. Keep names, numbers, paths and links exactly. Plain markdown bullets, no preamble.`;
|
||||
|
||||
/**
|
||||
* Heads the previous session's summary in a bot's prompt.
|
||||
*/
|
||||
export const PreviousSessionNote = `# Earlier in this conversation
|
||||
|
||||
This session carries on from an earlier one. What happened there:`;
|
||||
|
||||
Reference in New Issue
Block a user