Skip to content

Sync main into v1.3.0 - #930

Draft
Memtensor-AI wants to merge 286 commits into
MemTensor:v1.3.0from
Memtensor-AI:sync/main-to-v1.3.0
Draft

Memtensor-AI wants to merge 286 commits into
MemTensor:v1.3.0from
Memtensor-AI:sync/main-to-v1.3.0

Conversation

@Memtensor-AI

Copy link
Copy Markdown
Collaborator

Synchronize release #451415117 main snapshot dfb43b613da4f8f18e5a666259b5b12f216935a7 into v1.3.0.

Cloud CodingAgent resolves conflicts and validation failures in the same task. Verification is bound to the current PR head and target SHA. Maintainer review and merge remain required.

sunqi and others added 30 commits November 7, 2026 14:43
Listing local sessions parses a few seconds of agent history. It ran on the
backend thread, which also answers messages, page loads, file reads and the
project sync, so everything queued behind it: a scan of ten agents blocked
that thread for up to 317ms per stall while the whole pass took ~4.7s.

The stores are now read on a worker thread and the caller only awaits the
result. The reader takes this as an injected offload, so the adapters layer
stays free of worker concerns:

- local-session-reader: the scan asks the offload for the sources whose store
  digest changed and reads itself whatever the offload does not answer for.
- collab-session-scan-offload: one worker reused across scans, one request per
  source, answers grouped by source id. It refuses a source it cannot rebuild
  or whose store path differs from the one asked for, which keeps injected
  adapters (tests, added agents) on the calling thread.
- collab-session-scan-worker: builds the builtin adapters and reads one store
  at a time; reading several at once was slower on a real machine.

Any way out of the worker - it cannot start, dies, or holds a different store -
ends where it started: the source is read on the calling thread, with the same
result as before and only the responsiveness given back. A missing worker file
logs one line and keeps working.

Measured on this machine, available({limit: 500}), 160 sessions:

  event loop stall   before 317ms (cold) / 60ms (repeat)
                     after    2ms (cold) /  7ms (repeat)
  sessions           identical in content, order and fields

Made-with: Proma
Merge the worker-based scan from perf/collab-scan-offload: reading every agent's
store now happens on a worker thread, so the backend keeps answering messages,
page loads, file reads and the project sync while a scan runs.

Measured on this machine with the metadata listing already in place: the longest
event loop stall during a scan drops from 332ms to 10ms, at the cost of about
150ms in wall time. A source the worker cannot rebuild falls back to reading on
the main thread.

Made-with: Proma
The assist chain assumed a POSIX host in three places that only show up
together. assistEnv() joined PATH with ":", findExecutable() split PATH on
":", looked for the bare command name and judged an absolute path by a
leading "/", and every spawn of an npm-installed CLI relied on a file that
is only reachable as .cmd on Windows. Each one silently produced an empty
result rather than an error, so nothing assisted could start there.

Path and command resolution now follow the host platform:

- executables: pathForPlatform() picks win32 or posix path semantics, so
  a test can inject "win32" and still exercise the real separator and
  drive handling; splitPathList/joinPathList use the platform delimiter;
  findExecutable recognises C:\ and \\server\share as absolute and walks
  PATHEXT on Windows (default .COM;.EXE;.BAT;.CMD, both cases tried
  because PATHEXT is upper case while npm writes npm.cmd).
- shellLaunch turns a .cmd/.bat command into cmd.exe /d /s /c with its own
  quoting and windowsVerbatimArguments. shell:true was not used because it
  concatenates the line and an installation under "C:\Users\Q Sun" would
  break at the space. Non-Windows returns the command unchanged.
- shell-env: PATH is joined by the platform delimiter with the platform's
  own lookup directories. It also reads Path as well as PATH: the Windows
  environment spells the key that way, and a copy of process.env is a plain
  object without the case-insensitive proxy, so reading PATH alone dropped
  the process PATH entirely.
- adapters, acp-client, login, deepseek-harness: install and launch through
  shellLaunch; the adapter bin prefers .cmd/.exe on Windows because npm
  also writes a suffix-less shim that only a posix shell can run.
- recipes, deepseek-harness: the QwenWork and DeepSeek Harness app bundles
  are macOS layouts. On Windows they now return no directory and fall back
  to the command on PATH, rather than pointing at a path that cannot exist.

Separately, path handling in the collab module compared and split on "/",
which never matches a backslash path. configDirectoryFor now decides
containment with path.relative, so a skill directory under %USERPROFILE%
resolves to its first level again instead of falling back to dirname and
narrowing an added agent's record scan to the skill folder itself. The
task file's conversation id is derived with basename, and the session
group, rank, shape and workspace-bridge helpers reuse the same rule.

The skill template no longer writes request files to /tmp or names macOS
commands as the only option, since an agent on Windows follows the example
literally and fails at the first step.

macOS behaviour is unchanged: configDirectoryFor returns the same directory
for every existing case, and the POSIX branches of the resolvers keep their
previous splitting, trimming and suffix rules. Covered by 22 new cases
across five test files plus new files for executables and the conversation
id.

Not verified on a Windows machine: the parameter shape matches cross-spawn
but a real npm install and a real cursor-agent.cmd launch still need one
run there. QwenWork and DeepSeek Harness on Windows are untested against a
real installation layout.
The executor's machine ran one assist request at a time: a single process
queue held every request from every requester, so a stuck run blocked
everyone behind it with no way to see who they were waiting for. Requests
are now scheduled per thread.

- concurrency key is the thread, not the requester: each thread keeps its
  own waiting list and its own active request, so two threads run side by
  side while a follow-up in the same thread waits for the previous one.
  A thread has to stay serial because the follow-up reattaches to the same
  agent session (session/load then prompt) and two processes on one
  session corrupt each other; Memmy's own path also guards chatId with
  run_in_progress.
- assist scope now reports what is really happening: a request that can
  start at once is running immediately instead of being written as queued
  first and corrected a moment later.
- createAcpAssistRunner defaults timeoutMs to ACP_TIMEOUT_MS (15 minutes)
  like the Memmy path. External agents had no upper bound at all, which
  was survivable only because a hung request blocked everyone anyway.

Two races that serial execution made physically impossible, both now
guarded:

- adapters: two runs choosing the same external agent both npm-installed
  into the same directory and broke each other. Installs are merged per
  directory and package, and later callers await the same result.
- login: two runs finding the agent signed out opened two login pages
  competing for one credential. There is now one sign-in per agent with a
  refcount on its waiters, so a run being stopped does not mark the other
  waiting runs as cancelled; sign-in ends only when the last one leaves.
Now that assists from different threads run at the same time, an executor
can have several agent processes on her machine at once. Stopping them
meant opening each one and pressing stop; if a requester's agent runs
loose, new ones start while she is still clicking. The toolbar now offers
one button that stops them all. No automatic limit is added: this only
turns N clicks into one.

- the button appears only in the assists tab, only when this member is the
  executor, and only when at least one of her threads is running. It
  counts just those, so a request running on the other person's computer
  never inflates it, and with nothing running the button is not rendered
  rather than shown disabled.
- requests are stopped concurrently, not one after another: the point of
  this entry point is to stop a growing pile quickly, and queueing them
  would let the last one keep running. A single failure (the requester
  stopped it first, cloud answers 409) does not affect the rest, and the
  result is summarised once with how many did not stop.
- after stopping it reloads assists directly instead of going through
  refreshBoard, whose in-progress guard would swallow the refresh if the
  member had just pressed refresh herself, leaving the button up for
  another poll cycle. If the dialog is open while the last running assist
  ends on its own, the dialog closes instead of reporting "stopped 0".
- both the new button and the existing bulk delete lost their warning
  colour: the module's .dangerGhost was overridden by the global
  .button-ghost, which styles.css defines after module styles load, so
  they rendered as ordinary secondary buttons. Doubling the class restores
  the intended colour without depending on import order.
…v1.2.8

feat(collab): share projects and tasks with members
- Widen the request body: background up to 2,000 characters, up to 20
  items of 4,000 characters each, with line breaks kept. Multi-line
  background and items are written with indented continuation lines and
  read back by the task-message parser.
- Add inline text and script attachments. `assist ask` reads
  `attachments: [{ path, note }]` from the request file (text and script
  extensions only, at most 8 files and 2 MB). `note` is required: it tells
  the executing Agent what the file is and how to use it.
- On the executor, write attachments to the Memmy media directory or to
  the external Agent's working directory, verify the sha256, make scripts
  executable, and clean up afterwards (after 24 hours for Memmy, right
  after the run for external Agents).
- List each attachment with its purpose in the executor prompt, right
  after the items; scripts are told to run as-is without rewriting. The
  sha256 stays out of the prompt. Earlier attempts in the same
  investigation are now passed into the prompt as well.
- Rename the reason marker in task messages to the "background" wording
  and keep reading the old marker for existing messages.
- Approval dialog: drop the lead sentence, show the requester's Agent and
  the project above the items, show the request title, fold long item
  lists, and list attachments with a read-only preview. The background is
  shown as its own left-aligned block in the dialog, the task card and the
  assist conversation.
- Make the agent access dialog scroll its body so the buttons stay
  reachable when many Agents are listed.
- Give an adapter's entry point its executable bit back when npm left it
  without one, instead of failing with EACCES.
- Treat a failing login method (e.g. Codex asking for an API key) as
  "needs login", so the executor is taken through the browser sign-in
  instead of seeing a raw key error.
- Update both memmy-project skills for attachments with notes and hint at
  attachments when a request body is long.
…v1.2.8

feat(collab): send scripts and long instructions with member assists
- Add a four-page announcement for project collaboration: tasks from Memmy
  and other agents in one project, joining from another agent, continuing a
  teammate's task with @, and asking a member for help. Each page uses an
  exported 1920x1600 illustration, with a Chinese and an English set.
- Offer it once per computer on the first workspace visit after updating to
  or installing 1.2.7, in account mode and after new-user guidance. The record
  (memmy.featureAnnouncement.v127-collab-projects) is written as it opens.
- Give it this run's single large-prompt slot: the History, campaign and
  GitHub star prompts check the claim and wait for the next launch.
- The last page opens the new-project dialog with "Share with members" on;
  requestCreateProject takes an optional share flag for this.
- Remove the project board's first-run tour, its sample rows, the "view the
  guide again" setting and their strings.
- Ask for "use shared projects in other agents" access when the board opens
  after sharing starts, once the settings and task picker dialogs are closed,
  instead of at the end of the tour. Joined members are still asked on their
  first visit.
- Tests cover the once-only rules, paging, per-language images, the share
  default in the new-project dialog and the timing of the access prompt.
Extract shared fixes from the online MEMMY-394 Agent candidate. Keep original assertions and all cases; no new skips. Independent Linux checks: three previous platform fixture failures reproduced, then Agent four-file suite 30/30 and Desktop restart suite 28/28 passed.
…ckground-v1.2.7

fix(office): prepare runtime in background and localize progress
Preserve Office background preparation alongside managed TeX and per-call CJK grants; keep both Cursor header formats while enforcing authoritative chunk-log validation. Retain project collaboration, migration build preparation, complete worker scans and published idle/read-budget checks. Synchronize application metadata to 1.2.7 with Memory independently at 2.1.7.
jiachengzhen and others added 30 commits November 18, 2026 15:05
- Use neutral gray borders for the project card, nickname input and directory
  field so the dialog matches the conversation composer instead of the mint
  tinted collab line.
- Keep only a small gray cloud mark on the project card: no bordered tile,
  no paper background.
- Make "Choose folder" a plain gray text button without a border or fill.
- Drop the "Invite link" label in the first step; the aria-label keeps the
  accessible name while the placeholder carries the hint.
…dismiss notices

- notification center: accept autoDismissMs and auto-dismiss via tracked timers
- approval notices dismiss themselves after 4s
- create dialog: share row icon aligns with the input above (no left padding)
- drop bold weights across the create dialog, settings cards and notification title
- cancel button uses the outlined style of the join button
- Add a "Start a task" primary button before "Link task" in the board toolbar.
- Hide the refresh and multi-select ghost buttons in the narrow board layout and
  cap the search field width so the primary actions stay visible.
- Center the bare empty state, add vertical room above it and a hover state on
  its icons; reword the empty state title for tasks and links.
- Loosen the member context tip vertical spacing.
- Use a neutral ink-tinted border for the config panel cards instead of the
  accent-tinted line, and give the task row summary a muted color.
…k the share switch to an icon

- render referenced-session chips as toolbar flex items instead of an absolute slot so they no longer overlap the input text; the home empty composer keeps its floating slot
- turn the task sharing switch into an icon-only button with a shared hover hint
- add the collab.share.hintProject message in both languages
A reinstall or a cleared data directory wipes app.sqlite and localStorage
while the cloud keeps the account's hasFinishedGuide flag, so an existing
user was sent through the whole new-user sequence again: sign-in, first
encounter report, improvement program, product tour, nickname and the
one-shot prompts.

The completion state is stored in two layers and nothing copied it back
from the cloud into either:

- account_onboarding_state was created with the new-machine defaults by
  ensureAccountDefaults() and never synced, so onboarding.completed read
  false even though cloud_accounts.has_finished_guide was 1.
- localStorage keeps the machine-level marks only, so memmy.guidanceCompleted,
  memmy.guidanceProgress.v1 and the other one-shot keys were empty.

Neither branch of reconcileInitialOnboarding covered the pair either: one
requires a locally completed state, the other requires an unfinished cloud
guide. resolveInitialView additionally gates /main behind the first
encounter report flag, which migration 0031 cannot back-fill on a fresh
install because it runs before any account row exists.

Fix it at all three layers so any single one keeps the user out of the
sequence:

- account-session-repo: copy hasFinishedGuide into the local onboarding
  row on login, and mark the installation-level first encounter report as
  skipped. The has_finished_guide = 0 guard keeps repeated logins idempotent.
- routes: add restoreCompletedAccountOnboarding() ahead of the existing
  reset branches, so a cloud-finished account on a fresh install is routed
  straight to /main in the same boot.
- app: stamp memmy.guidanceCompleted and memmy.guidanceProgress.v1 from
  the cloud flag during boot, so the product tour, nickname step and
  one-shot prompts do not replay.
- Bold task titles and lighten their summaries so the board list reads in
  two levels.
- Replace the two-icon empty state with one centered sentence whose
  "start a task" and "link sessions" actions are inline links.
- Show the share switch hint through the app tooltip instead of the native
  title, and deepen its hover state.
- Move the referenced-session and Goal chips into the home composer toolbar:
  they used to float over the input and cover the + button. Long labels now
  truncate, and hovering a referenced session explains "continue this task".
- Drop the "Add knowledge base" text row in the project config card in
  favour of a + button in the card header, and tighten the header action
  spacing.
…n the demo gate

Referenced-session chip:
The chip had no resting style of its own: `.composer-mention-chip` was declared
before the base `.composer-command-chip`, and at equal specificity the base rule
won, so the pill fill and the 28px height never applied.

- Resting: no background, just the green speech icon and the task title.
- Hover or focus: a neutral gray pill (6% ink over paper, rgb(241,241,242)), the
  speech icon swaps to ×, and clicking it removes the reference. The swap is
  spelled out for this chip because its icon has no `--target` modifier, so the
  shared hover rule did not hide it and both icons stacked.
- Placement follows where each composer keeps its share switch: the home draft
  shows + then the chip with the cloud icon staying on the project row below,
  while an existing conversation shows +, the cloud icon, then the chip.
- Both chips explain themselves on hover as "continue this task".

Demo walkthrough:
The create dialog now also asks the cloud whether this person can be demoed this
time. Watching only the local "left the guide" flag meant a machine the cloud
already recorded as demoed kept going through all six screens, and since the
cloud does not start the demo, the guide then vanished silently on entering the
board. The flag comes from `demoEligible` on the project list, i.e. the cloud's
own `eligible()`; clouds that predate the field count as not eligible, matching
what the project list already assumes.
…tory-timeout-v127-20261118

test: fix release regression fixture races
…assist

fix(collab): polish the board and composer UI, restore the finished guide after reinstall
- Register a root-level window drag exclusion for /collab so the invite,
  config and settings buttons receive hover and clicks inside the top
  46px strip. Electron routes that strip to the window drag region, so
  without the exclusion the upper half of every board header button was
  dead: no hover background and no click response.
- Cover the 4px gap between the two action buttons with a transparent
  ::before hit area, so moving the pointer from one button to the other
  no longer drops the hover state in between. The inset accounts for the
  1px transparent border, which is what the inset is measured against.
- Drop the hover translateY on these buttons: the 1px lift moved the hit
  area under a resting pointer and made the mint background flicker.
…assist

fix(collab): let the board header buttons answer their whole hit area
…ct is shared twice

Sharing the same local project more than once used to create one cloud
project per attempt: createProject took no local project id, and
bindLocalProject wrote the binding without checking what already held it.
Both ends now treat the local project as the identity of a share.

- createProject accepts localProjectId, reuses the cloud project already
  bound to it, and writes the binding in the same critical section as the
  working directory, so an interrupted share no longer leaves a cloud
  project this computer does not know about.
- bindLocalProject releases another online project's binding to the same
  local project, keeping one local project bound to one online project.
- The startup pass that gives an unbound project a local record now reuses
  a project already sitting in that folder instead of adding another one.
- A failed binding is no longer reported as "not shared": the cloud
  project exists, so the board records it and never offers to share again.
- The project list and the same-name conflicts print the first 8 characters
  of the project id, and --project accepts an id or its prefix before
  falling back to the name, so same-named projects can be told apart.
…ounted

The home page stays mounted behind a board once the person opened the
embedded browser or has a recording, so a board can hold two AppFrames at
once. Both read the same store, but the create-project dialog lived in each
frame's own state: one request opened it twice, and closing the visible copy
left the hidden one open, so it reappeared with an empty name when the person
went back to the home page.

- The store now owns whether the dialog is open (createOpen with
  closeCreateProject and clearCreateProjectDemo) instead of handing each frame
  a one-shot request, so any close applies to every mounted frame.
- AppFrame reads the open state, the share default and the demo flag from the
  store rather than keeping copies of them.
- AppFrameProps.ownsOverlays lets the router mark the preserved home shell as
  hidden; that shell no longer renders the create or join dialogs. It also
  stops two data-demo-guide anchors from splitting the walkthrough mask.
- The new-project dialog test now mounts both frames and asserts a single
  dialog opens and both are gone after closing it.
…assist

fix(collab): one cloud project per local project, one create-project dialog per window
Resolve version conflicts by preserving the maintained v1.3.0 branch's
product version metadata (1.3.0) across:
- root package.json / package-lock.json
- App/memmy-agent/package.json / package-lock.json
- App/shell/desktop/package.json
- App/backend/src/project-version.ts
- App/native-computer-use/apps/OpenComputerUseLinux/version.go
- App/native-computer-use/apps/OpenComputerUseWindows/version.go
- OpenComputerUseKit/OpenComputerUseVersion.swift

All conflicts were version-string-only; both histories and all
non-version changes from main (through dfb43b6) are preserved intact.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants