dxos-operations

Define and orchestrate type-safe DXOS operations with lazy-loading handlers.

512|47|Updated Apr 7, 2021
One-click install
npx skills add https://github.com/dxos/dxos --skill dxos-operations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dxos-operations
Source: https://github.com/dxos/dxos/tree/main/.cursor/skills/operations
Command: npx skills add https://github.com/dxos/dxos --skill dxos-operations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DXOS Operations provide a first-class abstraction for unit of callable logic that couples a typed input with a typed output and a lazy-loaded handler, enabling safer, composable, and deployable business logic within DXOS apps.

Core Features & Use Cases

  • Type-safe definitions and serialized definitions that separate runtime logic from definitions
  • Deployable and lazy-loadable handlers with dynamic imports and optional services
  • Migration path from FunctionDefinition to Operation.make and Operation.withHandler for existing codebases
  • Real-world usage: define an operation for fetching and validating user data, then invoke it from a DXOS service or client

Quick Start

Create a definition with Operation.make, attach a handler with Operation.withHandler, and import and use the operation as needed

Frequently Asked Questions about dxos-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define type-safe operations with lazy-loading handlers in DXOS?

Define type-safe operations in DXOS using Operation.make to couple typed inputs and outputs, then attach runtime logic via Operation.withHandler to enable lazy-loading handlers with dynamic imports.

What is the best way to migrate from FunctionDefinition to Operation in DXOS?

Migrate from FunctionDefinition to Operation by adopting Operation.make for serializable definitions and Operation.withHandler to attach lazy-loaded handlers, separating runtime logic from deployable operation definitions.

Can I use dynamic imports and runtime services with DXOS operations?

Yes, DXOS operations support deployable and lazy-loadable handlers that utilize dynamic imports and optional service dependencies, allowing you to invoke modular business logic from a DXOS service or client.

How do type-safe operation definitions separate runtime logic from definitions in DXOS?

Type-safe operation definitions in DXOS separate runtime logic from definitions by serializing the input and output schemas, allowing the callable logic to be safely composed and deployed across packages.

When do I need to use Operation.make and Operation.withHandler for my DXOS business logic?

Use Operation.make and Operation.withHandler when you need a first-class abstraction for callable logic that couples typed inputs, typed outputs, and lazy-loaded handlers to build safer, composable DXOS apps.