Skip to main content

Skilj

@gklijs/skiljv2026.10.14.2· MIT(was none)· 1d agoBEHAVIORSWORKFLOWSREPORTS
01README

Trigger and dry-run commands, read or consume events, acknowledge consume cursors, ingest external events, store direct events and report parked deliveries on a SkilJ (event-sourced, DCB) server over its REST API.

02Behaviors1
@gklijs/skiljv2026.10.14.2skilj.ts

Global Arguments

ArgumentTypeDescription
baseUrlstringBase URL of the SkilJ REST server, e.g. https://skilj.example.com
tokenstringSkilJ access token in '<id>.<secret>' form - store it in a vault
timeoutMs?numberPer-request timeout in milliseconds
maxRetries?numberRetries for transient failures (timeouts, 408/429/502/503/504) on
fn triggerCommand(payload: record)
Trigger the token's command type (POST /v1/commands/trigger). A business rejection is recorded, not thrown
ArgumentTypeDescription
payloadrecordThe command payload, as the command type's schema expects it
fn dryRunCommand(payload: record)
Ask whether the token's command type would accept a payload, storing nothing (POST /v1/commands/dry-run)
ArgumentTypeDescription
payloadrecordThe command payload to decide on without storing anything
fn fetchEvents(after?: string, epoch?: string, correlationId?: string, maxPages?: number)
Read the token's event type (GET /v1/events), following nextCursor up to maxPages
ArgumentTypeDescription
after?stringStart after this cursor (a previous nextCursor, or a bare sequence)
epoch?stringDatabase epoch the 'after' cursor was read in, if not inside it
correlationId?stringOnly return events with this correlation id
maxPages?numberFollow nextCursor for up to this many pages
fn consumeEvents(mode?: enum)
Serve the token's event type from its server-tracked cursor (GET /v1/events/consume); the cursor advances itself, nothing is passed back
ArgumentTypeDescription
mode?enumServer-tracked cursor mode: required on the token's first consume
fn acknowledgeEvents(sequence: number, epoch?: string)
Advance a manual_ack consume cursor (POST /v1/events/consume/ack) up to a served sequence
ArgumentTypeDescription
sequencenumberAdvance a manual_ack cursor up to this served sequence
epoch?stringEpoch from the consume response that served the sequence
fn ingestExternalEvent(payload: record, sourceContent: string, sourceContext?: string, dedupe?: object)
Record an event from an outside system (POST /v1/events/external), deduplicated by Idempotency-Key or watermark
ArgumentTypeDescription
payloadrecordThe external event payload
sourceContentstringThe original message, verbatim, as received from the source
sourceContext?stringWhere the message came from, e.g. a topic or queue name
dedupe?objectWatermark dedupe for an in-order source: partition and its sequence
fn createDirectEvent(payload: record)
Store an event directly, bypassing any command (POST /v1/events/direct)
ArgumentTypeDescription
payloadrecordThe event payload
fn reportParkedDelivery(source: string, kind: enum, identifier: string, error: string, attemptCount: number, firstFailedAt: string, request: record, idempotencyKey?: string)
Report a broker delivery the bridge gave up retrying (POST /v1/parked-deliveries), for a later retryParkedDelivery
ArgumentTypeDescription
sourcestringThe bridge's own name for itself, e.g. 'kafka-inbound'
kindenumWhich original route the delivery was bound for
identifierstringBroker-native message id, e.g. '{topic}:{partition}:{offset}'
errorstringWhy the bridge gave up retrying this delivery
attemptCountnumberHow many delivery attempts the bridge made
firstFailedAtstringISO-8601 timestamp of the first failed attempt
requestrecordThe verbatim original POST body for the delivery, in the shape the
idempotencyKey?stringThe Idempotency-Key header the original POST carried, if any -

Resources

commandResult(infinite)— Outcome of a triggered or dry-run command
events(30d)— A page (or several) of events read with an EventRead token
consumedEvents(30d)— Events served from a server-tracked consume cursor with an EventRead token
ack(infinite)— Record of a manual_ack cursor acknowledgement
eventWrite(infinite)— Result of writing an external or direct event
parkedDelivery(infinite)— A bridge's parked-delivery report stored by SkilJ
03Workflows1
@gklijs/withdraw-and-verify8a03b69f-21ca-4c88-976e-4323dacc30a2

Trigger a withdrawal command, assert decide() accepted it, then read back the stored event. Runnable documentation for @gklijs/skilj: shows the trigger-then-fetch wiring, cursor passing, and the accepted guard.

withdraw-and-verify
1.dry-run${{ inputs.commandModel }}.dryRunCommand— Check decide() would accept the withdrawal without storing anything.
2.assert-dry-run-accepted— Stop when the dry run says decide() would reject.
3.trigger${{ inputs.commandModel }}.triggerCommand— Trigger the withdrawal under the idempotency key.
4.assert-accepted— Stop when decide() rejected the trigger.
5.read-back${{ inputs.eventsModel }}.fetchEvents— Read the event type back to confirm the withdrawal landed.
04Reports1
@gklijs/skilj-reportmethod
skilj_report.ts

Operator summary of a SkilJ method run: outcome, counts, and the data artifact pointer

skiljevent-sourcingsummary
05Previous Versions1
2026.10.14.1
06Stats
A
100 / 100
Downloads
1
Archive size
18.4 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
07Platforms
08Labels