Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
Workflow observability for TypeScript apps. Instrument existing processes and inspect every run with milestones, operations, context, errors, progress, and reported results.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Flowmark is an open-source process-intelligence platform for people and AI agents. Instrument the processes your application already runs, collect execution evidence, and understand technical and reported business outcomes over time.
Today, the TypeScript SDK and web interface support workflow investigation, related executions, progress, outcomes, confirmations and historical business analytics. Your application keeps ownership of execution.
Product 1.0 direction: Flowmark Platform supplies the programmable foundation; Flowmark Studio brings it into a contextual investigation workspace; Flowmark Everywhere carries it into agents, custom tools and portable interfaces. These are dimensions of one product. The unified Studio, delegated MCP access, saved investigations and portable agent UI are planned, not current availability claims.
Requires Node.js 20.19 or newer.
npm i @flowmarkdev/node
Create one shared client. Keep the write key on the server. Never place it in
NEXT_PUBLIC_* or a browser bundle. FLOWMARK_API_URL is the API origin, not
a path such as /v1/events.
FLOWMARK_API_KEY=<project write key>
FLOWMARK_API_URL=https://api.flowmark.dev
// Next.js Route Handler or Server Action
import { createFlowmark } from "@flowmarkdev/node/next"
export const flowmark = createFlowmark()
// Node.js worker or long-lived server
import { createFlowmark } from "@flowmarkdev/node"
export const flowmark = createFlowmark()
export async function completeCheckout(orderId: string) {
const flow = flowmark.workflow("checkout.order", {
properties: { orderId },
})
try {
flow.step("payment-captured")
const shipment = await flow.operation("create-shipment", () =>
createShipment(orderId),
)
flow.done({
outcome: "complete",
result: { shipmentId: shipment.id },
})
return shipment
} catch (error) {
flow.fail({ code: "CHECKOUT_FAILED" })
throw error
}
}
The function keeps its return value and its thrown errors. In Node.js, call
await flowmark.shutdown() before the process exits. The Next.js client drains
delivery with after().
Create a project and a write key in the dashboard, run the code, and open the recorded execution. Browser setup, typed workflows, and the rest of the API are in the documentation.
Follow one execution. Open a run and see the sequence of milestones and operations, where time was spent, the latest progress, and the errors your code recorded along the way.
Read the reported result. done() and fail() can carry a business
outcome and a small JSON summary: imported and skipped counts, a shipment id,
how far a sync got. The same facts are available on the run and across recent
history.
See what changed. Workflow views show volume, completion, duration, and reported outcomes over time. Compare a recent window, then open the runs behind the change.
Find a specific case. Search run history by an enabled business reference, such as an order or customer id, and continue from that run into the timeline.
Connect related work. Continue one run across later requests with the same
workflow name and id. Pass correlationId or parentRunId when separate runs
belong together.
Your application keeps running the work. Flowmark records the markers you add around it.
Your application
-> @flowmarkdev/node
-> https://api.flowmark.dev
-> a project in the dashboard
A workflow is a stable name, such as checkout.order. A run is one execution
of that name. Steps are milestones. Operations are timed pieces of work and may
overlap. Progress is an absolute snapshot. An outcome is the business result
your code chooses to report, alongside technical completion or failure.
The same markers work from a Node.js process, a Next.js server, or the browser. Browser clients use a public browser key, or a same-origin proxy that keeps the server write key private. See browser integration.
Self-hosting uses these applications, the committed migrations, and PostgreSQL you control.
@flowmarkdev/node — npmpackages/sdk/README.md — package details| Path | Role |
|---|---|
packages/sdk | Public SDK, @flowmarkdev/node |
packages/core | Shared event contracts, @flowmarkdev/core |
packages/api | Use cases and ports |
packages/db | Schema, migrations, and persistence |
apps/server | HTTP and tRPC shell |
apps/dashboard | Current web interface, evolving into Studio |
apps/web | Landing page |
apps/docs | Customer documentation |
Sessions and local accounts live in packages/auth. apps/dev-harness and
apps/internal-docs are local-only and bind to loopback. The
architecture guide describes how the pieces connect.
Node.js 20.19 or newer, pnpm 10.18.1, and Docker Compose.
pnpm install
pnpm dev:setup
pnpm infra up
pnpm db:setup
pnpm dev
pnpm db:setup runs once against this checkout's Compose database. Do not point
it at a hosted database. The dashboard is at http://localhost:3001.
Ports, checks, Drizzle Studio, and database safety are in the development guide.
See CONTRIBUTING.md and SECURITY.md.
Feature branches start from staging and open pull requests into staging.
Releases follow application releases. Maintained hosted
infrastructure follows the
Pulumi writer policy.