ui/server/src/blockCatalogue
the Blocks catalogue: every mechanical block (PLAN_FLOWS entry) in plain words, with what it reads and writes, whether it can use a model, its arguments, one concrete example, the settings for this project and how man...
Cockpit server, next. Source: ui/server/src/blockCatalogue.mjs.
Variables#
BLOCK_DOCS#
constBLOCK_DOCS:Readonly<{add.dependency: {example: {args: {name:string;version:string; };title:string; };purpose:string;reads:string;writes:string; };add.env: {example: {args: {name:string;scope:string; };title:string; };purpose:string;reads:string;writes:string; };check.build: {example: {args: { };title:string; };purpose:string;reads:string;writes:any; };check.types: {example: {args: { };title:string; };purpose:string;reads:string;writes:any; };create.controller.bind: {example: {args: {feature:string;name:string; };title:string; };purpose:string;reads:string;writes:string; };create.feature: {example: {args: {name:string; };title:string; };purpose:string;reads:string;writes:string; };create.handler: {example: {args: {feature:string;method:string;name:string;path:string; };title:string; };purpose:string;reads:string;writes:string; };create.layer: {example: {args: {feature:string;layers:string[];name:string; };title:string; };purpose:string;reads:string;writes:string; };create.page.from: {example: {args: {feature:string;from:string;name:string; };title:string; };purpose:string;reads:string;writes:string; };create.proof: {example: {args: {entity:string;feature:string;fields:string;kind:string;name:string;shape:string; };title:string; };purpose:string;reads:string;writes:string; };create.route: {example: {args: {feature:string;name:string;route:string; };title:string; };purpose:string;reads:string;writes:string; };create.service.openapi: {example: {args: {feature:string;name:string;openapi:string; };title:string; };purpose:string;reads:string;writes:string; };create.store: {example: {args: {entity:string;feature:string;fields:string;name:string;shape:string; };title:string; };purpose:string;reads:string;writes:string; };create.unit: {example: {args: {feature:string;layer:string;name:string; };title:string; };purpose:string;reads:string;writes:string; };create.workflow.from: {example: {args: {feature:string;from:string;name:string;stateUnion:boolean; };title:string; };purpose:string;reads:string;writes:string; };guard.route: {example: {args: {access:string;feature:string;name:string;roles:string[]; };title:string; };purpose:string;reads:string;writes:string; };import.plan: {example: {args: {plan: {feature:string;units:object[]; }; };title:string; };purpose:string;reads:string;writes:string; };import.route: {example: {args: {route:string; };title:string; };purpose:string;reads:string;writes:string; };import.unit: {example: {args: {feature:string;from:string;layers:string[];name:string; };title:string; };purpose:string;reads:string;writes:string; };manual.task: {example: {args: {instructions:string; };title:string; };purpose:string;reads:string;writes:string; };pipeline.run: {example:any;purpose:string;reads:string;writes:string; };project.init: {example: {args: {framework:string; };title:string; };purpose:string;reads:string;writes:string; };refactor.move: {example: {args: {feature:string;from:string;name:string;to:string; };title:string; };purpose:string;reads:string;writes:string; };refactor.rename: {example: {args: {feature:string;layer:string;name:string;newName:string; };title:string; };purpose:string;reads:string;writes:string; };research.doctor: {example: {args: { };title:string; };purpose:string;reads:string;writes:any; };research.summarize: {example: {args: {feature:string;format:string; };title:string; };purpose:string;reads:string;writes:any; };research.workflow: {example: {args: {feature:string;format:string; };title:string; };purpose:string;reads:string;writes:any; };review.analyze: {example: {args: {base:string;head:string; };title:string; };purpose:string;reads:string;writes:any; };summarize.list: {example: {args: {kind:string; };title:string; };purpose:string;reads:string;writes:any; };summarize.unit: {example: {args: {detail:string;ref:string; };title:string; };purpose:string;reads:string;writes:any; };summarize.usage: {example: {args: { };title:string; };purpose:string;reads:string;writes:any; };sync: {example: {args: { };title:string; };purpose:string;reads:string;writes:string; };test.proof: {example: {args: {feature:string; };title:string; };purpose:string;reads:string;writes:any; };test.run: {example: {args: {feature:string; };title:string; };purpose:string;reads:string;writes:any; };validate: {example: {args: {format:string; };title:string; };purpose:string;reads:string;writes:any; };wrap.provider: {example: {args: {feature:string;name:string;provider:string; };title:string; };purpose:string;reads:string;writes:string; }; }>
Defined in: ui/server/src/blockCatalogue.mjs:22
Plain words per block. example is a step's title and args (exampleStep adds the executor and the empty
touches a writing step must declare). null example: the Cockpit never offers the block.
Every text is one sentence a person who has never read the code can follow.
Functions#
blockCatalogue()#
blockCatalogue(
state?):any[]
Defined in: ui/server/src/blockCatalogue.mjs:282
The catalogue: one row per block, in registry order.
Parameters#
state?
The project's stored settings and run counts.
blocks?
Record<string, object> = {}
runs?
Record<string, number> = {}
Returns#
any[]
Rows: { id, purpose, reads, writes, writesFiles, modelCalls, engines, scope, offered, notOffered?, args, example, settings, runs }.
exampleStep()#
exampleStep(
flowId,__namedParameters?):object
Defined in: ui/server/src/blockCatalogue.mjs:245
The step a block's example stands for, ready to drop into a plan. Null when the block has no example.
Parameters#
flowId
any
__namedParameters?
id?
string = 's1'
Returns#
object
args
args:
any
executor
executor:
any
flow
flow:
any=flowId
id
id:
string
title
title:
any=doc.example.title
runCounts()#
runCounts(
processes):Record<string,number>
Defined in: ui/server/src/blockCatalogue.mjs:263
How many times each block ran in this project: the steps of this project's process records that finished (done or failed), counted by the flow their plan step names. A step that never started (pending, skipped) is not a run.
Parameters#
processes
object[]
Full process records.
Returns#
Record<string, number>
Flow id to number of runs; flows that never ran are absent.