Skilj
@gklijs/skiljv2026.10.14.2
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.
02Behaviors
@gklijs/skiljv2026.10.14.2skilj.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| baseUrl | string | Base URL of the SkilJ REST server, e.g. https://skilj.example.com |
| token | string | SkilJ access token in '<id>.<secret>' form - store it in a vault |
| timeoutMs? | number | Per-request timeout in milliseconds |
| maxRetries? | number | Retries 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
| Argument | Type | Description |
|---|---|---|
| payload | record | The 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)
| Argument | Type | Description |
|---|---|---|
| payload | record | The 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
| Argument | Type | Description |
|---|---|---|
| after? | string | Start after this cursor (a previous nextCursor, or a bare sequence) |
| epoch? | string | Database epoch the 'after' cursor was read in, if not inside it |
| correlationId? | string | Only return events with this correlation id |
| maxPages? | number | Follow 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
| Argument | Type | Description |
|---|---|---|
| mode? | enum | Server-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
| Argument | Type | Description |
|---|---|---|
| sequence | number | Advance a manual_ack cursor up to this served sequence |
| epoch? | string | Epoch 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
| Argument | Type | Description |
|---|---|---|
| payload | record | The external event payload |
| sourceContent | string | The original message, verbatim, as received from the source |
| sourceContext? | string | Where the message came from, e.g. a topic or queue name |
| dedupe? | object | Watermark 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)
| Argument | Type | Description |
|---|---|---|
| payload | record | The 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
| Argument | Type | Description |
|---|---|---|
| source | string | The bridge's own name for itself, e.g. 'kafka-inbound' |
| kind | enum | Which original route the delivery was bound for |
| identifier | string | Broker-native message id, e.g. '{topic}:{partition}:{offset}' |
| error | string | Why the bridge gave up retrying this delivery |
| attemptCount | number | How many delivery attempts the bridge made |
| firstFailedAt | string | ISO-8601 timestamp of the first failed attempt |
| request | record | The verbatim original POST body for the delivery, in the shape the |
| idempotencyKey? | string | The 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
03Workflows
@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.
04Reports
@gklijs/skilj-reportmethod
skilj_report.ts
Operator summary of a SkilJ method run: outcome, counts, and the data artifact pointer
skiljevent-sourcingsummary
05Previous Versions
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
Repository
https://github.com/gklijs/skilj-swamp07Platforms
08Labels