Package Exports
- @dotdo/types
- @dotdo/types/agents
- @dotdo/types/agents/agent
- @dotdo/types/agents/extensions
- @dotdo/types/agents/humans
- @dotdo/types/agents/index
- @dotdo/types/agents/mcp
- @dotdo/types/agents/memory
- @dotdo/types/agents/swarm
- @dotdo/types/agents/tools
- @dotdo/types/ai
- @dotdo/types/ai/embeddings
- @dotdo/types/ai/evals
- @dotdo/types/ai/index
- @dotdo/types/ai/llm
- @dotdo/types/ai/models
- @dotdo/types/ai/providers
- @dotdo/types/ai/rag
- @dotdo/types/ai/selector
- @dotdo/types/ai/vectors
- @dotdo/types/apps
- @dotdo/types/apps/app
- @dotdo/types/apps/dashboard
- @dotdo/types/apps/index
- @dotdo/types/attestation
- @dotdo/types/attestation/index
- @dotdo/types/auth
- @dotdo/types/auth/enterprise
- @dotdo/types/auth/index
- @dotdo/types/auth/keys
- @dotdo/types/auth/oauth
- @dotdo/types/auth/rbac
- @dotdo/types/auth/session
- @dotdo/types/auth/user
- @dotdo/types/bash
- @dotdo/types/builder
- @dotdo/types/builder/domains
- @dotdo/types/builder/factory
- @dotdo/types/builder/index
- @dotdo/types/builder/kits
- @dotdo/types/builder/templates
- @dotdo/types/business
- @dotdo/types/business/communications/email
- @dotdo/types/business/communications/index
- @dotdo/types/business/communications/messaging
- @dotdo/types/business/communications/sms
- @dotdo/types/business/communications/voice
- @dotdo/types/business/content/generation
- @dotdo/types/business/content/index
- @dotdo/types/business/content/marketing
- @dotdo/types/business/content/mdx
- @dotdo/types/business/content/mdxld
- @dotdo/types/business/content/mdxui/common
- @dotdo/types/business/content/mdxui/fields
- @dotdo/types/business/content/mdxui/index
- @dotdo/types/business/content/mdxui/panels
- @dotdo/types/business/content/mdxui/shells
- @dotdo/types/business/content/mdxui/views
- @dotdo/types/business/content/mdxui/widgets
- @dotdo/types/business/content/media
- @dotdo/types/business/content/publishing
- @dotdo/types/business/contracts
- @dotdo/types/business/core/accounting
- @dotdo/types/business/core/business
- @dotdo/types/business/core/financials
- @dotdo/types/business/core/incorporation
- @dotdo/types/business/core/index
- @dotdo/types/business/financial/index
- @dotdo/types/business/index
- @dotdo/types/business/marketplace
- @dotdo/types/business/notifications
- @dotdo/types/business/payments/accounts
- @dotdo/types/business/payments/billing
- @dotdo/types/business/payments/cards
- @dotdo/types/business/payments/charges
- @dotdo/types/business/payments/index
- @dotdo/types/business/payments/treasury
- @dotdo/types/business/products/index
- @dotdo/types/business/products/marketplace
- @dotdo/types/business/products/product
- @dotdo/types/business/products/roadmap
- @dotdo/types/business/saas/index
- @dotdo/types/business/saas/plans
- @dotdo/types/business/saas/tenant
- @dotdo/types/business/saas/usage
- @dotdo/types/business/startups/experiments
- @dotdo/types/business/startups/fundraising
- @dotdo/types/business/startups/index
- @dotdo/types/business/startups/startup
- @dotdo/types/business/support
- @dotdo/types/cli
- @dotdo/types/common
- @dotdo/types/common/errors
- @dotdo/types/common/index
- @dotdo/types/common/retry
- @dotdo/types/common/semantic
- @dotdo/types/common/status
- @dotdo/types/common/time
- @dotdo/types/common/tools
- @dotdo/types/communications
- @dotdo/types/communications/email
- @dotdo/types/communications/index
- @dotdo/types/communications/messaging
- @dotdo/types/communications/sms
- @dotdo/types/communications/voice
- @dotdo/types/compression
- @dotdo/types/compression/index
- @dotdo/types/content
- @dotdo/types/content/generation
- @dotdo/types/content/index
- @dotdo/types/content/marketing
- @dotdo/types/content/mdx
- @dotdo/types/content/mdxld
- @dotdo/types/content/mdxui
- @dotdo/types/content/mdxui/common
- @dotdo/types/content/mdxui/fields
- @dotdo/types/content/mdxui/index
- @dotdo/types/content/mdxui/panels
- @dotdo/types/content/mdxui/shells
- @dotdo/types/content/mdxui/views
- @dotdo/types/content/mdxui/widgets
- @dotdo/types/content/media
- @dotdo/types/content/publishing
- @dotdo/types/context
- @dotdo/types/context/ai
- @dotdo/types/context/comms
- @dotdo/types/context/db
- @dotdo/types/context/every
- @dotdo/types/context/index
- @dotdo/types/context/on
- @dotdo/types/context/pay
- @dotdo/types/context/tools
- @dotdo/types/database
- @dotdo/types/delivery
- @dotdo/types/delivery/apps/app
- @dotdo/types/delivery/apps/dashboard
- @dotdo/types/delivery/apps/index
- @dotdo/types/delivery/builder/domains
- @dotdo/types/delivery/builder/factory
- @dotdo/types/delivery/builder/index
- @dotdo/types/delivery/builder/kits
- @dotdo/types/delivery/builder/templates
- @dotdo/types/delivery/domains/index
- @dotdo/types/delivery/domains/registry
- @dotdo/types/delivery/domains/relationships
- @dotdo/types/delivery/domains/types
- @dotdo/types/delivery/index
- @dotdo/types/delivery/sdk/cli
- @dotdo/types/delivery/sdk/index
- @dotdo/types/delivery/sdk/sdk
- @dotdo/types/delivery/sites/blog
- @dotdo/types/delivery/sites/index
- @dotdo/types/delivery/sites/site
- @dotdo/types/delivery/telephony/index
- @dotdo/types/delivery/voice-ai/index
- @dotdo/types/dev
- @dotdo/types/dev/cli/index
- @dotdo/types/dev/doctest/external
- @dotdo/types/dev/doctest/generator
- @dotdo/types/dev/doctest/index
- @dotdo/types/dev/doctest/parser
- @dotdo/types/dev/doctest/run
- @dotdo/types/dev/doctest/transformer
- @dotdo/types/dev/index
- @dotdo/types/dev/quickstart
- @dotdo/types/dev/testing
- @dotdo/types/domains
- @dotdo/types/domains/index
- @dotdo/types/domains/registry
- @dotdo/types/domains/relationships
- @dotdo/types/domains/types
- @dotdo/types/events
- @dotdo/types/filesystem
- @dotdo/types/filesystem/branded
- @dotdo/types/filesystem/constants
- @dotdo/types/filesystem/entry
- @dotdo/types/filesystem/handle
- @dotdo/types/filesystem/index
- @dotdo/types/filesystem/stats
- @dotdo/types/fn
- @dotdo/types/fn/ai
- @dotdo/types/fn/batch
- @dotdo/types/fn/context
- @dotdo/types/fn/core
- @dotdo/types/fn/git
- @dotdo/types/fn/index
- @dotdo/types/fn/meta
- @dotdo/types/fn/middleware
- @dotdo/types/fn/partial
- @dotdo/types/fn/result
- @dotdo/types/fn/stream
- @dotdo/types/fn/tagged
- @dotdo/types/fn/validation
- @dotdo/types/foundation
- @dotdo/types/foundation/attestation/index
- @dotdo/types/foundation/auth/enterprise
- @dotdo/types/foundation/auth/index
- @dotdo/types/foundation/auth/keys
- @dotdo/types/foundation/auth/oauth
- @dotdo/types/foundation/auth/rbac
- @dotdo/types/foundation/auth/session
- @dotdo/types/foundation/auth/user
- @dotdo/types/foundation/bash/index
- @dotdo/types/foundation/cli/index
- @dotdo/types/foundation/compression/index
- @dotdo/types/foundation/filesystem/branded
- @dotdo/types/foundation/filesystem/constants
- @dotdo/types/foundation/filesystem/entry
- @dotdo/types/foundation/filesystem/handle
- @dotdo/types/foundation/filesystem/index
- @dotdo/types/foundation/filesystem/stats
- @dotdo/types/foundation/git/index
- @dotdo/types/foundation/index
- @dotdo/types/foundation/rpc/do-client
- @dotdo/types/foundation/rpc/index
- @dotdo/types/foundation/rpc/map
- @dotdo/types/foundation/rpc/messages
- @dotdo/types/foundation/rpc/methods
- @dotdo/types/foundation/rpc/promise
- @dotdo/types/foundation/rpc/proxy
- @dotdo/types/foundation/rpc/stub
- @dotdo/types/foundation/rpc/transport
- @dotdo/types/functions
- @dotdo/types/functions/_fn
- @dotdo/types/functions/agentic
- @dotdo/types/functions/bash/index
- @dotdo/types/functions/code
- @dotdo/types/functions/context
- @dotdo/types/functions/execution
- @dotdo/types/functions/fn/ai
- @dotdo/types/functions/fn/batch
- @dotdo/types/functions/fn/context
- @dotdo/types/functions/fn/core
- @dotdo/types/functions/fn/git
- @dotdo/types/functions/fn/index
- @dotdo/types/functions/fn/meta
- @dotdo/types/functions/fn/middleware
- @dotdo/types/functions/fn/partial
- @dotdo/types/functions/fn/result
- @dotdo/types/functions/fn/stream
- @dotdo/types/functions/fn/tagged
- @dotdo/types/functions/fn/validation
- @dotdo/types/functions/generative
- @dotdo/types/functions/human
- @dotdo/types/functions/index
- @dotdo/types/functions/registry
- @dotdo/types/functions/rpc/do-client
- @dotdo/types/functions/rpc/index
- @dotdo/types/functions/rpc/map
- @dotdo/types/functions/rpc/messages
- @dotdo/types/functions/rpc/methods
- @dotdo/types/functions/rpc/promise
- @dotdo/types/functions/rpc/proxy
- @dotdo/types/functions/rpc/stub
- @dotdo/types/functions/rpc/transport
- @dotdo/types/git
- @dotdo/types/infra
- @dotdo/types/infra/compat/index
- @dotdo/types/infra/compat/kafka
- @dotdo/types/infra/compat/mongo
- @dotdo/types/infra/compat/redis
- @dotdo/types/infra/index
- @dotdo/types/infra/migrations
- @dotdo/types/integrations
- @dotdo/types/integrations/apis/api
- @dotdo/types/integrations/apis/discovery
- @dotdo/types/integrations/apis/index
- @dotdo/types/integrations/apis/mcp
- @dotdo/types/integrations/apis/rest
- @dotdo/types/integrations/databases
- @dotdo/types/integrations/index
- @dotdo/types/integrations/infra/compat/index
- @dotdo/types/integrations/infra/compat/kafka
- @dotdo/types/integrations/infra/compat/mongo
- @dotdo/types/integrations/infra/compat/redis
- @dotdo/types/integrations/infra/index
- @dotdo/types/integrations/infra/migrations
- @dotdo/types/integrations/messaging
- @dotdo/types/integrations/oauth-apps
- @dotdo/types/integrations/platforms
- @dotdo/types/integrations/tools/communication/chat
- @dotdo/types/integrations/tools/communication/index
- @dotdo/types/integrations/tools/communication/slack
- @dotdo/types/integrations/tools/index
- @dotdo/types/integrations/tools/tool
- @dotdo/types/intelligence
- @dotdo/types/intelligence/agents/agent
- @dotdo/types/intelligence/agents/extensions
- @dotdo/types/intelligence/agents/humans
- @dotdo/types/intelligence/agents/index
- @dotdo/types/intelligence/agents/mcp
- @dotdo/types/intelligence/agents/memory
- @dotdo/types/intelligence/agents/swarm
- @dotdo/types/intelligence/agents/tools
- @dotdo/types/intelligence/ai/embeddings
- @dotdo/types/intelligence/ai/evals
- @dotdo/types/intelligence/ai/index
- @dotdo/types/intelligence/ai/llm
- @dotdo/types/intelligence/ai/models
- @dotdo/types/intelligence/ai/providers
- @dotdo/types/intelligence/ai/rag
- @dotdo/types/intelligence/ai/selector
- @dotdo/types/intelligence/ai/vectors
- @dotdo/types/intelligence/index
- @dotdo/types/interfaces
- @dotdo/types/interfaces/apps/app
- @dotdo/types/interfaces/apps/dashboard
- @dotdo/types/interfaces/apps/index
- @dotdo/types/interfaces/builder/domains
- @dotdo/types/interfaces/builder/factory
- @dotdo/types/interfaces/builder/index
- @dotdo/types/interfaces/builder/kits
- @dotdo/types/interfaces/builder/templates
- @dotdo/types/interfaces/domains/index
- @dotdo/types/interfaces/domains/registry
- @dotdo/types/interfaces/domains/relationships
- @dotdo/types/interfaces/domains/types
- @dotdo/types/interfaces/index
- @dotdo/types/interfaces/sdk/cli
- @dotdo/types/interfaces/sdk/index
- @dotdo/types/interfaces/sdk/sdk
- @dotdo/types/interfaces/sites/blog
- @dotdo/types/interfaces/sites/index
- @dotdo/types/interfaces/sites/site
- @dotdo/types/interfaces/telephony/index
- @dotdo/types/interfaces/voice-ai/index
- @dotdo/types/payments
- @dotdo/types/payments/accounts
- @dotdo/types/payments/billing
- @dotdo/types/payments/cards
- @dotdo/types/payments/charges
- @dotdo/types/payments/index
- @dotdo/types/payments/treasury
- @dotdo/types/platform
- @dotdo/types/platform/attestation/index
- @dotdo/types/platform/auth/enterprise
- @dotdo/types/platform/auth/index
- @dotdo/types/platform/auth/keys
- @dotdo/types/platform/auth/oauth
- @dotdo/types/platform/auth/rbac
- @dotdo/types/platform/auth/session
- @dotdo/types/platform/auth/user
- @dotdo/types/platform/compression/index
- @dotdo/types/platform/context/ai
- @dotdo/types/platform/context/comms
- @dotdo/types/platform/context/db
- @dotdo/types/platform/context/every
- @dotdo/types/platform/context/index
- @dotdo/types/platform/context/on
- @dotdo/types/platform/context/pay
- @dotdo/types/platform/context/tools
- @dotdo/types/platform/database/analytics
- @dotdo/types/platform/database/cdc
- @dotdo/types/platform/database/collections
- @dotdo/types/platform/database/document
- @dotdo/types/platform/database/graph
- @dotdo/types/platform/database/index
- @dotdo/types/platform/database/relational
- @dotdo/types/platform/database/schema
- @dotdo/types/platform/database/storage
- @dotdo/types/platform/definitions
- @dotdo/types/platform/events/event
- @dotdo/types/platform/events/index
- @dotdo/types/platform/events/triggers
- @dotdo/types/platform/events/webhooks
- @dotdo/types/platform/filesystem/branded
- @dotdo/types/platform/filesystem/constants
- @dotdo/types/platform/filesystem/entry
- @dotdo/types/platform/filesystem/handle
- @dotdo/types/platform/filesystem/index
- @dotdo/types/platform/filesystem/stats
- @dotdo/types/platform/index
- @dotdo/types/platform/infrastructure
- @dotdo/types/platform/runtime/index
- @dotdo/types/platform/schemas
- @dotdo/types/platform/scoring/index
- @dotdo/types/platform/security/audit
- @dotdo/types/platform/security/compliance
- @dotdo/types/platform/security/index
- @dotdo/types/platform/security/observability
- @dotdo/types/platform/services/directory
- @dotdo/types/platform/services/index
- @dotdo/types/platform/services/rpc
- @dotdo/types/platform/services/service
- @dotdo/types/platform/workflows/definition
- @dotdo/types/platform/workflows/durable
- @dotdo/types/platform/workflows/execution
- @dotdo/types/platform/workflows/index
- @dotdo/types/platform/workflows/schedule
- @dotdo/types/platform/workflows/state-machine
- @dotdo/types/primitives
- @dotdo/types/primitives/common/errors
- @dotdo/types/primitives/common/index
- @dotdo/types/primitives/common/retry
- @dotdo/types/primitives/common/semantic
- @dotdo/types/primitives/common/status
- @dotdo/types/primitives/common/time
- @dotdo/types/primitives/common/tools
- @dotdo/types/primitives/index
- @dotdo/types/primitives/things/cascade
- @dotdo/types/primitives/things/identity
- @dotdo/types/primitives/things/index
- @dotdo/types/primitives/things/primitives
- @dotdo/types/primitives/things/properties
- @dotdo/types/primitives/things/relationships
- @dotdo/types/primitives/things/semantic
- @dotdo/types/products
- @dotdo/types/products/index
- @dotdo/types/products/marketplace
- @dotdo/types/products/product
- @dotdo/types/products/roadmap
- @dotdo/types/roles
- @dotdo/types/roles/engineering
- @dotdo/types/roles/executive
- @dotdo/types/roles/index
- @dotdo/types/roles/role
- @dotdo/types/roles/sales
- @dotdo/types/rpc
- @dotdo/types/rpc/do-client
- @dotdo/types/rpc/index
- @dotdo/types/rpc/map
- @dotdo/types/rpc/messages
- @dotdo/types/rpc/methods
- @dotdo/types/rpc/promise
- @dotdo/types/rpc/proxy
- @dotdo/types/rpc/stub
- @dotdo/types/rpc/transport
- @dotdo/types/saas
- @dotdo/types/saas/index
- @dotdo/types/saas/plans
- @dotdo/types/saas/tenant
- @dotdo/types/saas/usage
- @dotdo/types/sdk
- @dotdo/types/sdk/cli
- @dotdo/types/sdk/index
- @dotdo/types/sdk/sdk
- @dotdo/types/security
- @dotdo/types/security/audit
- @dotdo/types/security/compliance
- @dotdo/types/security/index
- @dotdo/types/security/observability
- @dotdo/types/services
- @dotdo/types/services/directory
- @dotdo/types/services/index
- @dotdo/types/services/rpc
- @dotdo/types/services/service
- @dotdo/types/sites
- @dotdo/types/sites/blog
- @dotdo/types/sites/index
- @dotdo/types/sites/site
- @dotdo/types/startups
- @dotdo/types/startups/experiments
- @dotdo/types/startups/fundraising
- @dotdo/types/startups/index
- @dotdo/types/startups/startup
- @dotdo/types/teams
- @dotdo/types/teams/index
- @dotdo/types/teams/org
- @dotdo/types/teams/team
- @dotdo/types/things
- @dotdo/types/workers
- @dotdo/types/workers/colo
- @dotdo/types/workers/do
- @dotdo/types/workers/extensions
- @dotdo/types/workers/index
- @dotdo/types/workers/roles/engineering
- @dotdo/types/workers/roles/executive
- @dotdo/types/workers/roles/index
- @dotdo/types/workers/roles/role
- @dotdo/types/workers/roles/sales
- @dotdo/types/workers/sandbox
- @dotdo/types/workers/state
- @dotdo/types/workers/teams/index
- @dotdo/types/workers/teams/org
- @dotdo/types/workers/teams/team
- @dotdo/types/workflows
Readme
@dotdo/types
The universal shared type system for the .do ecosystem — enabling Business-as-Code and Services-as-Software.
Vision
The .do platform enables every aspect of a business to be defined, configured, and operated as code. Traditional services that require humans (accounting, legal, sales, support, HR) are delivered as software through typed, composable, autonomous agents.
.org.ai (think) → Ontologies & abstractions for the AI-native future
.as (define) → Typed interface definitions & schemas
.do (execute) → Infrastructure & platform for Business-as-Code
.studio (create) → AI-operated startups studio built on .doThis package provides the TypeScript types, interfaces, and runtime constants that power the entire stack — from semantic primitives to autonomous startup creation.
Install
pnpm add @dotdo/typesUsage
// Import core primitives
import type { Thing, Noun, Verb, Event, Action } from '@dotdo/types/things'
// Import platform primitives
import type { Fn, CodeFunction, GenerativeFunction } from '@dotdo/types/functions'
import type { Workflow } from '@dotdo/types/workflows'
import type { Database, Collection } from '@dotdo/types/database'
// Import high-level business abstractions
import type { Business } from '@dotdo/types/businesses'
import type { Startup } from '@dotdo/types/startups'
import type { SaaS, Tenant } from '@dotdo/types/saas'
import type { Service } from '@dotdo/types/services'
import type { Product } from '@dotdo/types/products'
import type { App } from '@dotdo/types/apps'
import type { API } from '@dotdo/types/apis'
import type { SDK } from '@dotdo/types/sdk'
// Import agent types
import type { Agent, AgentConfig } from '@dotdo/types/agents'
import type { Role } from '@dotdo/types/roles'
import type { Team } from '@dotdo/types/teams'
// Import runtime context
import type { DOContext } from '@dotdo/types/context'
// Runtime constants - discover domains, relationships, definitions
import { domains, relationships, definitions } from '@dotdo/types/domains'Architecture
The type system follows a layered hierarchy from ontological primitives up to autonomous business creation:
Layer 0: Things (Ontological Foundation)
The semantic foundation everything builds on. Based on six universal primitives from .org.ai:
| Primitive | Purpose | Example |
|---|---|---|
| Thing | Universal base type | Any entity in the system |
| Noun | Entity/object definitions | Customer, Product, Invoice |
| Verb | Operation/action definitions | Create, Process, Deploy |
| Event | Immutable occurrence records | OrderPlaced, PaymentReceived |
| Action | Discrete executable operations | SendEmail, ChargeCard |
| Domain | Namespace/context boundaries | Finance, Engineering, Sales |
Plus: Properties, Relationships, Cascade operators (->, ~>, <-, <~), Identity ($id), Semantics ($type, $context, JSON-LD/MDXLD).
Layer 1: Platform Primitives
The .do infrastructure that makes everything executable:
| Module | Domain | Purpose |
|---|---|---|
functions/ |
functions.do | Computation (Code, Generative, Agentic, Human) |
workflows/ |
workflows.do | Orchestration, scheduling, state machines |
database/ |
database.do | Persistence (Relational, Document, Graph, Analytics) |
events/ |
events.do | Reactivity, triggers, webhooks |
rpc/ |
rpc.do | Communication, transports, proxying |
auth/ |
oauth.do | Identity, OAuth, keys, RBAC, FGA |
workers/ |
workers.do | Runtime (Durable Objects, colo, sandboxing) |
context/ |
context.do | The unified $ runtime object |
Layer 2: AI (Intelligence Services)
| Module | Domain | Purpose |
|---|---|---|
ai/ |
llm.do | LLM completion & streaming |
| embeddings.do | Vector embeddings | |
| vectors.do | Similarity search | |
| models.do | Model registry | |
| evals.do | Evaluation & benchmarks |
Layer 3: Agents (Autonomous Actors)
| Module | Domain | Purpose |
|---|---|---|
agents/ |
agents.do | Agent definitions, tools, memory |
roles/ |
roles.do | Executive (CTO, CMO), IC (SWE, BDR) |
teams/ |
teams.do | Agent composition (devs.do, engineers.do) |
Layer 4: Services & Products (What Gets Built)
| Module | Domain | Purpose |
|---|---|---|
apis/ |
apis.do | API definitions, REST, MCP, discovery |
sdk/ |
sdk.do, cli.do | SDK generation, CLI commands |
apps/ |
apps.as | Applications, dashboards |
services/ |
services.do | Services-as-Software |
products/ |
products.do | Product definitions, roadmaps |
sites/ |
sites.do | Web presence, blogs, directories |
Layer 5: Business (High-Level Abstractions)
| Module | Domain | Purpose |
|---|---|---|
businesses/ |
businesses.do | Business entities, accounting, financials |
startups/ |
startups.do | Startup formation, fundraising, validation |
saas/ |
saas.as | Multi-tenancy, plans, usage metering |
payments/ |
payments.do | Charges, accounts, cards, treasury |
communications/ |
calls.do, texts.do, emails.do | Voice, SMS, email, messaging |
Layer 6: Content (Media & Publishing)
| Module | Domain | Purpose |
|---|---|---|
content/ |
mdx.do, blogs.do | MDX/MDXLD, media, publishing, generation |
Layer 7: Integrations (External Connections)
| Module | Domain | Purpose |
|---|---|---|
integrations/ |
*.do | Database, platform, payment, messaging integrations |
Layer 8: Builder (Meta-Creation)
| Module | Domain | Purpose |
|---|---|---|
builder/ |
startups.studio | Factory for creating new businesses/products/services |
Domain Registry
| Module | Purpose |
|---|---|
domains/ |
Runtime constants: domain registry, relationships, .as definitions |
Domain Taxonomy
The .do ecosystem contains 300+ domains organized by category:
- Agents (~85) — Named AI workers (priya.do, tom.do, sally.do, mark.do...)
- Roles (~15) — Job functions (cto.do, cmo.do, swe.do, devs.do...)
- Primitives (~50) — Core platform (functions.do, workflows.do, database.do, events.do...)
- Business (~25) — Business-as-Code (payments.do, accounting.do, startups.do...)
- AI (~15) — Intelligence services (llm.do, embeddings.do, vectors.do, evals.do...)
- Content (~20) — Media & publishing (blogs.do, images.do, videos.do, mdx.do...)
- Infrastructure (~20) — Platform infra (browsers.do, tunnels.do, deployments.do...)
- Integrations (~30) — External (postgres.do, stripe.do, cloudflare.do, slack.do...)
- Utilities (~10) — Kits & tools (startupkit.do, agentkit.do, chatkit.do...)
- Definitions/.as (~36) — Interface schemas (agent.as, functions.as, workflows.as...)
Interface (.as) vs Implementation (.do)
// .as defines WHAT something must be (interface)
import type { Agent } from '@dotdo/types/agents' // agent.as
// .do defines HOW it works (implementation types)
import type { AgentRuntime } from '@dotdo/types/agents' // agents.doThe $ Context Object
Every .do service has access to a typed runtime context:
interface DOContext {
ai: AIContext // $.ai.generate(), $.ai.embed()
db: DBContext // $.db.collection(), $.db.query()
on: OnContext // $.on.event(), $.on.schedule()
every: EveryContext // $.every.hour(), $.every.day()
email: EmailContext // $.email.send()
slack: SlackContext // $.slack.post()
sms: SMSContext // $.sms.send()
call: CallContext // $.call.start()
pay: PayContext // $.pay.charge(), $.pay.transfer()
}Function Tiers
Functions span from pure code to fully autonomous:
// Tier 1: Pure computation
const add: CodeFunction<number, { a: number; b: number }> = ...
// Tier 2: AI-powered generation
const summarize: GenerativeFunction<string, { text: string }> = ...
// Tier 3: Multi-step agent reasoning
const research: AgenticFunction<Report, { topic: string }> = ...
// Tier 4: Human-in-the-loop
const approve: HumanFunction<boolean, { proposal: Proposal }> = ...Business-as-Code
Every business operation is typed and composable:
import type { Business, Startup, SaaS } from '@dotdo/types'
// A startup is a typed business entity
const myStartup: Startup = {
name: 'Acme',
stage: 'seed',
hypothesis: 'SMBs need automated invoicing',
team: ['priya.do', 'tom.do', 'sally.do'],
products: [invoiceApp],
metrics: { mrr: 0, customers: 0 }
}Services-as-Software
Traditional services delivered through autonomous agents:
// sally.do - Sales agent
const sally: Agent = {
role: 'sales',
capabilities: ['prospect', 'qualify', 'close'],
tools: ['emails.do', 'calls.do', 'crm'],
autonomy: 'SemiAutonomous'
}
// accounting.do - Accounting service
const accounting: Service = {
type: 'financial',
capabilities: ['JournalEntries', 'FinancialReports', 'Reconciliation'],
requires: ['payments.do', 'llm.do']
}Builder / Studio
Agents can create new businesses, products, and services:
import type { StartupFactory, Template } from '@dotdo/types/builder'
// An agent creating a new startup
const factory: StartupFactory = {
template: 'saas',
config: {
name: 'InvoiceBot',
product: { type: 'app', framework: 'next' },
services: ['payments.do', 'emails.do'],
agents: ['priya.do', 'tom.do', 'sally.do'],
infrastructure: { database: 'postgres', hosting: 'cloudflare' }
}
}Relationship Predicates
Types include relationship semantics for knowledge graphs:
| Category | Predicates |
|---|---|
| Taxonomic | isA, instanceOf, subtypeOf, typeOf |
| Compositional | partOf, memberOf, belongsTo, owns |
| Dependency | uses, requires, enables, dependsOn |
| Structural | extends, implements, inheritsFrom |
| Integration | wraps, integrates, connectsTo |
| Semantic | synonymOf, relatedTo, antonymOf |
| Capability | provides, exposes |
| Branding | brandedAs, aliasOf |
TypeScript Compatibility
This package supports TypeScript 5.0 and later. CI tests against multiple TypeScript versions:
| TypeScript Version | Status | Notes |
|---|---|---|
| 5.0.x | Supported | Minimum supported version |
| 5.4.x | Supported | Stable LTS |
| 5.7.x | Supported | Latest features |
Version-Specific Notes
- TypeScript 5.0+: Required for
verbatimModuleSyntaxand modernmoduleResolution: bundler - TypeScript 5.4+: Improved
NoInferutility type, better generic inference - TypeScript 5.7+: Latest type system improvements
Local Compatibility Testing
Run type checks against all supported versions:
pnpm test:ts-compatThis will install and test TypeScript 5.0, 5.4, and 5.7 in sequence.
Documentation as Tests
This repository uses a doctest system that validates all @example blocks in JSDoc comments. Every documented example is automatically tested to ensure documentation stays accurate.
# Run all doctest examples
pnpm test:e2e
# Show coverage report
pnpm test:e2e --reportSee tests/e2e/README.md for more details.
Contributing
This package is the foundation of the entire .do ecosystem. Changes here affect every service, agent, and application in the platform.
License
MIT