MCPcopy Create free account
hub / github.com/cursor/plugins / loadOrBail

Function loadOrBail

orchestrate/skills/orchestrate/scripts/cli/util.ts:574–588  ·  view source on GitHub ↗
(
  workspace: string,
  opts: { slackChannel?: string } = {}
)

Source from the content-addressed store, hash-verified

572}
573
574export async function loadOrBail(
575 workspace: string,
576 opts: { slackChannel?: string } = {}
577): Promise<AgentManager> {
578 try {
579 return await AgentManager.load(workspace, opts);
580 } catch (err) {
581 if (err instanceof PlanValidationError) {
582 console.error(err.message);
583 process.exit(2);
584 }
585 console.error(errorStackOrMessage(err));
586 process.exit(2);
587 }
588}
589
590export function bail(msg: string): never {
591 console.error(msg);

Callers 2

registerTaskCommandsFunction · 0.90
registerInspectCommandsFunction · 0.90

Calls 2

errorStackOrMessageFunction · 0.85
loadMethod · 0.80

Tested by

no test coverage detected