
Tidebase
io.github.BlueprintLabIO由 GitHub 帳號 BlueprintLabIO 發布v0.1.1更新於 Nov 3, 2026
Inspect Tidebase agent runs, resolve approval gates, and trigger recovery from your AI assistant.
概覽
此 MCP 伺服器讓助手在自架的 Tidebase 執行個體上檢視代理執行、處理審批閘門並觸發復原。
- 可以做什麼
- 檢視代理執行及其狀態、步驟與檢查點
- 處理持久化審批閘門,讓暫停的工作流程繼續
- 為失敗的執行觸發復原或續跑
- 透過設定的基礎位址連線自架的 Tidebase 伺服器
- 適用情境
- 當你已自架 Tidebase,用它為代理提供持久化執行、檢查點與審批閘門,並希望助手不必開啟 Studio 就能查看執行狀態、回應待處理閘門或啟動復原時使用。
- 執行需求
- 透過 npx 從 @tidebase/mcp npm 套件以本機程序執行,需要 Node.js。需要一個可連線的自架 Tidebase 伺服器,以 TIDEBASE_URL 環境變數指定。僅限桌面端;清單未宣告任何身分驗證。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Tidebase,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Tidebase
Agent auth and credential brokering for AI agents, with checkpoints, queues, schedules, and approval gates. In your own Postgres.
[License: Apache-2.0] [Latest release] [CI] [TypeScript and Python SDKs] [Postgres storage]
Quick start · API · Storage contract · Scope
Tidebase gives your AI agents an identity and a vault. When an agent calls an API, the call goes through Tidebase, which injects the credential, so the agent and the model never see the key. You can scope it, audit it, and revoke it.
It also keeps the durable parts: checkpoints, live state, queues, schedules, and approval gates, all in your own Postgres. Your code still runs in your app, worker, or job process; Tidebase does not run it. So "this run died at step 7, is it safe to rerun?" has an answer, and "the agent has my GitHub token in plaintext" stops being true.
Docs: https://tidebase.dev · Community: Discord · For AI assistants: /llms.txt
Why Tidebase
Agent products usually grow the same operational plumbing:
- per-agent identity instead of one shared API key
- a vault for third-party secrets and OAuth tokens
- a way to call APIs without handing the secret to the model
- status tables for runs and steps
- checkpoint blobs for partial progress
- retry flags and manual-review states
- progress streaming to the UI
- approval gates for risky actions
- token and cost ledgers
- webhook glue for recovery and external review surfaces
Tidebase packages that layer around your existing code, plus a credential broker so agents act on real services without holding the keys. It does not run your code (your runtime stays yours), and it is not an LLM proxy or a hosted worker runtime.
Quick Start
Fastest path (no Node needed), prebuilt server image:
Then point any SDK at http://localhost:7373 (npm i @tidebase/sdk or pip install tidebase).
Dev setup (server + Studio from source):
Start Postgres:
Install dependencies:
Run the server and Studio:
- Server: http://localhost:7373
- Studio: http://localhost:5173
Run the example workflow:
Force a failure after two completed checkpoints:
Copy the run id from Studio or the API, then resume:
The plan and fetch-sources steps are returned from checkpoints. Only write-report executes again.
Agent auth and credential brokering
Give an agent its own identity, vault a third-party secret, and let the agent call the API without ever holding the key. Tidebase makes the outbound call with the secret injected, and you can scope, audit, and revoke it.
Secrets are envelope-encrypted at rest (AES-256-GCM with a KMS-wrapped DEK). baseUrl pins the upstream and scopesAllowed caps any grant, so a leaked grant can't reach an arbitrary host. The proxy blocks private IPs and metadata hosts (SSRF defense), and GET /audit returns grant receipts with no secret material. For OAuth providers you can delegate custody to nango or openbao and Tidebase holds only an opaque connection reference.
Using Tidebase with AI coding agents
Make every AI session in your project use Tidebase correctly:
Give your assistant direct access to runs, gates, and recovery via MCP:
Or install the Claude Code plugin (skill + MCP server in one):
Agent-readable docs live at tidebase.dev/llms.txt; every docs page also serves a raw .md twin.
Queues, schedules, and cancellation (v0.5)
Tidebase can now decide when your code runs, while still never executing it:
Push-mode dispatch is also available: configure a queue with an invokeUrl and Tidebase delivers signed run.invoke webhooks to your app instead of waiting for a claim. A queued job IS a run, queued is a lifecycle state, not a second table, so status never drifts.
See docs/production.md for the full lifecycle, replay contract, worker-death recovery model, and deploy discipline (versioned migrations via pnpm migrate, TIDEBASE_AUTO_MIGRATE=0 for expand/contract deploys).
Testing
The suite (84 TypeScript tests + 9 Python integration tests, run in CI on every push) uses the same Postgres in an isolated tidebase_test database. It is invariant-driven rather than coverage-driven: every test asserts a durability or safety guarantee through the public API or SDK, against real Postgres, including concurrency probes for the guarantees that only matter under contention.
What it proves:
- completed steps replay from storage and never re-execute, including across crash + recovery-webhook resume
- step and run leases are mutually exclusive and fenced, zombie workers cannot write back stale results
- input-hash drift on replay is rejected before it can corrupt a run
- failure classification honors the resume contract: unkeyed external writes park in
manual_review, idempotency-keyed and read-only steps aresafe_replay - per-run event logs are gap-free and strictly ordered under concurrent writers
- gates resolve exactly once, require the resolve token, and replay their decision on resume
- child runs are idempotent by edge name, so resumed fanouts reuse children
- recovery webhooks and channel deliveries are HMAC-signed; the SDK rejects unsigned, tampered, or forged payloads
- a slow or hung channel endpoint never blocks other writers to the run
See docs/testing.md for the full invariant map and conventions.
API Shape
Session Runs
tide.run() fits work shaped like a function. For open-ended execution, a protocol gateway in front of an agent, a REPL, a run that spans many requests, attach to a run as a session instead:
The session holds the run lease with a background heartbeat (heartbeatMs, default 20s). If the process dies, the heartbeat stops, the lease expires, and the reconciler takes over, requeue or recovery webhook, exactly as if a workflow worker had crashed. A session that loses its lease (onLeaseLost) is a zombie: the server fences its writes. Pass runId to resume an existing session's run; completed steps replay from storage.
For a complete worked example, an MCP gateway that wraps any agent's MCP server in checkpointed tool calls and durable approval gates with one config-line change, see examples/mcp-gateway/.
Resume Contracts
Each step can declare the operational contract Tidebase should record for replay:
Tidebase records that contract with the step and shows it in Studio. Final step failures are classified as:
failed_retryablewhen SDK retries remain.manual_reviewwhen replay is manual, or when side effects exist without an idempotency key.failedfor hard failures.
This does not make external systems exactly-once. It makes the resume decision explicit instead of hiding it in logs and custom retry flags.
Versioned State And Snapshots
run.state.set() and run.state.patch() still update the current live run state. In v0.2 they also append a version to Tidebase's state history.
You can label the current state when it becomes a meaningful review or restore point:
Snapshots are a convenience API over labeled state versions for external targets such as reports, artifacts, workspaces, documents, or app state:
The model is intentionally small:
Tidebase stores and exposes the versions. Your app decides what restore or fork means for its own state targets.
Child Runs And Fanout
Longer agent workflows often fan out to subagents and rejoin their results. Tidebase v0.2 models that as parent/child run edges plus a checkpointed join step.
Child run creation is idempotent by parent run and edge name. If the parent resumes, Tidebase returns the existing child runs instead of creating duplicates. The joined result is stored in a normal checkpointed step named join:<fanout-name>.
[Parallel sub-agents run as child runs, each checkpointed independently, and join on completion]
Gates And Channels
Channels deliver Tidebase events to external surfaces. The alpha supports webhook channels:
Gates create durable approval decisions that can be resolved by Studio, a product UI, Slack/Teams adapter, internal tool, or local review page:
Webhook gate payloads include a resolveUrl and resolveToken so a reviewer can resolve the gate. (Credentials are handled separately by the broker; see the agent auth section.)
When you cannot block on a human, an HTTP handler, a bot, a protocol gateway, use the non-blocking split that run.gate() is built on:
Gate begin is idempotent per name within a run: re-beginning a resolved gate returns its decision immediately, so retried callers converge on one answer.
Run a local approval channel:
In another terminal:
Open http://localhost:8788, approve the gate, and the workflow continues.
Recovery Webhooks
Tidebase can call back into your app when a run fails and has a recovery webhook configured. The SDK can handle that webhook and resume the matching workflow.
Tidebase records each recovery attempt with delivery status, HTTP status, response body, and errors. If TIDEBASE_WEBHOOK_SECRET is set on both the server and SDK, recovery payloads are signed with x-tidebase-signature.
The example includes a local webhook server:
Usage Tracking
Tidebase can record generic resource usage for a run without proxying model or provider calls:
Usage records are stored with the run, emitted as usage.recorded events, and summarized in Studio. The same ledger can track non-LLM resources:
What Tidebase Stores
- runs and attempts
- named checkpointed steps
- input hashes to prevent stale checkpoint reuse
- step resume contracts
- live run state
- versioned state streams
- labeled state versions and snapshots
- parent/child run edges
- append-only run events
- recovery attempts
- webhook channel deliveries
- durable gates and decisions
- credential/capability audit metadata
- generic usage records for tokens, units, and cost
Everything is backed by Postgres and designed for self-hosting from day one.
Current Scope
- Postgres-backed run store
- authoritative run lifecycle with first-class cancellation and deadlines
- durable queues (dedupe, delay, priority, retries/backoff, concurrency and rate caps)
- cron schedules (UTC, double-fire-proof)
- pull-mode workers (
tide.work) and push-mode signed invocation webhooks - reconciler (lease-expiry requeue/recovery, deadline cancels, cron, dispatch)
- versioned migration runner
- TypeScript SDK
- Python SDK incl. asyncio (
sdk-python/,tidebase.aio) - SvelteKit Studio
- live state set/patch
- state history and labeled snapshots
- child runs and fanout joins
- SSE event stream
- signed recovery webhooks
- webhook channels
- durable gates
- usage/resource ledger
- dogfood workflow
- agent auth + credential broker: per-agent keypair identity, run-bound grants, a vault that stores secrets and injects them into proxied calls (the client and the LLM never see them), a policy engine, SSRF defense, and Nango/OpenBao backends
Not In This Alpha
As of v0.7.0 (June 2026). Earlier alphas listed queues, schedules, cancellation, approval gates, API auth, and credential brokering here. Those have all shipped (v0.5 through v0.7): durable queues with retries/backoff, cron, authoritative cancel, exactly-once gates, session runs, opt-in bearer auth, a reconciler that detects dead workers and re-dispatches, and in v0.7 the agent auth control plane and credential broker. What remains deliberately out of scope:
- Tidebase-hosted code execution (your runtime stays yours; this one is permanent, not pending)
- LLM gateway/proxying
- hosted channel adapters
- agent memory (conversation or embedding storage)
- multi-tenant auth (single shared API key today)
- hosted cloud
Alpha Notes
This is ready for local demos and early feedback, not production.
Important limits:
- Migrations are versioned and advisory-locked; dev auto-migrates on boot, and
TIDEBASE_AUTO_MIGRATE=0+pnpm migrategives expand/contract deploy discipline. - API auth is opt-in: set
TIDEBASE_API_KEYon the server and the SDK (Studio:VITE_TIDEBASE_API_KEY). Without it the API is open, use only in trusted local/self-hosted environments. - External side effects still need idempotency keys in user code.
- Tidebase remembers what happened and can call recovery webhooks, but it does not guarantee that user code will be available to resume.
來源:README.md,提交 3f4e20a
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。