<
A extends Schema.Top = Schema.Void,
E extends Schema.Top = Schema.Never
>(wire?: {
readonly success?: A
readonly error?: E
}): {
events: Hyperlink.Method<
undefined,
Schema.Union<
readonly [
Schema.TaggedStruct<
"Started",
{
readonly key: Schema.String
readonly scheduleKey: Schema.NullOr<Schema.String>
readonly startedAt: Schema.Number
readonly isStartupRun: Schema.Boolean
}
>,
Schema.TaggedStruct<
"Completed",
| {
readonly key: Schema.String
readonly scheduleKey: Schema.NullOr<Schema.String>
readonly startedAt: Schema.Number
readonly completedAt: Schema.Number
readonly durationMs: Schema.Number
readonly isStartupRun: Schema.Boolean
}
| {
success: Schema.optional<Schema.Top>
key: Schema.String
scheduleKey: Schema.NullOr<Schema.String>
startedAt: Schema.Number
completedAt: Schema.Number
durationMs: Schema.Number
isStartupRun: Schema.Boolean
}
>,
Schema.TaggedStruct<
"Failed",
{
error: Schema.Top | Schema.String
key: Schema.String
scheduleKey: Schema.NullOr<Schema.String>
startedAt: Schema.Number
completedAt: Schema.Number
durationMs: Schema.Number
isStartupRun: Schema.Boolean
}
>,
Schema.TaggedStruct<
"Interrupted",
{
readonly key: Schema.String
readonly scheduleKey: Schema.NullOr<Schema.String>
readonly startedAt: Schema.Number
readonly completedAt: Schema.Number
readonly durationMs: Schema.Number
readonly isStartupRun: Schema.Boolean
}
>
]
>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
run:
| Hyperlink.Method<
undefined,
Schema.Void | A,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
| Hyperlink.Method<
undefined,
Schema.Void | A,
E,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
status: Hyperlink.Marked<
Hyperlink.Method<
undefined,
Schema.Struct<{
readonly supervising: Schema.Boolean
readonly armed: Schema.Boolean
readonly activeInstances: Schema.Number
readonly nextTriggerRun: Schema.optionalKey<Schema.DateTimeUtc>
readonly nextScheduleTransition: Schema.optionalKey<Schema.DateTimeUtc>
readonly nextPollCadence: Schema.optionalKey<Schema.Duration>
readonly runsStarted: Schema.Number
readonly runsSucceeded: Schema.Number
readonly runsFailed: Schema.Number
readonly lastRunStartedAt: Schema.optionalKey<Schema.DateTimeUtc>
readonly lastRunDurationMillis: Schema.optionalKey<Schema.Number>
}>,
Schema.Never,
true,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>,
{ readonly _tag: "ref" }
>
start: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
stop: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & {
description: string
destructive: true
},
Hyperlink.Derive
>
wake: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
resetCadence: Hyperlink.Method<
undefined,
Schema.Void,
Schema.Never,
false,
Hyperlink.MethodAnnotations & { description: string },
Hyperlink.Derive
>
}Build a process instance spec — control surface, live events stream, and a typed
manual run RPC. Event element schema matches the durable store union
(processExecutionEventFor with the tag's optional success / error).
export const const buildProcessSpec: <
A extends Schema.Top = Schema.Void,
E extends Schema.Top = Schema.Never
>(wire?: {
readonly success?: A
readonly error?: E
}) => {
events: any
run: any
status: any
start: any
stop: any
wake: any
resetCadence: any
}
Build a process instance spec — control surface, live
events
stream, and a typed
manual
run
RPC. Event element schema matches the durable store union
(
processExecutionEventFor
with the tag's optional success / error).
buildProcessSpec = <
function (type parameter) A in <A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>(wire?: {
readonly success?: A;
readonly error?: E;
}): {
events: any;
run: any;
status: any;
start: any;
stop: any;
wake: any;
resetCadence: any;
}
A extends import SchemaSchema.Top = typeof import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void,
function (type parameter) E in <A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>(wire?: {
readonly success?: A;
readonly error?: E;
}): {
events: any;
run: any;
status: any;
start: any;
stop: any;
wake: any;
resetCadence: any;
}
E extends import SchemaSchema.Top = typeof import SchemaSchema.const Never: Schema.Neverconst Never: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<never, readonly []>) => Schema.Never;
annotateKey: (annotations: Schema.Annotations.Key<never>) => Schema.Never;
check: (checks_0: Check<never>, ...checks: Array<Check<never>>) => Schema.Never;
rebuild: (ast: Never) => Schema.Never;
make: (input: never, options?: Schema.MakeOptions) => never;
makeOption: (input: never, options?: Schema.MakeOptions) => Option.Option<never>;
makeEffect: (input: never, options?: Schema.MakeOptions) => Effect.Effect<never, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Never
.
Schema for the never type. Always fails validation — no value satisfies it.
Never,
>(wire: | {
readonly success?: A
readonly error?: E
}
| undefined
wire?: {
readonly success?: A | undefinedsuccess?: function (type parameter) A in <A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>(wire?: {
readonly success?: A;
readonly error?: E;
}): {
events: any;
run: any;
status: any;
start: any;
stop: any;
wake: any;
resetCadence: any;
}
A;
readonly error?: E | undefinederror?: function (type parameter) E in <A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>(wire?: {
readonly success?: A;
readonly error?: E;
}): {
events: any;
run: any;
status: any;
start: any;
stop: any;
wake: any;
resetCadence: any;
}
E;
}) => {
// Same schema helper as the durable store (`processStoreEventSchema`) so persist == stream on the wire.
const const eventSchema: anyeventSchema = import processStoreEventSchemaprocessStoreEventSchema(wire: | {
readonly success?: A
readonly error?: E
}
| undefined
wire?.success?: A | undefinedsuccess, wire: | {
readonly success?: A
readonly error?: E
}
| undefined
wire?.error?: E | undefinederror);
return {
...const processControlSpec: {
status: any
start: any
stop: any
wake: any
resetCadence: any
}
The base process control + observation contract — shared by every process. Mirrors the
observable/controllable seams the engine supervisor exposes (
ProcessSnapshot
- lifecycle).
A base process has no schedule mutation verbs: arm/disarm is done by mutating a schedule, so
those verbs appear only when a process
owns an inline schedule
.
processControlSpec,
events: anyevents: import HyperlinkHyperlink.stream(const eventSchema: anyeventSchema).annotate({
description: stringdescription:
"Live execution lifecycle (Started / Completed / Failed / Interrupted). Same union as the " +
"durable Process.store journal — persist == stream.",
}),
run: anyrun: (wire: | {
readonly success?: A
readonly error?: E
}
| undefined
wire?.error?: E | undefinederror !== var undefinedundefined
? import HyperlinkHyperlink.effect(wire: {
readonly success?: A
readonly error?: E
}
wire?.success?: A | undefinedsuccess ?? import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void, wire: {
readonly success?: A
readonly error?: E
}
wire.error?: E extends Schema.Top = Schema.Nevererror)
: import HyperlinkHyperlink.effect(wire: | {
readonly success?: A
readonly error?: E
}
| undefined
wire?.success?: A | undefinedsuccess ?? import SchemaSchema.const Void: Schema.Voidconst Void: {
Rebuild: Rebuild;
Iso: Iso;
ast: Ast;
Type: T;
Encoded: E;
DecodingServices: RD;
EncodingServices: RE;
annotate: (annotations: Schema.Annotations.Bottom<void, readonly []>) => Schema.Void;
annotateKey: (annotations: Schema.Annotations.Key<void>) => Schema.Void;
check: (checks_0: Check<void>, ...checks: Array<Check<void>>) => Schema.Void;
rebuild: (ast: Void) => Schema.Void;
make: (input: void, options?: Schema.MakeOptions) => void;
makeOption: (input: void, options?: Schema.MakeOptions) => Option.Option<void>;
makeEffect: (input: void, options?: Schema.MakeOptions) => Effect.Effect<void, Schema.SchemaError, never>;
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
}
Type-level representation of
Void
.
Schema for a TypeScript void return value.
When to use
Use when you need to model the return value of a function, RPC, or endpoint
whose result is intentionally ignored.
Details
Runtime parsing accepts any present value and discards it, producing
undefined. The public decoded and encoded TypeScript representation remains
void, so typed construction, decoding, and encoding APIs are still modeled
as void.
Void)
).annotate({
description: stringdescription:
"Run the process worker effect once, tracked — returns success; failures typed on error.",
}),
};
};