Skip to content

CircuitsShapeHandle

Defined in: packages/server/src/circuits/wire.ts:47

The engine’s response to a shape CREATE (POST /shapes → ShapeResp).

subscription and leaseSeconds are present on a create and absent on a bare GET /shapes/{id} lookup, which belongs to no subscriber. This client only ever creates, so both are required here and the client refuses a create answer that omits either — see createShape.

leaseSeconds: number

Defined in: packages/server/src/circuits/wire.ts:68

How long this subscription may go unrenewed before the engine releases it (CIRCUITS_SHAPE_IDLE_SECS, default 1800). 0 means leases never lapse, because that setting also disables dormancy.

Reported rather than guessed: the renewal cadence is the deployment’s to set, and a control plane that renews on a schedule the engine does not accept is a control plane whose live sessions lapse (see CircuitsLeaseConfigError).


shapeId: string

Defined in: packages/server/src/circuits/wire.ts:48


optional state?: "active" | "deactivating" | "dormant" | "reactivating"

Defined in: packages/server/src/circuits/wire.ts:70

Retention lifecycle; absent on a freshly created shape, which is always active.


streamPath: string

Defined in: packages/server/src/circuits/wire.ts:51

Stream path on the durable-streams server, e.g. shape/s1.


streamUrl: string

Defined in: packages/server/src/circuits/wire.ts:53

Absolute URL of that stream, as the engine resolves its durable-streams base.


subscription: string

Defined in: packages/server/src/circuits/wire.ts:58

The subscription this create was recorded under — echoed back, so a caller that named its own id can confirm it and a caller that named none learns the one the engine minted.


table: string

Defined in: packages/server/src/circuits/wire.ts:49