Dominevo
ReferenceHTTP API

repl

The repl router: 2 hand-written core methods, with tier, input and output.

A core router of the hub (not a capability), source server/backend/src/api/core/repl.router.ts. Its methods are called at /trpc/repl.<method>. A core method checks only the tier: a scoped token that is signed in reaches every protected method here, unless the method itself refuses it. See How to call and Authorization.

Inputs and outputs are the validation schemas as written in the source.

MethodKindTier
executemutationadmin
completionsqueryadmin

repl.execute

  • Kind: mutation — POST /trpc/repl.execute
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/repl.router.ts:27
  • Try it: open /system/api-explorer?method=repl.execute on your hub

Input

z.object({ code: z.string().max(10000), scope: ReplScopeSchema })

Output

ReplResultSchema = z.object({ output: z.string(), error: z.string().optional(), duration: z.number().optional() })

repl.completions

  • Kind: query — GET /trpc/repl.completions
  • Tier: admin — an administrator only
  • Source: server/backend/src/api/core/repl.router.ts:32
  • Try it: open /system/api-explorer?method=repl.completions on your hub

Input

z.object({ partial: z.string(), scope: ReplScopeSchema })

Output

z.array(z.string()).readonly()