// ../core/src/execution/engine/base/types.ts
var ResourceStatusColors = {
  dev: "var(--color-primary)",
  prod: "var(--color-success)"
};

// ../core/src/execution/engine/workflow/logging.ts
function isStepStartedContext(ctx) {
  return ctx.contextType === "step-started" || "stepStatus" in ctx && ctx.stepStatus === "started";
}
function isStepCompletedContext(ctx) {
  return ctx.contextType === "step-completed" || "stepStatus" in ctx && ctx.stepStatus === "completed";
}
function isStepFailedContext(ctx) {
  return ctx.contextType === "step-failed" || "stepStatus" in ctx && ctx.stepStatus === "failed";
}
function isConditionalRouteContext(ctx) {
  return ctx.contextType === "conditional-route" || "target" in ctx && "stepId" in ctx && !("stepStatus" in ctx);
}
function toWorkflowLogMessage(log) {
  if (log.context?.type === "workflow") {
    return {
      level: log.level,
      message: log.message,
      timestamp: log.timestamp,
      context: log.context
    };
  }
  return {
    level: log.level,
    message: log.message,
    timestamp: log.timestamp,
    context: log.context
  };
}
function toWorkflowLogMessages(logs) {
  return logs.map(toWorkflowLogMessage).filter((log) => log !== null);
}

// ../core/src/execution/engine/agent/observability/logging.ts
function isLifecycleEvent(ctx) {
  return "stage" in ctx && ctx.stage !== void 0;
}
function isIterationEvent(ctx) {
  return "eventType" in ctx && ctx.eventType !== void 0;
}
function isToolCallEvent(ctx) {
  return "eventType" in ctx && ctx.eventType === "tool-call";
}

export { ResourceStatusColors, isConditionalRouteContext, isIterationEvent, isLifecycleEvent, isStepCompletedContext, isStepFailedContext, isStepStartedContext, isToolCallEvent, toWorkflowLogMessage, toWorkflowLogMessages };
