Skip to content
中文

Read the effective spec

Code Mode: praxis.workforce.effectiveSpec.retrieve

HTTP: GET /workforce/v1/effective_spec

Merges the spec chain of a seat or an actor and returns the one effective configuration: the merged capability blocks, the document of every layer, where each merged value came from, and anything only the merged result shows to be wrong. Give exactly one of actor (every seat the actor holds) or position_id (one seat, held or vacant, a preview before hiring); holder_kind defaults from the seat’s holder. Read-only; nothing is changed. Errors: 400 INVALID_PARAMS when neither or both of actor and position_id are given, the actor address is malformed, holder_kind is neither agent nor human, or a query parameter is unknown; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent; 404 POSITION_NOT_FOUND. Example: GET /workforce/v1/effective_spec?actor=agent:agent_123.

Signature

praxis.workforce.effectiveSpec.retrieve(args?:{query?:{actor?:string;position_id?:string;holder_kind?:"agent"|"human"}}):Promise<{/** Actor address the result is for (human:usr_... */ actor:string|null;/** The holder kind the merge was made for, given or derived from the seat's holder. */ holder_kind:"agent"|"human";/** Every seat the result covers; the primary seat, if any, comes first. */ seats:Array<{/** Position id (pos_...) of this seat. */ position_id:string;/** Assignment id (asg_...) holding the seat; null while the seat is vacant. */ assignment_id:string|null;/** Whether this is the actor's primary seat, whose values win a clash. */ primary:boolean;/** The spec layers merged for this seat, least specific first. */ layers:Array<{kind:"organization"|"department"|"level"|"job"|"position"|"assignment";/** The layer subject's own id (org_..., dept_..., lvl_..., jpr_..., pos_... */ id:string;/** Revision of that layer's spec at the time it was merged. */ revision:number}>}>;/** The document of every layer, each layer once; duplicates of the same layer are dropped. */ documents:Array<{/** The layer the document came from, as kind:id such as job:jpr_123. */ from:string;/** Revision of that layer's spec the document was read at. */ revision:number;/** The document text itself, inferred from memory rather than merged into the capability blocks. */ text:string}>;/** The merged provision: a map from block name to the value the chain resolved to, in the shape of a written spec.provision with remove left out. */ provision:{[key:string]:unknown};/** Where each merged value came from, keyed by the path inside the spec (such as provision.agent.model or provision.repositories[github:org/repo]). */ origins:{[key:string]:string};/** Blocks this holder kind does not take and that were skipped without error, such as agent-only blocks for a human holder. */ skipped:Array<string>;/** Problems that only the merged result shows, such as too many skills after merging; empty when the merge is clean. */ violations:Array<string>}>;

Parameters

NameInTypeRequiredDescription
actorquerystringnoActor address whose every current seat is merged (agent:agent_… or human:usr_…); give this or position_id, not both.
position_idquerystringnoOne seat to merge, held or vacant (pos_…); give this or actor, not both.
holder_kindquery“agent” | “human”noWhich holder kind to merge for; omit to derive it from the seat’s holder.

Responses

StatusContent typesDescription
200application/jsonThe merged effective spec of the seat or actor.
400application/problem+jsonINVALID_PARAMS; neither or both of actor and position_id were given, the actor address is malformed, holder_kind is neither agent nor human, or a query parameter is unknown. Give exactly one of actor or position_id.
401Missing or invalid credential; provide a valid organization API key or sign in to the Console.
403application/problem+jsonPERMISSION_DENIED; a run or computer token, or a session token that names no agent, is refused. Call with an organization API key, a Console session, or the agent’s own session token.
404application/problem+jsonPOSITION_NOT_FOUND; position_id is not a position of your organization. List positions and copy an id.