MCPcopy Index your code
hub / github.com/simstudioai/sim / serializeJobMeta

Function serializeJobMeta

apps/sim/lib/copilot/vfs/serializers.ts:858–896  ·  view source on GitHub ↗
(job: {
  id: string
  title: string | null
  prompt: string
  cronExpression: string | null
  timezone: string | null
  status: string
  lifecycle: string
  successCondition: string | null
  maxRuns: number | null
  runCount: number
  nextRunAt: Date | null
  lastRanAt: Date | null
  sourceTaskName: string | null
  sourceChatId: string | null
  createdAt: Date
})

Source from the content-addressed store, hash-verified

856 * Serialize job metadata for VFS jobs/{id}/meta.json
857 */
858export function serializeJobMeta(job: {
859 id: string
860 title: string | null
861 prompt: string
862 cronExpression: string | null
863 timezone: string | null
864 status: string
865 lifecycle: string
866 successCondition: string | null
867 maxRuns: number | null
868 runCount: number
869 nextRunAt: Date | null
870 lastRanAt: Date | null
871 sourceTaskName: string | null
872 sourceChatId: string | null
873 createdAt: Date
874}): string {
875 return JSON.stringify(
876 {
877 id: job.id,
878 title: job.title || undefined,
879 prompt: job.prompt,
880 cronExpression: job.cronExpression || undefined,
881 timezone: job.timezone || 'UTC',
882 status: job.status,
883 lifecycle: job.lifecycle,
884 successCondition: job.successCondition || undefined,
885 maxRuns: job.maxRuns ?? undefined,
886 runCount: job.runCount,
887 nextRunAt: job.nextRunAt?.toISOString(),
888 lastRanAt: job.lastRanAt?.toISOString(),
889 sourceTaskName: job.sourceTaskName || undefined,
890 sourceChatId: job.sourceChatId || undefined,
891 createdAt: job.createdAt.toISOString(),
892 },
893 null,
894 2
895 )
896}
897
898export function serializeTaskSession(task: {
899 id: string

Callers 1

materializeJobsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected