@dxos/compute - v0.16.0
    Preparing search index...

    Class Routine

    User-facing routine: a thin aggregate of an action (runnable) and the triggers that fire it. App-level only — EDGE stays unaware of it (triggers point directly at the runnable).

    Hierarchy

    • {
          description?: string;
          name?: string;
          spec?:
              | {
                  kind: "runnable";
                  runnable: Ref<PersistentOperation & OfKind<Object> & Unknown>;
              }
              | {
                  instructions: Ref<
                      Instructions.Instructions & OfKind<Object> & Unknown,
                  >;
                  kind: "instructions";
              };
          triggers: readonly Ref<Trigger.Trigger & OfKind<Object> & Unknown>[];
      } & OfKind<Object, this>
      • Routine
    Index

    Constructors

    • Parameters

      • _: never

      Returns Routine.Routine

    Properties

    "~@dxos/echo/Kind": Object
    description?: string = ...
    id: string
    name?: string = ...
    spec?:
        | {
            kind: "runnable";
            runnable: Ref<PersistentOperation & OfKind<Object> & Unknown>;
        }
        | {
            instructions: Ref<Instructions.Instructions & OfKind<Object> & Unknown>;
            kind: "instructions";
        } = ...

    The action to run: either an Operation (spec.runnable, bound directly) or the routine's own owned Instructions (spec.instructions). For an Operation action the trigger's runnable points at this Operation. For an Instructions action spec.instructions is the owned Instructions object (the operation is implicitly the static RunInstructions, so no separate operation ref is stored), and the trigger's runnable is RunInstructions with this instructions bound as its input.

    Type declaration

    • {
          kind: "runnable";
          runnable: Ref<PersistentOperation & OfKind<Object> & Unknown>;
      }
    • {
          instructions: Ref<Instructions.Instructions & OfKind<Object> & Unknown>;
          kind: "instructions";
      }
      • Readonlyinstructions: Ref<Instructions.Instructions & OfKind<Object> & Unknown>

        Owned by the routine: SetParent cascades it.

      • Readonlykind: "instructions"
    triggers: readonly Ref<Trigger.Trigger & OfKind<Object> & Unknown>[] = ...

    Explicit membership, bi-directional with trigger.runnable → runnable. Required (not derived by query) because the runnable may be a shared registry operation referenced by multiple automations, which would conflate triggers. MVP enforces length <= 1.

    "~@dxos/echo/Kind": Type

    Entity-kind brand of the type-entity value itself — always EntityKind.Type. The kind of instance the type describes lives on [SchemaKindId] (Object / Relation / Type). Lets Obj.isObject / Relation.isRelation reject type entities by a single [KindId] check.

    "~@dxos/echo/SchemaKind": Object

    Schema-kind brand (object).

    "~@dxos/echo/Type.Instance"?: Routine.Routine & OfKind<Object>
    "~@dxos/echo/Type.StaticSchema": Codec<any, any>

    Source Effect Schema — used internally by Type.getSchema(self).

    fields: {}

    The fields defined in the original struct schema. Allows accessing field definitions for introspection.

    id: string

    Object id. Like all ECHO entities, type entities always carry an id — stamped at construction for in-memory (static) declarations and assigned by the database once persisted. The id does NOT determine the entity's URI: static types resolve to their typename DXN, persisted types to echo:///<id> (see getTypeURIFromSpecifier).

    jsonSchema: JsonSchemaType
    name?: string