Skip to content

rulvar API reference


rulvar API reference / @rulvar/core / parseScopePath

Function: parseScopePath()

ts
function parseScopePath(path): ScopeSegment[];

Defined in: packages/core/src/journal/scope.ts:70

Parses a scope path against the frozen grammar (M2-T04):

scope-path ::= "" | scope-path "/" segment segment ::= "par:" site ":" branch | "pipe:" stage ":" item | "wf:" name ":" ordinal | "agent:" seq | "plan" ("/" NodeId follows as its own segment) NodeId ::= Crockford ULID (26 chars)

Registered workflow names may contain ':' (the ordinal is the final segment field). Throws on malformed paths.

Parameters

ParameterType
pathstring

Returns

ScopeSegment[]