Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 146 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rivetkit-typescript/packages/rivetkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
],
"scripts": {
"build": "tsup src/mod.ts src/client/mod.ts src/common/log.ts src/common/websocket.ts src/actor/errors.ts src/topologies/coordinate/mod.ts src/topologies/partition/mod.ts src/utils.ts src/driver-helpers/mod.ts src/driver-test-suite/mod.ts src/serve-test-suite/mod.ts src/test/mod.ts src/inspector/mod.ts src/workflow/mod.ts",
"build:schema": "./scripts/compile-bare.ts compile schemas/client-protocol/v1.bare -o dist/schemas/client-protocol/v1.ts && ./scripts/compile-bare.ts compile schemas/client-protocol/v2.bare -o dist/schemas/client-protocol/v2.ts && ./scripts/compile-bare.ts compile schemas/client-protocol/v3.bare -o dist/schemas/client-protocol/v3.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v1.bare -o dist/schemas/file-system-driver/v1.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v2.bare -o dist/schemas/file-system-driver/v2.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v3.bare -o dist/schemas/file-system-driver/v3.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v1.bare -o dist/schemas/actor-persist/v1.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v2.bare -o dist/schemas/actor-persist/v2.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v3.bare -o dist/schemas/actor-persist/v3.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v4.bare -o dist/schemas/actor-persist/v4.ts && ./scripts/compile-bare.ts compile schemas/actor-inspector/v1.bare -o dist/schemas/actor-inspector/v1.ts && ./scripts/compile-bare.ts compile schemas/actor-inspector/v2.bare -o dist/schemas/actor-inspector/v2.ts && ./scripts/compile-bare.ts compile schemas/actor-inspector/v3.bare -o dist/schemas/actor-inspector/v3.ts && ./scripts/compile-bare.ts compile schemas/actor-inspector/v4.bare -o dist/schemas/actor-inspector/v4.ts"
"build:schema": "./scripts/compile-bare.ts compile schemas/client-protocol/v1.bare -o dist/schemas/client-protocol/v1.ts && ./scripts/compile-bare.ts compile schemas/client-protocol/v2.bare -o dist/schemas/client-protocol/v2.ts && ./scripts/compile-bare.ts compile schemas/client-protocol/v3.bare -o dist/schemas/client-protocol/v3.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v1.bare -o dist/schemas/file-system-driver/v1.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v2.bare -o dist/schemas/file-system-driver/v2.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v3.bare -o dist/schemas/file-system-driver/v3.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v1.bare -o dist/schemas/actor-persist/v1.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v2.bare -o dist/schemas/actor-persist/v2.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v3.bare -o dist/schemas/actor-persist/v3.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v4.bare -o dist/schemas/actor-persist/v4.ts && ./scripts/compile-bare.ts compile schemas/persist/v1.bare -o dist/schemas/persist/v1.ts && ./scripts/compile-bare.ts compile schemas/transport/v1.bare -o dist/schemas/transport/v1.ts && ./scripts/compile-bare.ts compile schemas/actor-inspector/v1.bare -o dist/schemas/actor-inspector/v1.ts && ./scripts/compile-bare.ts compile schemas/actor-inspector/v2.bare -o dist/schemas/actor-inspector/v2.ts",
Comment on lines 175 to +176
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build script should be updated to run build:schema first, ensuring the schema files are generated before the main build process. For example: "build": "npm run build:schema && tsup src/mod.ts ..."

Spotted by Graphite Agent (based on CI logs)

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

"check-types": "tsc --noEmit",
"lint": "biome check .",
"lint:fix": "biome check --write .",
Expand Down
115 changes: 57 additions & 58 deletions rivetkit-typescript/packages/rivetkit/schemas/actor-inspector/v2.bare
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MARK: Message To Server

type PatchStateRequest struct {
state: data
state: data
}

type ActionRequest struct {
Expand All @@ -18,15 +18,23 @@ type ConnectionsRequest struct {
id: uint
}

type EventsRequest struct {
type RpcsListRequest struct {
id: uint
}

type ClearEventsRequest struct {
type TraceQueryRequest struct {
id: uint
startMs: uint
endMs: uint
limit: uint
}

type RpcsListRequest struct {
type QueueRequest struct {
id: uint
limit: uint
}

type WorkflowHistoryRequest struct {
id: uint
}

Expand All @@ -35,9 +43,10 @@ type ToServerBody union {
StateRequest |
ConnectionsRequest |
ActionRequest |
EventsRequest |
ClearEventsRequest |
RpcsListRequest
RpcsListRequest |
TraceQueryRequest |
QueueRequest |
WorkflowHistoryRequest
}

type ToServer struct {
Expand All @@ -53,55 +62,18 @@ type Connection struct {
details: data
}

type ActionEvent struct {
name: str
args: data
connId: str
}

type BroadcastEvent struct {
eventName: str
args: data
}

type SubscribeEvent struct {
eventName: str
connId: str
}

type UnSubscribeEvent struct {
eventName: str
connId: str
}

type FiredEvent struct {
eventName: str
args: data
connId: str
}

type EventBody union {
ActionEvent |
BroadcastEvent |
SubscribeEvent |
UnSubscribeEvent |
FiredEvent
}

type Event struct {
id: str
timestamp: uint
body: EventBody
}
# Workflow history is encoded using schemas/transport.
type WorkflowHistory data

type Init struct {
connections: list<Connection>
events: list<Event>
state: optional<State>
isStateEnabled: bool
rpcs: list<str>
isDatabaseEnabled: bool
queueSize: uint
workflowHistory: optional<WorkflowHistory>
isWorkflowEnabled: bool
}

type ConnectionsResponse struct {
Expand All @@ -115,28 +87,52 @@ type StateResponse struct {
isStateEnabled: bool
}

type EventsResponse struct {
type ActionResponse struct {
rid: uint
events: list<Event>
output: data
}

type ActionResponse struct {
type TraceQueryResponse struct {
rid: uint
output: data
payload: data
}

type StateUpdated struct {
state: State
type QueueMessageSummary struct {
id: uint
name: str
createdAtMs: uint
}

type QueueStatus struct {
size: uint
maxSize: uint
messages: list<QueueMessageSummary>
truncated: bool
}

type EventsUpdated struct {
events: list<Event>
type QueueResponse struct {
rid: uint
status: QueueStatus
}

type WorkflowHistoryResponse struct {
rid: uint
history: optional<WorkflowHistory>
isWorkflowEnabled: bool
}

type StateUpdated struct {
state: State
}

type QueueUpdated struct {
queueSize: uint
}

type WorkflowHistoryUpdated struct {
history: WorkflowHistory
}

type RpcsListResponse struct {
rid: uint
rpcs: list<str>
Expand All @@ -145,20 +141,23 @@ type RpcsListResponse struct {
type ConnectionsUpdated struct {
connections: list<Connection>
}

type Error struct {
message: str
}

type ToClientBody union {
StateResponse |
ConnectionsResponse |
EventsResponse |
ActionResponse |
ConnectionsUpdated |
EventsUpdated |
QueueUpdated |
StateUpdated |
WorkflowHistoryUpdated |
RpcsListResponse |
TraceQueryResponse |
QueueResponse |
WorkflowHistoryResponse |
Error |
Init
}
Expand Down
Loading
Loading