Typed contracts for applications & agents

Un producto.
Muchas interfaces.
Las mismas reglas.

Define el comportamiento de tu producto en TypeScript. Conéctalo a tu API, interfaces y herramientas de agentes, con entradas, permisos y reglas de aprobación explícitos.

Start with one operation in the codebase you already own.

BEHAVIOR / 001Explicit by design
{ }report.publishv1.0
INPUTreportIdstring
EFFECTPublish reportwrite
APPROVALRequired before execution↳
RESULTADOPublication receipttyped
↗Your APIREST adapter
▤Your interfaceBound UI
⌘Your agentMCP tool
[ shared intent ]Your handlers still do the work.
TRY A SHARED RULE

Change the rule.
Watch every interface follow.

One equipment request, three entry points. Adjust the policy and see the app, API and agent reach the same decision.

Interactive illustration · Sample data · Runs locally
01

Set the request.

02

Shape the policy.

Changing the interface never grants a role or an approval. This local fixture evaluates only the inputs shown.

Permitido por la política de esta demo

The local request satisfies the supplied policy.

APP

Equipment request

Studio setup · Sample workspace

€2,400.00
SolicitanteNo se requiere revisión

Prueba la acción y examina el resultado.

APIJSON
{
  "operation": "request.submit",
  "allowed": true,
  "reviewRequired": false,
  "reviewRecorded": false,
  "role": "requester",
  "amount": 2400,
  "threshold": 5000,
  "reason": "permitted"
}
Illustrative response shape
AGENT

The next permitted step.

  1. Read the same request and actor.
  2. Comprueba el umbral de revisión €5,000.00 y el rol requester.
  3. Ofrecer enviar la solicitud.
Follow the tool boundary ↗
Inspect the shared demo definition
{
  "kind": "educational-fixture",
  "operation": "request.submit",
  "reviewFrom": 5000,
  "submitRoles": [
    "requester",
    "reviewer"
  ],
  "approvalIsIndependent": true,
  "interfaces": [
    "app",
    "api",
    "agent"
  ]
}

This is an educational JSON fixture, evaluated by this page. It is not an importable ContractSpec definition.

01 Explicit behavior02 Connected interfaces03 Reviewable effectsUnderstand the boundaries ↗

Every new interface
needs to agree
with your product.

A person clicks a button. An integration calls an API. An agent invokes a tool.

When those paths implement the same operation separately, a permission change or new input requirement has several places to go wrong.

ContractSpec gives that behavior an explicit definition, then connects supported adapters and your implementations to it.

WHAT IS A CONTRACT?

A typed description of what an operation accepts, what it returns and the rules it must follow. Your handler implements the work. The configured runtime checks the boundary.

01

Define the behavior.

Inputs, outputs, policy, effects and ownership live in an inspectable contract.

02

Connect the interfaces.

Bind your handler and expose the operation through the adapters your application needs.

03

Inspect what happens.

Make successful calls, denied calls and the required evidence visible at the execution boundary.

Change the entry point. Keep the meaning.Trace the mechanism · 3 ways to look closer

Follow a request to export a report through three interfaces. The useful common ground is the registered operation and its boundary.

Where does this request begin?
UNA SITUACIÓN CONCRETA

A form helps someone make a valid request.

A person selects a report and gives a reason for the export.

01 / Form

Collect the report and reason, and explain errors in the person’s language.

Qué cambia

Labels, validation messages and the way the result is presented.

Qué sigue siendo explícito

The report, required reason, business implementation and configured execution checks.

SEGUIR LA CONSECUENCIA

The form can make a requirement clear. The server still needs to reject a request that bypasses the form.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

Approval belongs
at execution.

The same operation can be reached in several ways.
The approval requirement should still hold.

Interactive illustration · local fixture, not a live runtime trace.

THE DECLARED RULETypeScript excerpt
// Part of an operation definition
execution: {
  effects: ['write'],
  approval: {
    required: true
  }
}
↳

An approval requirement is explicit metadata. Enforcement also needs a configured runtime and approval port.

HTTP REQUEST · ILLUSTRATIVE

POST /reports/demo-report/publish
Content-Type: application/json

{ "reportId": "demo-report" }
↳
LISTO PARA PROBAR

¿Qué ocurre sin aprobación?

Intenta la operación, añade un comprobante de prueba válido y vuelve a intentarlo.

Handler calls in this attempt —Awaiting attempt

The illustration explains the proposed experience. The inspected REST test asserts denial before handler invocation; this page does not execute ContractSpec packages.

Inspect the source basis ↗

A small starting point.
A composable system.

Reuse product behavior while changing the experience. Add adapted interfaces, reusable capabilities and change controls as your product grows.

A / CORE

Model behavior.

Describe operations, data and events with typed contracts. Bind implementations through a runtime built around explicit boundaries.

Contracts + Runtime
B / CHANGE

Make decisions inspectable.

Connect supports scoped decisions and receipts, with durable verification supplied by a configured host. Your host performs the actual merge, deployment or effect.

Conectar
C / EXPERIENCE

Adapt the experience.

RoleMorph and presentation contracts support different interfaces for different roles, with authorization kept explicit.

RoleMorph + Surfaces
D / COMPOSITION

Compose capabilities.

Feature Hubs declare their needs and provide reusable functionality. Installation, readiness and starting effects remain distinct steps.

Feature Hubs

One workflow. Two useful views.

Presentation illustration
EDITOR / PREPARE

Quarterly report

Content, supporting sources and the next review step.

Borrador listoRevisión necesaria →
REVIEWER / ASSESS

Publication review

Changed content, requested effect and approval evidence.

Evidence attachedReview publication →
Shared operation report.publishPresentation changes. Backend authority stays explicit.

Built at LSSM. CompanyOS is an application built on this shared foundation, bringing contracts, operations and interfaces into a business workflow.

A reusable piece comes with a set of relationships.Trace the mechanism · 3 ways to look closer

A communication capability might need an operation, a provider port and a policy binding. Explore what happens when one piece is missing.

What is ready in the composition?
UNA SITUACIÓN CONCRETA

You can inspect the promise before enabling an effect.

The capability is described, but no active installation or provider has been selected.

01 / Declare

Name the operations, capabilities and required ports.

Qué cambia

The product can discover the capability and its requirements.

Qué sigue siendo explícito

A declaration alone does not send a message or initialize a provider.

SEGUIR LA CONSECUENCIA

Use the dependency map to choose what to bind. Do not treat catalogue presence as runtime readiness.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

Bring one operation.
Keep your application.

Start where several interfaces already need to agree.

Choose a bounded action with clear inputs, one handler and a failure you want to catch. Add a contract, connect two entry points and test the failure directly.

  1. 01
    Choose the boundary

    A real operation with a repeated rule.

  2. 02
    Bind the implementation

    Your existing business logic stays yours.

  3. 03
    Demonstrate the rule

    Verify both success and a denied path.

Explore the documentation ↗Check availability ↓Check the supported package versions before you start.
Choose an evaluation that can teach you something.Explore a situation · 3 ways to look closer

Keep the existing application. Make one operation explicit, then decide what the next useful proof would be.

Which situation sounds closest?
UNA SITUACIÓN CONCRETA

Start with behavior you can compare.

An existing account lookup already returns a useful result to an API consumer.

Qué cambia

The operation gains an explicit input, result, errors and ownership boundary.

Qué sigue siendo explícito

Its business implementation can remain in place.

SEGUIR LA CONSECUENCIA

Compare the current route with the new binding using the same valid and invalid cases. Widen the scope only after the difference is understood.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

Understand the promise.
Inspect the limits.

What do I still implement?+

Your business logic, host authentication, infrastructure and provider integrations. Contracts describe behavior; adapters and configured runtime ports connect that description to execution.

Does declaring a policy enforce it?+

Enforcement requires the appropriate runtime path and configuration. In the inspected operation model, approval is explicitly enabled through execution metadata. Descriptive tags alone do not protect an operation.

Does ContractSpec regenerate and deploy everything?+

No. Supported artifact generation exists. The inspected integration CLI still restricts generation apply to a dry run. Review, merge, deployment and real effects remain separate responsibilities.

Do I need CompanyOS or Studio?+

The developer foundation has its own adoption path. Packaged applications are separate products built on top; they are not a prerequisite for using the foundation.

Find the point where the handler can begin.Trace the mechanism · 3 ways to look closer

Take an operation that explicitly requires approval. Change one condition and inspect the expected path from the captured runtime guide.

Which request are you inspecting?
UNA SITUACIÓN CONCRETA

Input preparation stops the path early.

The request omits an input required by the operation schema.

01 / INPUT

Parse and validate the request against the declared schema.

Qué cambia

The request cannot become a valid prepared input.

Qué sigue siendo explícito

No visible button or descriptive tag makes the missing value valid.

SEGUIR LA CONSECUENCIA

A denial test for approval should use otherwise valid input, so it actually reaches the approval boundary.

Where this explanation comes from

An authored situation, grounded in the linked source guides. Choosing a case explores its expected responsibilities; it does not execute an operation.

The example has
a source basis.

The concept is grounded in inspected repository code. It is a design review, not a fresh runtime verification or a claim of production qualification.

Approval fixture at inspected release ↗

The repository link currently requires access.

Availability matters.

Observed

Several packages have public npm metadata. That metadata and the current source tree describe different dependency layouts.

To verify

A clean, anonymous installation of the exact starter and versions advertised on the new site.

This concept

A local illustration of an approval boundary. No provider calls, backend execution or production data.

WATCH THE IDEA TAKE SHAPE

From intent to an experience
you can make your own.

A short illustrated walkthrough of shared meaning, AI-assisted creation and reusable execution.

Then try it yourself ↗
Read the walkthrough

Intent. Empieza con un objetivo. ContractSpec da a las piezas significado, datos, comportamiento y políticas compartidos.

Create and run. La IA puede ayudar a generar código o componer interfaces compatibles. Los componentes reutilizables y los entornos de ejecución habituales ejecutan el trabajo definido.

Adapt. El mismo trabajo puede presentarse de forma distinta en un escritorio, una vista móvil o un agente, con los límites de acción correspondientes.

Compose. Reúne capacidades de dominio en torno al resultado: comunicación, facturación, crecimiento, desarrollo y más.

Download the full transcript ↓
START WITH A RULE THAT MATTERS

Give your next interface
something explicit to follow.

Tu vista

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.