(m: AnyMethod): MethodMetaRead the tool metadata for a Method: its kind, description, destructive
flag, and whether it streamings. Pure annotation — does not touch the wire contract.
introspectionMethod
Source src/Hyperlink.ts:7526 lines
export const const methodMeta: (
m: AnyMethod
) => MethodMeta
Read the tool metadata for a
Method
: its kind, description, destructive
flag, and whether it streamings. Pure annotation — does not touch the wire contract.
methodMeta = (m: AnyMethod(parameter) m: {
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; <…;
}
m: type AnyMethod = Method<
Schema.Struct.Fields | Schema.Top | undefined,
Schema.Top,
Schema.Top,
boolean,
MethodAnnotations,
never
>
Any
Method
, erased — the element type of a
Spec
.
AnyMethod): MethodMeta => ({
MethodMeta.kind: MethodKindQuery (read) vs mutate (mutation).
kind: m: AnyMethod(parameter) m: {
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; <…;
}
m.Method<Struct<Fields extends Struct.Fields>.Fields | Top | undefined, Top, Top, boolean, MethodAnnotations, never>.kind: MethodKindkind,
MethodMeta.description: string | undefinedHelp text, if declared.
description: m: AnyMethod(parameter) m: {
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; <…;
}
m.Method<Struct<Fields extends Struct.Fields>.Fields | Top | undefined, Top, Top, boolean, MethodAnnotations, never>.annotations: MethodAnnotations(property) Method<Struct<Fields extends Struct.Fields>.Fields | Top | undefined, Top, Top, boolean, MethodAnnotations, never>.annotations: {
description: string;
destructive: boolean;
callStyle: "pair";
}
annotations.MethodAnnotations.description?: string | undefinedHelp text — CLI/TUI help, dashboard tooltips.
description,
MethodMeta.destructive: booleanWhether the mutation loses state — only meaningful for mutates.
destructive: m: AnyMethod(parameter) m: {
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; <…;
}
m.Method<Struct<Fields extends Struct.Fields>.Fields | Top | undefined, Top, Top, boolean, MethodAnnotations, never>.annotations: MethodAnnotations(property) Method<Struct<Fields extends Struct.Fields>.Fields | Top | undefined, Top, Top, boolean, MethodAnnotations, never>.annotations: {
description: string;
destructive: boolean;
callStyle: "pair";
}
annotations.MethodAnnotations.destructive?: boolean | undefinedA mutate that loses state (shutdown/clear/drop) → confirm / danger styling.
destructive ?? false,
MethodMeta.streaming: booleanA streaming read (a live "watch" source) rather than a one-shot value.
streaming: m: AnyMethod(parameter) m: {
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; <…;
}
m.Method<Struct<Fields extends Struct.Fields>.Fields | Top | undefined, Top, Top, boolean, MethodAnnotations, never>.stream: booleanA streaming read (Stream member) when true; a one-shot Effect otherwise.
stream,
});