Skip to content

refactor(control): collapse Tilde settings facades - #108

Merged
danielblignaut merged 17 commits into
mainfrom
codex/collapse-tilde-facades
Aug 29, 2026
Merged

danielblignaut merged 17 commits into
mainfrom
codex/collapse-tilde-facades

Conversation

@danielblignaut

@danielblignaut danielblignaut commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Outcome

Remove OpenBot's parallel plugin, connector, routine, and signal APIs. Owner clients now consume Tilde-owned resources through one authenticated, operation-allowlisted raw bridge, with projection and validation shared by client-runtime.

The settings pages no longer send every agent ID. Tilde's MCP servers and skill registries already carry agent_id, and plugin inventory now exhausts Tilde's native MCP and Skills pages instead of calling the OpenBot-specific aggregate catalogue.

Key implementation choices

  • Keep the OpenBot HttpOnly owner session and installation API key server-side.
  • Add /api/tilde/* as a strict method/path allowlist, preserving raw request/response bodies and encoded resource IDs.
  • Restrict /api/chat/* to the exact workspace, queue, observation, and attachment operations consumed by Client Runtime; unrendered administrative operations never receive the installation credential.
  • Remove the Tilde /openbot/plugins/catalog dependency; page native tool providers, tool groups, MCP servers, proxied servers, skills, trusted skill providers, and skill registries.
  • Type native plugin resources with generated @trytilde/api-client contracts while retaining runtime boundary validation.
  • Load only the resource subsets needed for connector deletion and tool/skill assignment mutations.
  • Move connector orchestration, Routine/Signals pagination, signal secret redaction, and webhook rendering into framework-neutral Client Runtime.
  • Preserve native Routine optimistic versions, root/trigger metadata, action/session policies, and trigger enablement during full replacement; use native trigger IDs for delivery history while accepting legacy rule IDs during migration.
  • Retain only the public /connectors/authorized OAuth completion handoff.
  • Treat openbot new-agent as the sole source and Tilde reconciliation lifecycle. A completed background command is ready; control-service no longer repeats bundle provisioning or requires a separate human bearer token.
  • Send exactly one installation API key to Tilde. Its owning user determines whether the caller is human or agent; the permanent API-key-plus-bearer delegation path is removed.
  • Generate primary and future agent endpoints with explicit agentLoop response mode so fresh installations satisfy the current ChatKit SDK contract.

Repository context

  • Branch, remotes, worktree, stashes, and existing PRs were inspected.
  • The full diff was reviewed against trytilde/openbot main.
  • Unrelated user work and fork-owned configuration were preserved.

Validation

Passed on final head:

  • pnpm --filter @tryopenbot/control-service test — 34 tests after removing the duplicate provisioning path
  • pnpm --filter openbot exec vp test run src/initialization.test.ts — 22 tests
  • pnpm --filter @tryopenbot/client-runtime test — 94 tests
  • pnpm --filter @tryopenbot/ui test — 67 tests
  • pnpm --filter @trytilde/sdk-vercel-ai-node test — 86 tests
  • pnpm check — passes with the existing repository warnings only
  • pnpm build — all active packages, web, desktop, package and CLI verification after native-client removal refactor(mobile): pause native clients #110
  • TILDE_OPENAPI_PATH=<merged Tilde main spec> pnpm openbot sdk refresh — generated client and five SDK package suites pass; checked-in OpenAPI exactly matches merged API #192
  • pnpm openbot sdk validate — 606 operations and all SDK artifacts pass
  • CI=1 pnpm test:e2e — 15 passed, 1 existing skip
  • git diff --check

Contracts, state, deployment, and security

Breaking pre-1.0 API change: /api/plugins, /api/connectors, /api/routines, /api/signals, and registerConnectorRoutes are removed. Use registerTildeProxy, registerConnectorAuthorizedRoute, and @tryopenbot/client-runtime.

No OpenBot database, protobuf, state import/export, environment-name, or secret-name migration. Deploy Tilde API #168, #193, #195, #196, and #197 first: #168 migrates Automation/SignalRule state to native Routines and requires complete trigger sets plus expected_version; #193 recognizes API-key owners as human or agent; #195 makes the durable bundle worker reconcile private resources as that recorded owner; #196 preserves the owner when private team-scoped MCP rows are loaded; #197 removes the stale per-agent message-provider update that blocked private-agent retries after messaging became connection-scoped. The Agent Provider also stops implicitly creating a paid memory bank; memory is opt-in and existing agent-owned banks are preserved by bundle omission. /api/tilde and /api/chat are owner-authenticated, strip caller credential headers before injecting the configured installation credential, and admit only operations the clients consume. Response cookies and hop-by-hop headers are never forwarded.

Configuration ownership

Target: trytilde/openbot. git ls-files configuration returns only configuration/.gitignore; no root environment, SOPS, secret, or fork configuration is included.

Architecture and ADR review

Amends ADR-0027 and ADR-0031: native Tilde resources are projected in Client Runtime through one operation-allowlisted credential bridge; control-service owns no plugin, connector, routine, or signal domain facade.

Cross-client parity

No new one-client capability was introduced.

External dependencies

External dependencies: unchanged. Client Runtime adds only a workspace type dependency on the already-present generated Tilde API client; contributors install no new tool or system dependency.

Package documentation and provider contracts

Root, control-service, web, client-runtime, ADR-0027, and ADR-0031 documentation is current. No provider contract changed.

Changeset

.changeset/collapse-tilde-facades.md records the pre-1.0 breaking migration and native resource replacement.

Fork update record

docs/updates/108.md describes the complete current PR, includes the required Mermaid architecture, and marks the change critical for forks.

Frontend evidence

The complete checked-in Playwright suite passed against the Vite/control-service surface. No visual design changed, so no screenshot artifact is included.

Dependency and known follow-up

Tilde API #168, #192, #193, #195, #196, and #197 are merged. The generated client exactly matches the #193 public contract; #195, #196, and #197 are internal reconciliation fixes. Deploy snapshot 164 before the final agent-creation proof.

Tilde runtime supports wait_for_status and timeout_ms on tool-group GET, but current OpenAPI attaches those query parameters to PATCH. OpenBot's raw bridge call works; the Tilde annotation should be corrected so generated clients expose the long-poll contract accurately.

Final diff review

  • Intentional files only; no secrets, generated deployment state, browser data, or generated noise.
  • Package README, Changeset, ADR, state, security, cross-client, CLI ownership, and external dependency gates reviewed.
  • PR is ready; the remaining gate is the live Phase-A API and exe.dev agent-creation proof.
  • No optional review bot was triggered.

@danielblignaut
danielblignaut marked this pull request as ready for review August 29, 2026 04:22
@danielblignaut
danielblignaut force-pushed the codex/collapse-tilde-facades branch from 63bf361 to b8fe5a9 Compare August 29, 2026 12:27
Plugin, connector, routine, and signal resources are owned by Tilde, but control-service duplicated their APIs and rebuilt assignment state from browser-supplied agent IDs. Keep one authenticated operation allowlist for the installation credential and project native responses in client-runtime for every client.

BREAKING CHANGE: remove the control-service /api/plugins, /api/connectors, /api/routines, and /api/signals routes plus registerConnectorRoutes. Custom control services should use registerTildeProxy and registerConnectorAuthorizedRoute, while clients should consume @tryopenbot/client-runtime.
Remove the OpenBot-specific aggregate dependency and exhaust native MCP and Skills pages so larger teams do not silently truncate plugin inventory.
The installation credential must not authorize arbitrary ChatKit operations from the browser. Limit forwarding to the exact workspace, queue, observation, and attachment routes consumed by Client Runtime.
Fresh installations must select the required agentLoop response mode or their generated primary and future agents fail type checking.
@danielblignaut
danielblignaut force-pushed the codex/collapse-tilde-facades branch from 9795af9 to 39557f6 Compare August 29, 2026 13:29
Tilde memory banks are paid resources. Omitting memory from bundle requests preserves existing banks while preventing agent creation from failing or enrolling users implicitly.
@danielblignaut
danielblignaut merged commit c7f18ef into main Aug 29, 2026
1 check passed
@danielblignaut
danielblignaut deleted the codex/collapse-tilde-facades branch August 29, 2026 15:20
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.

1 participant