Skip to content

Two edge vocabularies, and they never mix

An edge is written one way on the wire and another way in the execution record. Each form has its own key names, and a key from the wrong bag produces something nothing reads.

The rule

Normative: this is the rule
  1. An edge has two forms, each with its own key names.
  2. In transport, the form an editor reads and writes, the source, the target and their handles MUST be named source, target, sourceHandle and targetHandle.
  3. In the execution record, the handles and the edge's flags MUST be named source_handle, target_handle, is_trigger, is_loopback, is_tool, branch_name and edge_id.
  4. An edge in one form MUST NOT carry a key named in the other form's list.

Why

Recorded under OPEN-22, OPEN-25.

Fixtures

Test cases whose outcome this rule decides. A case compares absent, null and empty members exactly; the fixtures README defines each operation. Where a case and the rule disagree, the rule is right.

  • An edge with no handles reads back with no handles read-edge

    Not the empty string, not null.

    {
      "given": {
        "edge": {
          "source": "n1",
          "target": "n2"
        }
      },
      "expect": {
        "edge": {
          "source": "n1",
          "target": "n2"
        }
      }
    }

    fixtures/presence/edge-absent-handles-stay-absent.json

  • An edge's handles read back as sent read-edge
    {
      "given": {
        "edge": {
          "source": "n1",
          "target": "n2",
          "sourceHandle": "n1-output-text",
          "targetHandle": "n2-input-prompt"
        }
      },
      "expect": {
        "edge": {
          "source": "n1",
          "target": "n2",
          "sourceHandle": "n1-output-text",
          "targetHandle": "n2-input-prompt"
        }
      }
    }

    fixtures/presence/edge-handles-kept.json

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · EDGE-9 · changed in spec 1.0