DaemonInstanceSpec<A, E>Per-tag daemon spec — control surface, live events, plus stamped run success/error on the wire.
export type type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never> = {
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<...>;
readonly lastRunDurationMillis: Schema.optionalKey<...>;
}>, Schema.Never, true, Hyperlink.MethodAnnotations & {
...;
}, Hyperlink.Derive>, {
...;
}>;
start: Hyperlink.Method<...>;
stop: Hyperlink.Method<...>;
wake: Hyperlink.Method<...>;
resetCadence: Hyperlink.Method<...>;
} & {
...;
} & (A extends Schema.Void ? Record<...> : ResultGroupSpec<...>)
Per-tag daemon spec — control surface, live events, plus stamped run success/error on the wire.
DaemonInstanceSpec<
function (type parameter) A in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>A extends import SchemaSchema.Top = typeof import SchemaSchema.const Void: 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?: MakeOptions) => void;
makeOption: (input: void, options?: MakeOptions) => Option_.Option<void>;
makeEffect: (input: void, options?: MakeOptions) => Effect.Effect<void, 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 type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>E extends import SchemaSchema.Top = typeof import SchemaSchema.const Never: 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?: MakeOptions) => never;
makeOption: (input: never, options?: MakeOptions) => Option_.Option<never>;
makeEffect: (input: never, options?: MakeOptions) => Effect.Effect<never, 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,
> = typeof const daemonControlSpec: {
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<...>;
readonly lastRunDurationMillis: Schema.optionalKey<...>;
}>, Schema.Never, true, Hyperlink.MethodAnnotations & {
...;
}, Hyperlink.Derive>, {
...;
}>;
start: Hyperlink.Method<...>;
stop: Hyperlink.Method<...>;
wake: Hyperlink.Method<...>;
resetCadence: Hyperlink.Method<...>;
}
The base daemon control + observation contract — shared by every daemon. Mirrors the
observable/controllable seams the engine supervisor exposes (
DaemonSnapshot
- lifecycle).
A base daemon has no schedule mutation verbs: arm/disarm is done by mutating a schedule, so
those verbs appear only when a daemon
owns an inline schedule
.
daemonControlSpec & {
readonly events: ReturnType<
typeof buildDaemonSpec<A, E>
>["events"]
(property) events: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
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; <…;
}
events: type ReturnType<
T extends (...args: any) => any
> = T extends (...args: any) => infer R ? R : any
Obtain the return type of a function type
ReturnType<typeof const buildDaemonSpec: <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;
} | {
...;
}>, Schema.TaggedStruct<...>, Schema.TaggedStruct<...>]>, Schema.Never, true, Hyperlink.MethodAnnotations & {
...;
}, Hyperlink.Derive>;
... 5 more ...;
resetCadence: Hyperlink.Method<...>;
}
Build a daemon instance spec — control surface, live
events
stream, and a typed
manual
run
RPC. Event element schema matches the durable store union
(
daemonExecutionEventFor
with the tag's optional success / error).
buildDaemonSpec<function (type parameter) A in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>A, function (type parameter) E in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>E>>["events"];
readonly run: Hyperlink.Method<undefined, A, E>(property) run: {
kind: MethodKind;
payload: P;
success: Su;
error: E;
stream: Str;
annotations: Ann;
annotate: <A extends MethodAnnotations>(annotations: A) => Method<P, Su, E, Str, Ann & A, Client>;
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; <…;
}
run: import HyperlinkHyperlink.interface Method<P extends Schema.Struct.Fields | Schema.Top | undefined, Su extends Schema.Top, E extends Schema.Top, Str extends boolean = false, Ann extends Hyperlink.MethodAnnotations = Hyperlink.MethodAnnotations, Client = Hyperlink.Derive>One method of a HyperService contract — built by
effect
/
effectFn
/
Hyperlink.stream
. Carries its kind, schemas
(payload / success / error), whether it's a stream (a push source vs a one-shot
read), and tool annotations. .annotate({...}) returns a copy with merged annotations,
mirroring Effect's schema idiom.
For a streaming method, success is the element schema and error is the stream
error schema — they become an RpcSchema.Stream on the wire, and the service member
surfaces as a Stream rather than an Effect.
Method<undefined, function (type parameter) A in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>A, function (type parameter) E in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>E>;
} & (function (type parameter) A in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>A extends typeof import SchemaSchema.const Void: 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?: MakeOptions) => void;
makeOption: (input: void, options?: MakeOptions) => Option_.Option<void>;
makeEffect: (input: void, options?: MakeOptions) => Effect.Effect<void, 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 ? type Record<K extends keyof any, T> = {
[P in K]: T
}
Construct a type with a set of properties K of type T
Record<string, never> : type ResultGroupSpec<
A extends Schema.Top
> = {
readonly result: ResultField<A>
}
The result field as a
Spec
fragment (what
result
grafts).
ResultGroupSpec<function (type parameter) A in type DaemonInstanceSpec<A extends Schema.Top = Schema.Void, E extends Schema.Top = Schema.Never>A>);