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>
answerRunInput already blocked cross-member answers for credential
secret asks and always-allow approvals, but one-time allow/deny and
generic OTP secret asks had no run.userId check. Align the DB gate so
shared-space prompt answers cannot be hijacked at the persistence layer.
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>
spawnKey is unique per Space, not per user. createBot already rejects
cross-member replay, but spawnBot caught that error and returned the
other member's bot anyway. Match createBot by requiring existing.userId
=== spawnedBy.userId before treating a spawnKey conflict as idempotent.
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>
Mission Control previously set Access-Control-Allow-Origin: * on every
route. That widens cross-origin browser access when Cockpit binds beyond
loopback, even with bearer auth.
Add server-config helpers compatible with PR #28 bind/token patterns:
- loopback binds default to local web/API origins for the Heute shell
- privileged /api/* routes never receive *; only reflected allowlist hits
- non-loopback binds require explicit EVOO_COCKPIT_CORS_ORIGIN
- default bind moves to 127.0.0.1 with token gate off-loopback
Document env vars in .env.example and cover config/CORS in unit tests.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Computer-busy requeues previously retried forever via retryForever,
which could hang runs and burn worker cycles on a stuck computer.
Add a small retry policy helper that tracks consecutive busy waits in
an internal run.error marker, preserves that marker across lease claims,
caps retries at 24 with existing exponential backoff, and fails the run
with a clear message when the bound is reached. Database connection
pressure retries remain unbounded.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Remove hostRoots from this-mac desktop sandbox so shell execution stays
inside the bot computer workspace, matching container path rules.
Add resolveDesktopExecuteCwd to map virtual /home/rakazo paths onto the
local home and reject host-absolute cwd requests via containment checks.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
The respond_agent_connection builtin could flip a pending agent connection
to approved without the target owner's YES/NO DM or authenticated API
response. Treat it like other security-boundary builtins so the executor
shows an approval card before the status change runs.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
mirrorMessagingOutbound always stamped messagingMirroredAt even when
mirrorRun returned early, so the job reconciler never retried completed
messaging runs whose channel or DM mirror was skipped or not yet durable.
Gate the recovery marker on mirror disposition (complete vs retry), only
set it for completed messaging runs, and leave it null when mirrorable
bot text still exists but was not written to the outbox.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Apply the connect-invite at-most-once pattern to mirrored DMs, group
posts, channel invites, and intros. Provider send errors now keep the
outbox row claimed as sent without a handle instead of reverting to
pending and risking duplicate delivery.
Pre-send setup failures (thread resolution) still retry with backoff.
Pass outbox idempotency keys through to sendToThread for future provider
dedupe.
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>
Agent secrets are owner-managed via the API but the executor loaded every
secret in the Space and injected decrypted values into shell environment
variables for any member's bot run.
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>
Drain claims outbox rows as sent before the provider acks. Late ERROR
webhooks were regressing delivered rows to failed; late DELIVERED could
upgrade exhausted failures. Gate webhook updates by allowed source status.
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>
Remove duplicate definitions from executor.ts and pi-runtime.ts that
already live in executor-*.ts and pi-model-config.ts. Import extracted
symbols with .js extensions and re-export the public executor/pi-runtime
surface for existing callers.
Export a few pi-model-config helpers required by pi-runtime (including
boundAgentToolResult and toolCallBudgetFor) and align beginToolCall queue
typing with AgentRuntimeEvent.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Projekte + shared the new-space post-create path and always sent users
to /onboarding. Route project variant to /app with the new space selected;
keep /onboarding for global New space when a first bot is still needed.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
Wire the Projekte sidebar + and empty-state action to NewSpaceDialog
with project labels instead of the group creation panel. Keep space
wording for the global create menu. Add de locale strings and an e2e
regression test.
Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
- Remove pi-tool-utils.ts (too many dependencies on pi-runtime internals)
- Fix executor.test.ts to import from extracted modules
- Remove pi-tool-utils from index.ts exports
- Build verified green