v2.0 is a major release with breaking changes. This guide covers every breaking change. Status: DRAFT (in progress on
feat/v2.0). Entries are added as each §B8 phase lands. Authoritative plan:KAIBAN-v2.0-MASTER-PLAN.md.
- The published npm library is now Apache-2.0 (was GPL-3.0). The full application / board /
examples / repo aggregate remains GPL-3.0. See
LICENSING.md+docs/decisions/ADR-011. No code change for consumers —kaiban-distributedis now usable under Apache-2.0.
- KaibanJS
0.23.1→0.24.2; TypeScript5.9→6.0(build-time only); OpenTelemetry, bullmq, and dotenv bumped to latest stable. No public-API change. Seedocs/decisions/ADR-012. - TS7-readiness tech-debt: the build temporarily sets
ignoreDeprecations: "6.0"formoduleResolution: node10+baseUrl(removed in TS 7).
- Phase 1.1 — gateway/worker split: the single Docker entrypoint becomes
ROLE=gateway|worker. The image picks a role at runtime via theROLEenv var (defaultgateway). Action: worker deployments MUST setROLE=worker; gateway deployments may setROLE=gateway(the default).AgentActornow throws onstart()without a task handler (the old silent no-handler fallback that discarded tasks is removed). Seedocs/decisions/ADR-013. - Phase 1.2 —
TaskHandlersignature gains anAbortSignal:(payload, signal?: AbortSignal) => Promise<unknown>. The actor aborts the signal on timeout / shutdown so the in-flight LLM call stops burning tokens. The KaibanJS bridge wires this automatically by owning the LangChainChatOpenAIinstance. New direct dependency:@langchain/openai ^0.5.7(was transitive). Seedocs/decisions/ADR-014. - Phase 1.3 — A2A input validation hardened: every
tasks.createfield is validated for type and size, the total serialized params byte size is capped (64 KB OOM guard), and only the validated, size-capped payload is forwarded (never rawparams). Oversized / wrongly-typed input is rejected with JSON-RPC-32602. Caps exported asA2A_INPUT_CAPS. - Phase 2 — A2A now runs on the official
@a2a-js/sdkv0.3 server; the customA2AConnectoris removed (no compat shim). Seedocs/decisions/ADR-015. Wire changes (breaking): - Methods are the v0.3 names onPOST /a2a/rpc:message/send,message/stream(SSE),tasks/get,tasks/cancel. The oldtasks.create/tasks.get/agent.statusJSON-RPC methods are gone. To dispatch a task, sendmessage/sendwith the target agent inmessage.metadata.agentId(and optionalinstruction/expectedOutput/context/inputs, or plain text parts). Input caps (A2A_INPUT_CAPS) +-32602rejection are preserved. - AgentCard at/.well-known/agent-card.jsonis the v0.3 shape (protocolVersion,url,preferredTransport, objectcapabilities,skills[],securitySchemes,additionalInterfaces[]) — not the legacy{ capabilities: string[], endpoints: { rpc } }. -agent.statusmoved off JSON-RPC toGET /a2a/agents/:agentId/status, now returning the real last-known status (de-stub).tasks/getreturns the real persisted task from a Redis-backedTaskStore(de-stub). - Library API:A2AConnectorexport removed. New exports:buildA2AStack,KaibanAgentExecutor,RedisTaskStore,AgentStatusTracker,buildAgentCard,validateTaskInput/A2A_INPUT_CAPS.GatewayAppconstructor shape changed fromnew GatewayApp(connector, opts)tonew GatewayApp({ requestHandler, statusTracker, trustProxy }). - New dependency:@a2a-js/sdk ^0.3(Express peer already present). - Deferred to a later beta (Phase A): signed-AgentCard JWS verify, push-notification webhook delivery (only the capability flag ships), and the gRPC transport binding. - Phase 3 —
MESSAGING_DRIVER=amqprecognized as an unimplemented universal-AMQP seam (AmqpDriverstub throws on use; coverage-excluded;AmqpDriveris exported). BullMQ/Redis + Kafka are unchanged and remain the two real drivers. See ADR-016 +docs/messaging/AMQP.md. - Phase 4a — packaging: the library adds a
./sharedsubpath export (import … from "kaiban-distributed/shared") alongside.. Additive — no breaking change. - Phase R (BETA.2) — resilience: a reusable single-active orchestrator (Redis
checkpoint→resume, idempotent) moves into
src/sharedand is exported (kaiban-distributed/shared); the examples now consume it instead of duplicating it. The gateway serves/ready+/startupprobes andGatewayAppgains optionalreadinessProbe/startupProbedeps. Graceful-shutdown + DLQ-replay helpers added (src/resilience/*). Additive for library consumers. See ADR-018. - Phase M (BETA.2) — MCP server: a first-party Model Context Protocol surface exposing
allow-listed Tools (
dispatch_task) + Resources (kaiban://agents,kaiban://agents/{agentId}/status) + Prompts (delegate_task) + Elicitation (HITL consent) over Streamable HTTP, mounted on the gateway atMCP_SERVER_PATH(default/mcp) behind the existing helmet + rate-limit + JWT chain. Env-gated OFF by default (MCP_SERVER_ENABLED;MCP_DISPATCH_CONSENTfail-closed; optionalMCP_ALLOWED_{TOOLS,RESOURCES,PROMPTS}least-privilege filters — see.env.example+docs/federation/MCP.md). Dispatch reuses the A2AvalidateTaskInputcaps +taskIddedup. New direct dependency:zod ^4.4.3(already present transitively via the MCP SDK). Library API (additive): new exportsbuildMcpServer,createMcpHttpHandler+ theMcp*types andMCP_*capability-name constants;McpConfigadded toAppConfig. A2A stays the public front door; MCP is the internal surface. Seedocs/decisions/ADR-017. - Phase E (BETA.3) — economics/FinOps: a fleet-wide cost-control layer in
src/economics/(RateCostLimiter/CostLimiterPortoverrate-limiter-flexible;CostReservationpre-exec admission with degrade-at-threshold;priceUsage/effectiveCacheHitRateprompt-cache accounting;routeModel/estimatedStepCostright-sizing;detectSpendAnomaly). Default-OFF (ECONOMICS_ENABLED;_MAX_REQUESTS_PER_WINDOW/_MAX_COST_PER_WINDOW/_GLOBAL_COST_CEILING/_WINDOW_SECONDS/_DEGRADE_THRESHOLD;0= unlimited — see.env.example+docs/economics/ECONOMICS.md). Per-task accounting + the board economics panel are unchanged (§B1.3 COST guard). New direct dependency:rate-limiter-flexible ^11.2.0. Library API (additive): new exportsRateCostLimiter,CostReservation,priceUsage,effectiveCacheHitRate,routeModel,estimatedStepCost,detectSpendAnomaly+ thesrc/economics/typescontract;economicsadded toAppConfig. Seedocs/decisions/ADR-019. - Phase G (BETA.3) — governance & enforcement: a default-OFF Action Gate spine in
src/governance/+ memory hardening insrc/memory/.ActionGateruns an ordered set ofGateValidators and returns the most-severe of allow/degrade/escalate/block/terminate, recording each decision to a hash-chained (SHA-256) tamper-evidentAuditLog. ShipsPolicyEngine+loadPolicySet(policy-as-code,policies.yml),AgentRegistry(PDLSS kill-switch), thefirewallValidator/breakerValidator/costValidatoradapters (compose the existing firewall + breaker + Phase-E cost reservation), andSecureMemoryStore(tenant keyspaces, provenance/ trust tags, retrieval-time RBAC, TTL eviction, revoke-poisoned-entry). Opt-in / no-op when unconfigured; non-bypassable when enabled (GOVERNANCE_ENABLED/GOVERNANCE_POLICIES_PATH— see.env.example+docs/governance/GOVERNANCE.md). New direct dependency:yaml ^2.9.0. Library API (additive): the governance + memory modules + thesrc/governance/typescontract are exported;governanceadded toAppConfig. Seedocs/decisions/ADR-020. - Phase G hot-path enforcement (BETA.3) — the governance Action Gate is now wired into the
AgentActor execution loop. New domain port
IAdmissionGate(src/domain/security/admission-gate.ts);AgentActorDepsgains an optionaladmissionGateconsulted as a 3rd pre-execution guard (after breaker + firewall) — a block routes the task to the DLQ (blocked_by_admission_gate) without running the handler.buildSecurityDepswires policy-as-code enforcement into every worker whenGOVERNANCE_ENABLED(default-OFF; behavior-preserving when unset). Library API (additive): new exportsIAdmissionGate/AdmissionVerdict+buildAdmissionGate/buildWorkerAdmissionGate. Cost-reservation enforcement is added when a fleetCostLimiterPortis injected. Seedocs/decisions/ADR-021. - … (one entry per breaking change; cross-referenced to its ADR.)