Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,21 @@ diagnostics → Executable overrides**.
own MainSequence deployment, set its API URL as the backend in Settings before signing
in. Set the **Command Center URL** there as well, so project and repository links open
in Command Center, and the **repositories folder** where local checkouts go. Edits
apply at once; **Save settings** keeps them for future sessions.
apply at once, with no Save step.
3. Choose an **organization environment** in the pane header. Nothing is selected for
you, not even Production. Agents, MCPs, projects and deployments are shown for that
environment, and the MainSequence tools Claude calls are bound to it.

MainSequence is one pane across your Code sessions: settings, the environment, the open
section and Activity are the same in every session, whichever project it is in. Only the
**This session** card on Home belongs to the session. See
[One MainSequence across sessions](docs/claude-desktop.md#one-mainsequence-across-sessions).

## What you can do

- **Home.** A **Next steps** card until you have signed in, chosen an environment and a
repositories folder; **This session** with the Code session's folder, **Check status**
and **Update SDK** when one is available; and the last three operations.
and **Update SDK** when one is available; and the last three operations of every session.
- **Code.** The session folder, every repository of your account (marked **Local** when a
canonical checkout exists) and other local copies under the repositories folder. **Set
up** clones a repository into `<folder>/<organization>/projects/<name>-<uid>` with its
Expand Down
52 changes: 31 additions & 21 deletions docs/agent-icons.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,34 @@ visible Agent UUIDs are accepted. Credentials stay in the public devtools sessio
service; only bounded embedded image sources cross the private worker channel.
They are excluded from Activity, model tool results and the plugin store.

Idle assets load in batches of at most four visible Agents. Details/Talk preload
up to twelve declared poses for one Agent. Requests share an in-flight guard and
a five-minute in-memory cache. A failed read gets a one-minute backoff; a failed
media refresh keeps an existing image. Backend, account, environment and
host-session changes discard presentation state; late old-context responses
cannot repopulate it. There is no on-disk media cache or background animation
timer.

An icon changed in Command Center reaches an open pane on its own.
Every listing of the Agents section (environment selection, paging, Refresh)
re-checks the listed Agents' idle icons regardless of age, and while the pane
stays on Agents the hook re-checks them once a minute. A re-check sends the
backend the entity tag (`ETag`) it holds for each drawn icon as `If-None-Match`,
on the canonical icon route only. An icon the backend answers with 304, or with 200
and the same tag (the route sends tags but does not yet answer conditional requests,
so the worker compares them itself and drops the bytes unread), keeps its image and
tag; a changed one arrives with its new tag and is redrawn; a failed re-check keeps
the drawn icon. The timer stops when the pane closes or
another section is shown, and a section left open pauses re-checking after four
hours until Refresh. Poses are still read with Details and Talk only. Tags live in
session memory with the images and are never stored.
Idle assets load in batches of at most eight visible Agents. Every batch has its own
worker and they run at the same time; a worker reads the environment's directory once
and its icons four at a time, so a page of Agents gets its icons together instead of
one batch after another. Details/Talk preload up to twelve declared poses for one Agent.
Requests share an in-flight guard and a ten-minute in-memory cache. A failed read (a slow
backend's timeout, an error status) gets a one-minute backoff, after which the shown Agents
ask for it again once; a failed media refresh keeps an existing image. Backend, account,
environment and host-session changes discard presentation state; late old-context
responses cannot repopulate it. There is no background animation timer.

Idle icons are also shared by every Claude session for ten minutes. The worker keeps
them, with their tags, in one file per backend, environment and account under the
MainSequence state folder (`claude-desktop/agent-icons`, owner-only). Within ten minutes
of any session reading an icon, another session's worker answers it from that file
without contacting the backend. An Agent the directory lists without an icon is
remembered the same way; a read that failed is never kept, so the next request tries
again. Poses are not kept there. The file holds image markup and tags only, never
credentials.

An icon changed in Command Center reaches an open pane on its own within ten minutes.
While the pane stays on Agents the hook re-checks the listed Agents' idle icons every
ten minutes, through the shared file. **Refresh** reads the list and every icon from
the backend at once. A re-check sends the backend the entity tag (`ETag`) it holds for
each drawn icon as `If-None-Match`, on the canonical icon route only. An icon the backend
answers with 304, or with 200 and the same tag (the route sends tags but does not yet
answer conditional requests, so the worker compares them itself and drops the bytes
unread), keeps its image and tag; a changed one arrives with its new tag and is redrawn;
a failed re-check keeps the drawn icon. The timer stops when the pane closes or another
section is shown, and a section left open pauses re-checking after four hours until
Refresh. Poses are still read with Details and Talk only. Icons and tags never enter
the plugin store.
66 changes: 54 additions & 12 deletions docs/claude-desktop.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ native pane; startup and plugin reloads do not automatically open it. The button
the session footer remains available when the pane is closed. Click the
button to reopen and focus the same pane without typing a command or submitting
a message. `/ms` remains an optional fallback. The launcher preserves existing
footer controls and does not read or save settings, accounts or credentials.
footer controls and never saves settings, accounts or credentials; drawing it
only reads what the other sessions changed.
It appears in local Code sessions with the plugin loaded, not on Claude's home
screen or unrelated chat surfaces. Claude controls its final position and native
button styling: the tested Desktop build renders a compact text button in the
Expand All @@ -38,9 +39,12 @@ CSS injected into the Desktop application.

The pane shows [platform agent icons](agent-icons.md) in the agent
directory, details, composer activity band and attributed command/tool rows. Existing native
transcript content and footer controls remain visible. An icon changed in Command Center reaches an open pane on its own: every listing of the Agents section re-checks the listed
agents' icons, and while the pane stays on Agents they are re-checked once a minute with the
backend's entity tags, so only a changed icon is redrawn.
transcript content and footer controls remain visible. The Agents list and its icons are
shared by every session for ten minutes: pressing Agents, here or in another session, draws
them at once without asking the backend, an older list is drawn while it is read again, and
**Refresh** reads the list and every icon at once. While the pane stays on Agents the icons
are re-checked every ten minutes with the backend's entity tags, so an icon changed in
Command Center is redrawn on its own.

Git/SSH, uv for Python, npm for frontend repositories and Docker/buildx for builds are
required only for the corresponding operations. They are not installed silently.
Expand All @@ -54,10 +58,47 @@ Home is the landing view. A **Next steps** card lists what is still missing (sig
choose an environment, choose a repositories folder) with one button per step and
disappears once everything is set. **This session** shows the Code session's folder;
**Check status** reads its branch and SDK state through the existing `status` and
`sdk-status` actions and offers **Update SDK** when one is supported. **Recent** shows
the last three operations. Nothing is spawned on startup beyond the existing
`sdk-status` actions and offers **Update SDK** when one is supported. **This session**
is the one part of the pane that differs between Code sessions. **Recent** shows
the last three operations of every session. Nothing is spawned on startup beyond the existing
preference and session reads.

## One MainSequence across sessions

MainSequence is one pane across all of your local Code sessions. Switching to a session
in another project shows what you left in the last one:

- the settings (backend, repositories folder, Command Center URL, organization folder,
Node executable);
- the organization environment, so every session registers the same environment's
MainSequence tools, and a tool of the previous environment is refused with
*no longer connected*;
- the section and what it has open: a repository detail, the deployments list or a run,
a project, an MCP, an agent's details, and the searches;
- the Agents list and its icons, read once for every session and kept for ten minutes
(**Refresh** reads them again at once);
- a sign-in, a sign-out, an MCP connected or disconnected, and a repository set up or
removed, which the other sessions read again;
- Activity, the header's running counter and Claude's status line. Each operation carries
the name of the session folder that runs it. Only that session can cancel it. A running
operation whose session stops reporting for three minutes is shown as **Interrupted**.
Reads that only draw a session's own screen (status checks, listings) stay in that
session's Activity.

Only the **This session** card on Home belongs to the session: its folder, branch, SDK
status and latest deployment. Agent conversations stay in the Claude chat they were
started in, and an environment change ends the selected one there.

The plugin keeps this in its own Claude Code store file, which every session reads from disk.
A session reads it again when its pane opens or is drawn (Desktop draws a session when you
switch to it), every two seconds while its pane is open, and before a MainSequence tool runs,
so a session in the background follows an environment chosen elsewhere before its tools
are used. Each session writes only what the person changed in it, one store key at a
time under the store's file lock, so two sessions never overwrite each other's keys. A
setting is written once typing pauses for a moment; while it is waiting, that session keeps
its own value. A screen choice made in two sessions at once ends with the last one written.
A session's Activity older than a week is removed.

## Settings: MainSequence login and workspace

The pane reads the existing MainSequence session on startup without initiating a
Expand All @@ -76,9 +117,9 @@ plugin values take precedence. Otherwise, shared devtools resolves the backend f
`https://api.main-sequence.app`. The repositories folder uses the existing absolute
`mainsequence_path`, otherwise `<home>/mainsequence` displayed as a full path.
Defaults are usable without saving and do not depend on successful authentication.
Startup resolution never overwrites a user's in-progress edits. Edits apply for the
current session; **Save settings** retains them for future sessions. Unknown/legacy
fields remain intact. Startup never writes the shared configuration.
Startup resolution never overwrites a user's in-progress edits. There is no Save step:
an edit applies at once and reaches every other session shortly after typing stops.
Unknown/legacy fields remain intact. Startup never writes the shared configuration.
Runtime diagnostics and the Node executable override are collapsed under Advanced.
Technical JSON is hidden until requested.

Expand Down Expand Up @@ -253,9 +294,10 @@ content, converted to Messages API blocks by the hook. devtools gives the projec
120 s and honours a tool's advertised timeout up to 300 s, and its error messages name the
endpoint, the request and the status.

Activity shows actual operations from the session, their running/completed/failed/
cancelled status, progress text, outcome and partial-effect warnings. Result details
are collapsed. Cancellation stops the worker stream; it does not promise rollback.
Activity shows actual operations, their running/completed/failed/cancelled status,
progress text, outcome and partial-effect warnings. It lists this session's operations
and the other sessions' (see [One MainSequence across sessions](#one-mainsequence-across-sessions)).
Result details are collapsed. Cancellation stops the worker stream; it does not promise rollback.
MCP discovery runs alongside connected-tool registration. Tools lists the connected
MCPs of the selected environment as rows with their registered tool count; **Add MCP** opens a search over the environment's releases
with a **Connect** button per result, and a connected MCP's detail lists its tools.
Expand Down
4 changes: 2 additions & 2 deletions manifests/claude/hooks/agentView.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export function renderAgents(ui, state, actions) {
const result = state.results['devtools.agents-list'], page = record(result?.data);
const agents = rows(page).filter(agent => agent.environmentUid === state.fields.mcpEnvironment);
return column([
inline([Box({ flexGrow: 1, flexShrink: 1, minWidth: 0, children: [Input({ key: 'field-agentSearch', value: state.fields.agentSearch, placeholder: 'Search agents', autoFocus: true, onInput: value => actions.field('agentSearch', value), onSubmit: value => { actions.field('agentSearch', value); actions.refreshAgents(); } })] }),
button('agents-search', 'Search', actions.refreshAgents, { plain: true }),
inline([Box({ flexGrow: 1, flexShrink: 1, minWidth: 0, children: [Input({ key: 'field-agentSearch', value: state.fields.agentSearch, placeholder: 'Search agents', autoFocus: true, onInput: value => actions.field('agentSearch', value), onSubmit: value => { actions.field('agentSearch', value); actions.searchAgents(); } })] }),
button('agents-search', 'Search', actions.searchAgents, { plain: true }),
button('agents-refresh', state.agentsLoading ? 'Loading…' : 'Refresh', actions.refreshAgents, { plain: true, dim: true, available: !state.agentsLoading })]),
result?.status === 'failure' && column([status('error', result.summary), button('agents-retry', 'Try again', actions.refreshAgents, { plain: true })]),
state.agentsLoading && muted('Loading agents from this environment…'),
Expand Down
Loading
Loading