원클릭으로
add-config-option
// When the user asks to add a new option/field/config to service, handler, endpoint, ServiceOptions, HandlerOpts, ObjectOptions, WorkflowOptions, or the discovery schema
// When the user asks to add a new option/field/config to service, handler, endpoint, ServiceOptions, HandlerOpts, ObjectOptions, WorkflowOptions, or the discovery schema
| name | add-config-option |
| description | When the user asks to add a new option/field/config to service, handler, endpoint, ServiceOptions, HandlerOpts, ObjectOptions, WorkflowOptions, or the discovery schema |
| user-invocable | false |
There are two kinds of config options:
ingressPrivate, enableLazyState, timeouts). These need to be in the discovery schema.asTerminalError, serde). These skip the discovery layer entirely.Ask the user which kind if unclear.
packages/libs/restate-sdk/src/types/rpc.tsServiceHandlerOpts<I, O> — add the field with JSDoc. All handler types inherit this.
enableLazyState): add to ObjectHandlerOpts / WorkflowHandlerOpts instead.ServiceOptions — add the field with JSDoc.
ObjectOptions / WorkflowOptions instead.DefaultServiceOptions in endpoint.ts = ServiceOptions & ObjectOptions & WorkflowOptions, so endpoint-level gets it free.HandlerWrapper.from() — add opts?.fieldName to the positional constructor call.
opts !== undefined && "fieldName" in opts ? opts?.fieldName : undefinedHandlerWrapper constructor — add public readonly fieldName?: Type parameter.packages/libs/restate-sdk/src/endpoint/discovery.tsAdd the field to both Service and Handler interfaces. Use wire types (number for millis, boolean for flags).
packages/libs/restate-sdk/src/endpoint/components.tscommonServiceOptions(): fieldName: options?.fieldName,commonHandlerOptions(): fieldName: wrapper.fieldName,millisOrDurationToMillis() + !== undefined guardcommonServiceOptions: "fieldName" in options guardOptions that affect handler execution but not discovery (like asTerminalError, serde) just need to be read where the handler is invoked. Check how existing runtime options are consumed in components.ts handler classes.
Run npx tsc --noEmit from packages/libs/restate-sdk/.
Run the Restate SDK conformance test suite locally against this SDK's Docker image. Use when the user wants to run sdk tests, run conformance tests, verify an implementation, or test against the test suite.
Update the SDK test service implementations to match a new version of the e2e conformance contracts. Use when the user says "update sdk tests", "update test contracts", or gives a specific e2e release tag to update to.
When the user asks to add a new e2e test to the restate-e2e-services package