The main agent had no way to give a specialist a piece of work and keep
track of it. message_bot is a fire-and-forget peer message whose work stays
hidden from the user, and handoff_to_bot ends the main bot's turn and only
works between members of one group. Delegation now runs the specialist's
work where the user follows the main agent and brings the result back so
the main agent can close the task.
- delegate_task({bot, title, brief, deadline?}) is offered to the main bot
only and refused unless the caller leads the main conversation. It
resolves the specialist by id or name across the user's spaces, creates a
DelegatedTask and posts a task card in the main conversation.
- A specialist from the main conversation's space joins it and works there
in a run with the new trigger "delegation", which the peer filters do not
hide, so its progress, asks and approvals appear in the main conversation
with the specialist as sender. A specialist from another space works in
its own chat; its written result is posted into the main conversation as
its message.
- The executor mirrors the run on its task (running, waiting, done, failed,
cancelled) after the run starts and when each attempt ends, and updates
the card in place through thread.message.updated. Done and failed tasks
wake the main bot in the main conversation with the result. The job
reconciler settles tasks whose run ended without the executor (stop,
clear, archive, deletion, crash).
- tasks.list({threadId?, status?}) returns the caller's tasks for the
current space.
- The task card shows who, what and status with Lingui labels; the brief
opens on demand. The message_bot card no longer shows the recipient's
unrelated overall status or hard-coded German copy.
- The scripted runtime understands "delegate to the bot named X: ..." and
the task wake prompt; activity rows name delegation runs by task title.
Tests: unit tests for the prompts, status mapping, card, reducer, tool
selection and scripted runtime; a Postgres suite for same-space, group,
other-space, ask and answer, failure, stop and replay; tasks.list in the
authorization suite; and an end-to-end spec for the whole flow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
The product needs one main agent that leads a main conversation, knows the
user across spaces, and hands work to visible specialists. Today none of
that exists in the data model: "Chief" is a client-side naming convention,
the "Hauptthread" is a group the web client creates by name, and nothing
stores what the agents know about the user.
This adds the shared foundation the Phase 1 features build on:
- Bot.kind ("main" | "specialist", one main bot per user) plus capability
fields (tags, builtin tool allowlist, model tier).
- ChatGroup.kind ("group" | "main", one main conversation per user) and
ChatGroup.leadBotId.
- UserProfile and UserFact with category, confidence, source, consent
status and per-space visibility; embeddings are stored as float arrays
because none of the Postgres images ship pgvector.
- DelegatedTask for work the main bot hands to a specialist.
- SpaceModelTier to map a model tier to a connected model per space.
The migration backfills each user's onboarding bot in the home space as the
main bot and turns an existing "Hauptthread" group containing it into the
main conversation. CHECK and foreign key constraints on existing tables are
added NOT VALID and validated in a separate migration, as elsewhere in this
repo.
New db helpers ensure the main bot and the main conversation (idempotent and
race-safe, repairing a lost lead), add same-space specialists to the main
conversation and announce it with a group.updated event, and load the user
context a run may see. The main conversation is exempt from the two-member
floor and cannot have its members replaced through a group update. The
contracts expose the new fields and the user model and delegated task
schemas.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
* fix(api): keep the onboarding scan off the host unless the owner opts in
The first-run scan walked the home directory of the API process user for
every account that signed up, with no consent, and its status endpoint
accepted any scan id. Any account could read the repository paths and
remotes of the server owner.
The scan now stays simulated unless the deployment configures
ONBOARDING_SCAN_HOME and the requesting account is the deployment owner;
the previous HOME fallback is gone. Scan records remember who started
them and the status endpoint answers only that account.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
* ci: give each runner on a shared host its own E2E ports
Two Linux runners live on the same host. Every Web E2E job first frees
"stale" listeners on the fixed ports 3110, 3111, 5180 and 4321 with
fuser -k, so a job starting on the second runner killed the Vite server
of the job already running on the first one. The victim died with
SIGKILL (exit 137), and its remaining tests failed on reloads that could
no longer reach a server. This is what made the Web E2E run on this PR
red, and it explains the recurring reload failures on main whenever two
runs overlapped.
The workflow now derives API_PORT, WEB_PORT and WWW_PORT from the runner
name (suffix -N means an offset of N times 100), and the port-freeing
script follows those settings instead of a hard-coded list. The harness,
Vite, the API and the marketing site already read these variables.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
(cherry picked from commit 2f05ab6a817e5198e2a740706976108b7b1edde1)
* test(testkit): cover the env-driven E2E ports instead of a fixed list
The ports test parsed a hard-coded array that no longer exists. It now
runs the script on a fake host whose fuser finds nothing, and checks the
default ports, the per-runner override, the rejection of a non-numeric
setting, and that the workflow picks the ports before freeing them.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
(cherry picked from commit cd0aedafcdec1b24dea924d8924b3b29af29d598)
* ci: keep every runner off the default E2E ports
Branches that still free the fixed ports 3110, 3111, 5180 and 4321 keep
running on the shared host (main, the nightly run, other open PRs) until
they carry the per-runner ports. A job of ours on the runner without a
numeric suffix used exactly those defaults, so such a neighbour could
still kill it, and its own port freeing could kill the neighbour. The
unsuffixed runner now starts at offset 100, so no job from this workflow
touches the defaults in either direction.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
(cherry picked from commit ddf5febdb3072425442ef375ca0be63fbe09e7f1)
* fix(web): recover lazy routes and overlays from a failed module fetch
When the browser aborts a module request while a page loads, the lazy
import rejects and the route throws, leaving a blank page. Chromium does
this whenever a network interface appears or disappears mid-request
(net::ERR_NETWORK_CHANGED), which happens on a laptop that changes
networks and on the CI host every time a container starts or stops. A
Web E2E run hit exactly this: two modules of the onboarding page failed
to load and the suite waited on an empty document.
Lazy routes and overlays now load through a helper that retries the
import once and, when the browser keeps rejecting it from its module
map, reloads the page a single time before surfacing the error.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
(cherry picked from commit d5dacb12f14380071ef14ba8845d18c9d39e3fac)
* fix(web): reload once when the module graph is aborted while booting
The lazy-route recovery cannot help when the browser aborts a module of
the static import graph: nothing of the app runs, the root stays empty,
and the only trace is a console error. A Web E2E run hit this right
after a page reload, when four modules of the shell failed with
net::ERR_NETWORK_CHANGED and the shell never rendered.
An inline script in the HTML entry now listens for the error event of
the module script and reloads the page once, guarded by a session flag
that the entry module clears after a successful boot. The existing
preload recovery stays in place; it only covers Vite's chunk preloads of
production builds.
A new E2E spec aborts one module request during boot and one lazy route
request, and expects the sign-in page to render in both cases.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
(cherry picked from commit e5b7e036e1a60e7e270592c4b9382ee23ed45ccb)
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(e2e): wait for shell-ready after RPC bot create
createNamedBot now waits for data-ready and the Message composer after
navigating to a freshly created bot, instead of asserting immediately on
a cold page load where bootstrap had not finished.
Also fix onboarding scan advancing to bot creation (onComplete was a no-op)
and use a fast simulated scan when AGENT_RUNTIME=scripted so CI E2E does
not walk the real filesystem during onboarding.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* style: apply biome format to touched onboarding files
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* style: clear biome lint in onboarding scan files touched by the fix
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* style: format onboarding-scan after rebase onto main
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* style: fix biome lint on main files blocking Product CI
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(onboarding): allow scan before first bot exists
The scan RPC required a non-empty botId, but onboarding runs scan before
Chief is created and the UI sent an empty string. That rejected the RPC,
left the flow on /onboarding, and every completeOnboarding helper timed out.
Make botId optional, omit it from the client when unknown, advance to bot
creation when scan completes, and keep scripted/fake runs on the fast scan path.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
- Auto-generate specialist roles from detected interests/skills:
Code Engineer, UI/UX Designer, Data Analyst, DevOps, Music, Writer
- Always include General Assistant role
- Embed role descriptions + instructions in agent briefing
- Create real Prisma Space entries for discovered git repos
- Deduplicate: skip spaces that already exist
- Pass prisma client through scan pipeline chain
Co-Authored-By: Claude Code <noreply@anthropic.com>
- Replace simulated scan with real filesystem scan of home directory
- Discover Git repositories via .git directory scanning
- Analyze repos: remote URLs, branches, last commits, language stats
- Compile user profile from file types, languages, and repo data
- Generate agent briefing with tech stack, interests, and skills
- Create project folders from discovered Git repositories
- 1500+ line implementation with comprehensive file classification
* fix(ci): restore browser preview module and onboarding e2e
The web bundle imported a browser-preview store that was never added, so production builds and every Playwright signup failed before the shell rendered. Mobile check failed because Expo packages were a patch behind the SDK.
Restore the store, type the optional desktop bridge, and walk whichever onboarding step scripted CI actually opens.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(ci): stop the blank web client and the send 500
The core barrel pulled git checkout into the browser, so node:child_process crashed the page before sign-up. Serve that module from a node export instead.
Add the missing run tool-call budget columns that threads/send writes. Guard an indexed shell flag for typecheck, and expect the files key the desktop preload already exposes.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(ci): isolate pnpm setup and the takeover membership
The Team Computer takeover journey inserted a space member the
default-space trigger had already created, so shared Postgres rejected
the unique pair. Self-hosted jobs now keep a per-job pnpm home and
store, and artifact uploads no longer fail a job that already passed.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(ci): clear typecheck, lint, and unit failures
Inbound channel rosters can mark a participant list as authoritative.
Answered channel asks stay off the group, and clearing a thread waits
until delegated returns land. Lint, unit, and web e2e contracts follow
the current shell, composer, and settings.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): align e2e with the shipped shell and onboarding
Web E2E still expected older focus buttons, nested project rows, and
settings that never opened MCP. Persist the signed-in space, list
non-default spaces under Projekte, and keep the quote control on screen.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): open group reply from a revealed hover rail
The first user row covered its Reply control until the rail accepted
pointer events. The group transcript now reveals that rail, then replies.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): stop the shell render loop and settle computer and mention UI
A working bot rewrote preview state on every render, the computer menu never stayed still, and the mention picker did not expose its expanded state or option name.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(ci): stop idle probes hanging and accept a follow-up send
Background probes walked every process fd and timed out on the shared runner. Linux now tracks the marker with flock and /proc/locks. A new composer draft can send while an earlier send is still refreshing, and group members stay mentionable.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(adapters): detect background work when flock ids are padded
The idle probe compared /proc/locks with an unpadded device key, so majors
or minors under 16 never matched. It deleted the live marker and reported
idle while the command still held the lock. Probe by taking the lock, and
print the cancel key the way the kernel does.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(adapters): stabilize background-work probe tests on self-hosted CI
Clear stale marker files before each probe scenario and allow longer
polling so launch can acquire flock on busy persistent runners.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): do not block onboarding on spaces list
Render the first onboarding step from me and integration setup alone.
Resolve the optional skip-to-app redirect after that so Playwright
signups are not stuck on the loading shell when spaces.list is slow.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(ci): restore green gates after second main rebase
Re-apply biome formatting on Shell/SortableGroup and strict TypeScript
assertions in computer-idle tests dropped when skipping the duplicate
conflict-resolution commit.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): wait for onboarding bootstrap before E2E proceeds
Expose data-onboarding-step on the onboarding shell and have Playwright
wait until loading finishes. Ignore ad-hoc screenshot scripts on
self-hosted runners so they do not fail lint.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): fall back when onboarding bootstrap stalls
Race me/integration setup against a timeout and promote loading to the
emoji step after 20s so Playwright is not blocked on a hung RPC.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): render onboarding immediately for E2E signups
Start on the emoji step instead of a loading shell that waits on RPC.
Bootstrap can still redirect once me and integration setup resolve.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(ci): stabilize web e2e on self-hosted runners
Per-job pnpm stores broke node_modules symlinks when setup-node restored
cached installs, so Vite could not resolve react during dependency
optimization. Keep a runner-scoped store, clear stale Vite caches, and pin
Playwright to one worker in CI to reduce onboarding RPC contention.
Add Vite resolve aliases for react/react-dom, wait for an interactive
onboarding step in E2E helpers, and include the React hook smoke spec from
main.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): resolve React aliases through pnpm package layout
Root node_modules/react does not exist under pnpm, so Vite aliases pointed
at missing paths and broke production builds and the Playwright webServer.
Resolve react and react-dom from the web package and map jsx-runtime to the
actual entry files.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(core): type the lazy child_process spawn cache
Main's lazy require left spawn typed as null after assignment, which broke
Typecheck on the rebased branch.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(db): mock git-checkout export path in unit tests
Vitest resolves vi.mock against package exports; the .js suffix is not
declared for @rakazo/core/git-checkout.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): stabilize E2E after main sidebar and onboarding changes
Use first() for duplicate transcript lines, wait for interactive onboarding
before model-required assertions, and allow project sidebar to settle after
create. Extend the Playwright job timeout so the single-worker suite can finish.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): restore Projekte sidebar and integrations MCP entry
Use the default space for Unterhaltungen/Projekte separation instead of the
active space header, persist the bootstrapped space in localStorage, wire
SettingsOverlay to MCP management, and compare hover tones on inactive rows.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): satisfy biome format on homeSpaceId line
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): align sidebar E2E with nested Projekte shell layout
Scope Unterhaltungen assertions to conversation rows only, target project-space
Chief actions under .sidebar-projekte, and stabilize hover-tone polling.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix: satisfy lint after main merge (format and unused var)
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): show project-space 1:1 bots in Projekte sidebar
Include lone bots in projectSidebarGroups, render bot rows in Projekte,
and stabilize E2E for nested sidebar layout and duplicate group entries.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): disambiguate duplicate group sidebar buttons in E2E
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): align spaces and group-chats E2E with Projekte sidebar IA
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): dedupe Projekte sidebar rows and stabilize E2E specs
- Deduplicate project space and group-chat entries in projectSidebarGroups
- Scope group-chats/spaces E2E clicks to first Projekte match after IA split
- Wait for shell ready before mention-picker keyboard test; restore main locators
- Fix PrivacySettingsOverlay lint and align biome schema with CLI 2.5.13
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): restrict project drag handle and stabilize space E2E
- Move SortableGroup drag listeners to ProjectDragGrip only so sidebar clicks work
- Scope space delete actions to project-space rows; wait for menu in E2E
- Switch group settings E2E via direct navigation after unsaved draft check
- Merge main (DataTrustPanel) and fix Shell import order for CI lint
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): stabilize message hover Escape assertion in E2E
Assert the More menu closes and the hover rail stays visible instead of
requiring focus restoration, which is flaky across Chromium builds.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* chore: format apps/api/src/app.ts after main merge
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(web): stabilize team-computer E2E send after bot switch
Wait for shell ready and use the Send button instead of Enter after
switching bots and closing the computer overlay. The prior run timed
out on threads/send with only an apps/api format commit in between.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
feat(web): add DataTrustPanel to Shell sidebar showing local data status
- 3 trust indicators: verschlüsselt, lokal gespeichert, kein Tracking
- Responsive: hidden on small screens, visible on xl+
- Green checkmark with detail text for each trust point
The Live Trading control stored its mode in localStorage, so the shell could
claim live money while the bot was in dry-run. Show the Tradingbot status
when TRADING_BOT_URL is set, and an unknown state when it is not.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Extend the existing NewSpaceDialog project flow so an optional host
folder becomes the space workspace root. When .git metadata is present,
remote URL, default branch, and head commit are stored on the space.
Team Computer file APIs expose the linked folder under project/ without
a second VCS stack. Desktop adds a native folder picker; web falls back
to an absolute path field.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
When deliverDelegatedReplies could not resolve the Slack/Teams origin thread,
it still set teamChatMirroredAt and permanently dropped the delegated reply.
Leave the mirror timestamp unset when sourceMessageId exists so reconciliation
retries once the wake chain can be resolved again.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Group channel fan-out used event.content only, dropping mediaUrl that
DM handling already merges into message text. Photos with empty captions
in SendBlue groups reached member bots with blank prompts and blocks.
Also skip fan-out when the merged text is empty, matching DM tapback
behavior.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
The GraphileJobWorkerHost was never started when using graphile as the
wakeup driver. Added else-if branch to start the worker host with the
job pool, enabling actual job consumption (previously jobs were queued
but never processed).
Commit 928d9ad refactored requireSpaceOwner into isSpaceOwner but
accidentally dropped getMemoryProviderConfig, breaking API boot while
router.ts still imported it. Restore the owner-gated read helper.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
When a user records a taught skill on one Team Computer bot, manual
takeover on another bot in the same space cleared the teaching lease
without stopping the session. Teaching input then failed silently and
skills/stop could not release the replacement takeover lease.
Reject computer/takeover while another bot on the same computer is
recording, matching the existing Stop teaching first messaging guard.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Team mode stores one disk per Space. computer/readFile and computer/files
only verified the caller owns the entry bot; an explicit bots/<otherBotId>/…
path let one member read another member's workspace. Wire existing path guards
into the API router and executor file/shell tools, and add a shared-Space
authorization regression test.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
threads/clear called memoryProviders.resolve with a bare spaceId string.
The resolver destructures { spaceId, userId }, so both were undefined and
purgeHistory was silently skipped after every clear.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* fix(api): scope routine remove to acting user in shared Spaces
routines/remove only filtered by spaceId, so any member of a shared Space
could delete another member's routine by ID. Match update/testRun by also
requiring userId in the lookup.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
* test: drop unused ownerActor in routine remove authz case
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
deliverDelegatedReplies used allowSilence and marked teamChatMirroredAt
even when no Slack/Teams message was sent, leaving tool-only delegated
runs silently dropped with no retry path.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
- Add teamBotWorkspaceDirectory import to router.ts
- Add exportOptions to scope team exports to one bot workspace
- Add authorization test: member export only sees their workspace files
- Add LocalAgentHomeStore and computerHomeKey imports to testkit
Group threads/followUp always steered to members[0], so a follow-up
while a later member had waiting_input went to the wrong bot or started
a fresh run on the first member instead of continuing the ask.
Resolve the target bot like group sends: prefer waiting ask/takeover on
any member, then the newest steerable active run, then @mentions, then
the default first member. Extract followUpGroupThreadMessage and add
regression tests.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Non-owner shared-space members could read the space memory provider id
and internal endpoint origin via aiConsent/status, bypassing the owner-only
policy that draft PR #46 applies to memory/providerConfig.
Owners still see full provider disclosure; members get a generic Space
memory recipient when a provider is configured, without loading settings.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
- Replace findSpaceMemoryConfig inline call with getMemoryProviderConfig(deps, actor)
- Add owner gate: space members get 403, owners get config
- Add authorization tests for providerConfig/connectProvider/setDefaultScope/disconnectProvider
- Add wiring test to ensure router.ts uses the owner-gated handler
Group intros were stamped as posted before the outbox drain ran. When
delivery enqueue failed or the intro row exhausted retries, the channel
stayed marked and no retry path existed — unlinked participants never saw
the onboarding message.
Stamp introPostedAt in the drain path after a successful provider send,
matching the messagingMirroredAt pattern from #42.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Group threads/followUp always steered to members[0], so a follow-up
while a later member had waiting_input went to the wrong bot or started
a fresh run on the first member instead of continuing the ask.
Resolve the target bot like group sends: prefer waiting ask/takeover on
any member, then the newest steerable active run, then @mentions, then
the default first member. Extract followUpGroupThreadMessage and add
regression tests.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Team mode shares one disk per Space. export/bot walked the entire
team home, so a member exporting their own bot received every other
member's workspace files too.
Scope exportHome with the exporting bot's bots/<id>/ prefix and add
regression coverage for the shared-Space case.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Group inbound webhooks often report only the sender in participants,
not the full roster. Sweeping on any non-empty list incorrectly marked
approved members as left, silently dropping them from channel fan-out.
Gate the sweep on participantsAuthoritative so adapters opt in only when
the provider supplies a complete roster.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Non-owner Space members could read provider settings (mode, baseUrl,
endpoint metadata) while connect/disconnect/setDefaultScope already
required owner role. Align the read path with write authz.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Team mode shares one disk per Space. RPC and executor paths under
bots/<otherBotId>/ were reachable with any member-owned entry bot,
leaking another member's workspace files while same-user cross-bot
access stays intentional.
Add path guards, filter bot listings, regression tests.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
When a delegated bot finishes but its wake message was deleted (e.g.
thread clear), returnBotMessageOutcome used to mark botOutcomeReturnedAt
and drop the coordinator reply silently. Retry instead, and block
clearThread while completed bot_message runs still owe a return.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Cloud/public memory providers are owner-managed infrastructure. The RPC
read path is owner-gated separately; this aligns executor, history
compaction, and thread-clear purge with the same boundary so non-owner
members cannot load credentials or reach external endpoints at runtime.
Deployment-owner local/private providers remain available to all Space
members when the deployment owner configured them.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>