Store

Durable event streams for skills. Append an event when its stream is at the expected version, read a stream's events and projection, and list the newest stream heads. An instance's url chooses SQLite, Postgres or Redis; without one it is the workspace store.

4 implemented operations

connector.yaml
heads.listList one page of a resource's stream heads, newest first, optionally only those whose latest event has one of the given types.store.read
store heads.listread#
  • LocalReadyThe runtime uses the instance's store.
Runx scope
store.read
Target
{"$argument":"/data_source_uri"}
Credentials
Any of password
Local implementation
Instance store
Inputs
Field and constraintsType / valuesRequired
limitMinimum 1Maximum 100integerNo
cursorMin. 1 characterMax. 1024 charactersstringNo
resourcePattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$Min. 1 characterMax. 128 charactersstringYes
event_typesAt most 20 itemsarray of stringNo
event_types[]Min. 1 characterMax. 128 charactersstring
data_source_uriMin. 1 characterMax. 512 charactersstringYes

Required fields apply within their containing object. Unlisted fields are rejected.

Full input schema
{
  "type": "object",
  "required": [
    "data_source_uri",
    "resource"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1
    },
    "cursor": {
      "type": "string",
      "maxLength": 1024,
      "minLength": 1
    },
    "resource": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
      "maxLength": 128,
      "minLength": 1
    },
    "event_types": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 128,
        "minLength": 1
      },
      "maxItems": 20
    },
    "data_source_uri": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1
    }
  },
  "additionalProperties": false
}

Result fields schemadata_source_uriprovideroperationresourceaggregate_idstatusbefore_versionafter_versionidempotency_keyevent_idevent_digestresult_digestprojection_digestprojectioneventsrowsredactionsstop_conditionsprovider_evidence

Operation digest sha256:56e85504a7d01cf502bfe33a15005408143f8723ec52c6557743ebd4050e7a74Implementation sha256:8cec63da8d52309f196c5bb814b1bc7ab21286306300efbfb0a096975c816527

events.readRead one page of a stream's events in ascending order, the latest page when no after_version is given.store.read
store events.readread#
  • LocalReadyThe runtime uses the instance's store.
Runx scope
store.read
Target
{"$argument":"/data_source_uri"}
Credentials
Any of password
Local implementation
Instance store
Inputs
Field and constraintsType / valuesRequired
limitMinimum 1Maximum 500integerNo
resourcePattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$Min. 1 characterMax. 128 charactersstringYes
aggregate_idPattern: ^[A-Za-z0-9][A-Za-z0-9._:@/-]*$Min. 1 characterMax. 192 charactersstringYes
after_versionMinimum 0Maximum 9007199254740991integerNo
data_source_uriMin. 1 characterMax. 512 charactersstringYes

Required fields apply within their containing object. Unlisted fields are rejected.

Full input schema
{
  "type": "object",
  "required": [
    "data_source_uri",
    "resource",
    "aggregate_id"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "maximum": 500,
      "minimum": 1
    },
    "resource": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
      "maxLength": 128,
      "minLength": 1
    },
    "aggregate_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/-]*$",
      "maxLength": 192,
      "minLength": 1
    },
    "after_version": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0
    },
    "data_source_uri": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1
    }
  },
  "additionalProperties": false
}

Result fields schemadata_source_uriprovideroperationresourceaggregate_idstatusbefore_versionafter_versionidempotency_keyevent_idevent_digestresult_digestprojection_digestprojectionlimitnext_after_versionhas_moreeventsrowsredactionsstop_conditionsprovider_evidence

Operation digest sha256:539a1924f702ea81cc1d27e02ac778236b95cb01135ace976925c8492ebdac9aImplementation sha256:8cec63da8d52309f196c5bb814b1bc7ab21286306300efbfb0a096975c816527

events.appendAppend one event to a stream when the stream is at the expected version. The event is keyed by the call's idempotency key, so a repeated call answers as a replay; at another version the answer is a conflict and nothing is appended.store.append
store events.appendwrite#
  • LocalReadyThe runtime uses the instance's store.
Runx scope
store.append
Target
{"$argument":"/data_source_uri"}
Credentials
Any of password
Repeats
enforced: The provider deduplicates by the idempotency key.
Local implementation
Instance store
Inputs
Field and constraintsType / valuesRequired
eventobjectYes
resourcePattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$Min. 1 characterMax. 128 charactersstringYes
observed_atMin. 1 characterMax. 64 charactersstringNo
aggregate_idPattern: ^[A-Za-z0-9][A-Za-z0-9._:@/-]*$Min. 1 characterMax. 192 charactersstringYes
data_source_uriMin. 1 characterMax. 512 charactersstringYes
expected_versionMinimum 0Maximum 9007199254740990integerYes

Required fields apply within their containing object. Unlisted fields are rejected.

Full input schema
{
  "type": "object",
  "required": [
    "data_source_uri",
    "resource",
    "aggregate_id",
    "expected_version",
    "event"
  ],
  "properties": {
    "event": {
      "type": "object"
    },
    "resource": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
      "maxLength": 128,
      "minLength": 1
    },
    "observed_at": {
      "type": "string",
      "maxLength": 64,
      "minLength": 1
    },
    "aggregate_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/-]*$",
      "maxLength": 192,
      "minLength": 1
    },
    "data_source_uri": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1
    },
    "expected_version": {
      "type": "integer",
      "maximum": 9007199254740990,
      "minimum": 0
    }
  },
  "additionalProperties": false
}

Result fields schemadata_source_uriprovideroperationresourceaggregate_idstatusbefore_versionafter_versionidempotency_keyevent_idevent_digestresult_digestprojection_digestprojectioneventsrowsredactionsstop_conditionsprovider_evidence

Operation digest sha256:1e29abb73c92a4b336f0511d5c01a08d6b69489c1d12a66731629e50c47a6960Implementation sha256:8cec63da8d52309f196c5bb814b1bc7ab21286306300efbfb0a096975c816527

projection.readRead a stream's projection, its version and last event, with the digest that chains its events.store.read
store projection.readread#
  • LocalReadyThe runtime uses the instance's store.
Runx scope
store.read
Target
{"$argument":"/data_source_uri"}
Credentials
Any of password
Local implementation
Instance store
Inputs
Field and constraintsType / valuesRequired
resourcePattern: ^[A-Za-z0-9][A-Za-z0-9._:-]*$Min. 1 characterMax. 128 charactersstringYes
aggregate_idPattern: ^[A-Za-z0-9][A-Za-z0-9._:@/-]*$Min. 1 characterMax. 192 charactersstringYes
data_source_uriMin. 1 characterMax. 512 charactersstringYes

Required fields apply within their containing object. Unlisted fields are rejected.

Full input schema
{
  "type": "object",
  "required": [
    "data_source_uri",
    "resource",
    "aggregate_id"
  ],
  "properties": {
    "resource": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
      "maxLength": 128,
      "minLength": 1
    },
    "aggregate_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/-]*$",
      "maxLength": 192,
      "minLength": 1
    },
    "data_source_uri": {
      "type": "string",
      "maxLength": 512,
      "minLength": 1
    }
  },
  "additionalProperties": false
}

Result fields schemadata_source_uriprovideroperationresourceaggregate_idstatusbefore_versionafter_versionidempotency_keyevent_idevent_digestresult_digestprojection_digestprojectioneventsrowsredactionsstop_conditionsprovider_evidence

Operation digest sha256:703cb1378ade1eea8bd8eb70680244b34eb89ff8c9f3ff96334bc81e07fb4290Implementation sha256:8cec63da8d52309f196c5bb814b1bc7ab21286306300efbfb0a096975c816527

Authentication

Commands here are for runx 0.11.1.

Store accepts a stored credential or no account at all.

Stored credential password
A password with one field: password (Store password). Supply it through standard input in the project where the skill runs; Runx stores the profile and selects it for this connector.
runx connector use store --credential password
No provider credential
No provider account or key is required. Runx still applies each operation’s declared scope and approval rules.

Instance parameters

Each instance of this connector pins these values when it is set up.

Parameters
Field and constraintsType / valuesRequired
urlWhere the streams live. sqlite:<path> (relative to the workspace), postgres://user@host:port/db (TLS unless ?sslmode=disable), or redis:// and rediss://. Never a password; bind that as the instance's credential.Pattern: ^(sqlite:.+|(postgres|postgresql|redis|rediss)://([^:@/]+@)?[^@]+)$Min. 1 characterMax. 2048 charactersstringNo

Required fields apply within their containing object. Unlisted fields are rejected.

Authentication methods describe what the provider requires. They do not imply Runx supports every way the provider authenticates, and they do not grant access to your account.

Permissions

Each operation requires every Runx scope it declares. The account or key behind an instance must also reach the target on Store’s side; setting one up adds no Store permissions.

store.append
events.append

A stored credential may do everything its scopes allow. Add --scope to runx connector use --credential to narrow it.

Skills that use Store

All 15 skills