@shipfox/client-workflows 22.0.1 → 22.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/preview.tsx +2 -2
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +31 -0
- package/dist/components/job-detail/agent-config-failure-callout.d.ts.map +1 -1
- package/dist/components/job-detail/agent-config-failure-callout.js +15 -0
- package/dist/components/job-detail/agent-config-failure-callout.js.map +1 -1
- package/dist/components/job-detail/job-empty-states.d.ts.map +1 -1
- package/dist/components/job-detail/job-empty-states.js +8 -0
- package/dist/components/job-detail/job-empty-states.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-content.js +9 -15
- package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.js +36 -39
- package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.js +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.js +9 -13
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
- package/dist/core/entities/step.d.ts +2 -0
- package/dist/core/entities/step.d.ts.map +1 -1
- package/dist/core/entities/step.js.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.js +6 -0
- package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/components/job-detail/agent-config-failure-callout.stories.tsx +29 -0
- package/src/components/job-detail/agent-config-failure-callout.tsx +18 -0
- package/src/components/job-detail/job-empty-states.test.ts +21 -0
- package/src/components/job-detail/job-empty-states.tsx +10 -0
- package/src/components/workflow-run-list/workflow-run-list-content.tsx +4 -9
- package/src/components/workflow-run-list/workflow-run-list-states.tsx +36 -39
- package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +5 -0
- package/src/components/workflow-run-list/workflow-run-list-view.tsx +1 -1
- package/src/components/workflow-run-list/workflow-run-row.tsx +7 -10
- package/src/core/entities/step.ts +2 -0
- package/src/hooks/api/workflow-run-mapper.ts +4 -0
- package/tsconfig.build.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {Panel} from '@shipfox/react-ui/panel';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {\n useWorkflowRunDurationAccessibleLabel,\n WorkflowRunDurationLabel,\n} from '#components/workflow-run-duration-label.js';\nimport {\n formatWorkflowRunNumberLabel,\n WorkflowRunNumberLabel,\n} from '#components/workflow-run-number-label.js';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {\n type WorkflowRunListItem,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n} from '#core/workflow-run.js';\nimport {withoutWorkflowRunSelectionSearch} from '#core/workflow-run-url-state.js';\nimport {JOB_STATUS_STRIP_WIDTH, JobStatusStrip, jobStatusSummary} from './job-status-strip.js';\n\nexport function WorkflowRunRowList({\n runs,\n workspaceSlug,\n projectSlug,\n}: {\n runs: WorkflowRunListItem[];\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n // A container, not the viewport, drives the row's breakpoints. What a row can afford is its\n // own width; keying off the viewport would keep the job strip hidden on a wide screen or\n // crush it on a narrow one.\n <Panel className=\"@container\">\n <ul className=\"divide-y divide-border-neutral-base\">\n {runs.map((run) => (\n <li key={run.id}>\n <WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n </li>\n ))}\n </ul>\n </Panel>\n );\n}\n\n/**\n * One run at full width.\n *\n * A single 44px line once the list is at least 976px wide, reflowing to two lines below that:\n * the identity and the numerics keep their places on line one, and the provenance metadata\n * drops beneath. The numeric columns are fixed-width so duration and time form real columns\n * down the list rather than tracking each row's name length.\n *\n * The 976px threshold keeps identity and provenance on one line; below it, provenance drops\n * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns\n * readable together; below it, the strip is hidden so the numeric columns remain aligned.\n */\nexport function WorkflowRunRow({\n run,\n workspaceSlug,\n projectSlug,\n}: {\n run: WorkflowRunListItem;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n const duration = run.runAttempt.displayDuration;\n const hasStarted = run.jobs.hasStartedJobExecution;\n const durationLabel = useWorkflowRunDurationAccessibleLabel(duration, hasStarted);\n const status = run.runAttempt.status;\n const statusLabel = getWorkflowStatusVisual(status).label;\n const runNumberLabel = formatWorkflowRunNumberLabel(run);\n const branch = workflowRunBranchLabel(run);\n const commit = workflowRunCommitLabel(run);\n const actor = workflowRunActor(run);\n\n const body = (\n <>\n <WorkflowStatusIcon status={status} size={14} className=\"shrink-0\" />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-tight @min-[976px]:flex-row @min-[976px]:items-center @min-[976px]:gap-cluster\">\n <span className=\"flex min-w-0 items-center gap-inline @min-[976px]:flex-1\">\n <Code variant=\"label\" bold className=\"truncate text-foreground-neutral-base\">\n {run.name}\n </Code>\n {run.number !== null ? <WorkflowRunNumberLabel run={run} /> : null}\n </span>\n\n <span className=\"flex min-w-0 flex-wrap items-center gap-inline text-foreground-neutral-subtle @min-[976px]:flex-nowrap @min-[976px]:shrink-0\">\n {run.triggerDisplayLabel ? <TriggerLabel run={run} /> : null}\n {branch ? <BranchLabel branch={branch} isPullRequest={branch.startsWith('#')} /> : null}\n {commit ? <CommitLabel commit={commit} /> : null}\n {actor ? <ActorLabel actor={actor} /> : null}\n </span>\n </div>\n\n <span className=\"flex shrink-0 items-center gap-cluster\">\n {/* Reserve the API preview's full width so the overflow count cannot paint over the\n duration, and keep it even when a run has no jobs planned yet so the numerics stay in\n line down the list instead of stepping in and out. The max-content width expands if\n the payload ever exceeds the current API preview bound. */}\n <span\n className=\"hidden w-max shrink-0 @min-[1200px]:flex\"\n style={{minWidth: JOB_STATUS_STRIP_WIDTH}}\n >\n <JobStatusStrip jobs={run.jobs} />\n </span>\n <span className=\"flex w-64 justify-end\">\n <WorkflowRunDurationLabel duration={duration} hasStarted={hasStarted} />\n </span>\n <Code\n variant=\"label\"\n className=\"w-64 shrink-0 text-right tabular-nums text-foreground-neutral-muted\"\n >\n <RelativeTime value={run.createdAt} />\n </Code>\n </span>\n </>\n );\n\n // Rows run edge to edge inside the list's scroll container, which would clip the standard\n // outset focus ring, so this one is inset per the design system's focus-ring rule.\n const rowClassName =\n 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-neutral-hover focus-visible:shadow-focus-inset focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';\n\n // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row\n // replaces them on the next poll, so they render non-interactively instead of as a link\n // that would navigate to a workflow run id the detail route rejects.\n if (run.isTemporary || !workspaceSlug || !projectSlug) {\n return <div className={rowClassName}>{body}</div>;\n }\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId: run.id}}\n search={\n ((previous: Record<string, unknown>) =>\n withoutWorkflowRunSelectionSearch(previous)) as never\n }\n // An aria-label is the link's whole accessible name, so anything inside the row that\n // carries its own label (the status glyph, the job strip) goes unspoken unless it is\n // curated in here. The job breakdown is the reason this list is worth its width, so it\n // belongs in what a tabbing user hears, not only in browse mode.\n aria-label={[\n run.name,\n runNumberLabel,\n statusLabel,\n durationLabel,\n run.triggerLabel,\n branch ? `branch ${branch}` : undefined,\n actor ? `by ${actor}` : undefined,\n run.jobs.total > 0 ? jobStatusSummary(run.jobs) : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ')}\n className={rowClassName}\n >\n {body}\n </Link>\n );\n}\n\nfunction TriggerLabel({run}: {run: WorkflowRunListItem}) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex min-w-0 max-w-[140px] items-center gap-tight outline-none\">\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0 text-foreground-neutral-muted\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {run.triggerLabel}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction BranchLabel({branch, isPullRequest}: {branch: string; isPullRequest: boolean}) {\n return (\n <MetadataChip\n icon={isPullRequest ? 'gitPullRequestLine' : 'gitBranchLine'}\n title={isPullRequest ? `Pull request ${branch}` : `Branch ${branch}`}\n className=\"max-w-[180px]\"\n >\n {branch}\n </MetadataChip>\n );\n}\n\nfunction CommitLabel({commit}: {commit: string}) {\n return (\n <MetadataChip icon=\"gitCommitLine\" title={`Commit ${commit}`}>\n {commit}\n </MetadataChip>\n );\n}\n\nfunction ActorLabel({actor}: {actor: string}) {\n return (\n <MetadataChip\n icon=\"userLine\"\n title={`Triggered by ${actor}`}\n // Dropped once the row is two lines, where the provenance line has to stay readable on\n // a phone.\n className=\"hidden max-w-[120px] @min-[976px]:flex\"\n >\n {actor}\n </MetadataChip>\n );\n}\n\n/**\n * A ref, SHA, or handle: monospace because it is content a user copies or pattern-matches,\n * with the icon carrying the kind so the value itself never needs a written label.\n */\nfunction MetadataChip({\n icon,\n title,\n className,\n children,\n}: {\n icon: IconName;\n title: string;\n className?: string | undefined;\n children: string;\n}) {\n return (\n <span className={cn('flex min-w-0 shrink-0 items-center gap-tight', className)} title={title}>\n <Icon name={icon} className=\"size-12 shrink-0 text-foreground-neutral-muted\" aria-hidden />\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {children}\n </Code>\n </span>\n );\n}\n"],"names":["TriggerSourceIcon","Icon","Panel","RelativeTime","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","Link","useWorkflowRunDurationAccessibleLabel","WorkflowRunDurationLabel","formatWorkflowRunNumberLabel","WorkflowRunNumberLabel","getWorkflowStatusVisual","WorkflowStatusIcon","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","withoutWorkflowRunSelectionSearch","JOB_STATUS_STRIP_WIDTH","JobStatusStrip","jobStatusSummary","WorkflowRunRowList","runs","workspaceSlug","projectSlug","className","ul","map","run","li","WorkflowRunRow","id","duration","runAttempt","displayDuration","hasStarted","jobs","hasStartedJobExecution","durationLabel","status","statusLabel","label","runNumberLabel","branch","commit","actor","body","size","div","span","variant","bold","name","number","triggerDisplayLabel","TriggerLabel","BranchLabel","isPullRequest","startsWith","CommitLabel","ActorLabel","style","minWidth","value","createdAt","rowClassName","isTemporary","to","params","workflowRunId","search","previous","aria-label","triggerLabel","undefined","total","filter","part","Boolean","join","asChild","provider","triggerProvider","source","triggerSource","aria-hidden","as","MetadataChip","icon","title","children"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB;AAC3D,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cA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O,EAAE7C,QAAQ;kBACzDA;;AAGP;AAEA,SAASgB,WAAW,EAACf,KAAK,EAAkB;IAC1C,qBACE,KAAC0C;QACCC,MAAK;QACLC,OAAO,CAAC,aAAa,EAAE5C,OAAO;QAC9B,uFAAuF;QACvF,WAAW;QACXpB,WAAU;kBAEToB;;AAGP;AAEA;;;CAGC,GACD,SAAS0C,aAAa,EACpBC,IAAI,EACJC,KAAK,EACLhE,SAAS,EACTiE,QAAQ,EAMT;IACC,qBACE,MAACzC;QAAKxB,WAAWnB,GAAG,gDAAgDmB;QAAYgE,OAAOA;;0BACrF,KAAC3F;gBAAKsD,MAAMoC;gBAAM/D,WAAU;gBAAiD4D,aAAW;;0BACxF,KAACjF;gBAAKkF,IAAG;gBAAOpC,SAAQ;gBAAQzB,WAAU;0BACvCiE;;;;AAIT"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {\n useWorkflowRunDurationAccessibleLabel,\n WorkflowRunDurationLabel,\n} from '#components/workflow-run-duration-label.js';\nimport {\n formatWorkflowRunNumberLabel,\n WorkflowRunNumberLabel,\n} from '#components/workflow-run-number-label.js';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {\n type WorkflowRunListItem,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n} from '#core/workflow-run.js';\nimport {withoutWorkflowRunSelectionSearch} from '#core/workflow-run-url-state.js';\nimport {JOB_STATUS_STRIP_WIDTH, JobStatusStrip, jobStatusSummary} from './job-status-strip.js';\n\nexport function WorkflowRunRowList({\n runs,\n workspaceSlug,\n projectSlug,\n}: {\n runs: WorkflowRunListItem[];\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n // A container, not the viewport, drives the row's breakpoints. What a row can afford is its\n // own width; keying off the viewport would keep the job strip hidden on a wide screen or\n // crush it on a narrow one.\n <ul className=\"@container divide-y divide-border-neutral-base\">\n {runs.map((run) => (\n <li key={run.id}>\n <WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n </li>\n ))}\n </ul>\n );\n}\n\n/**\n * One run at full width.\n *\n * A single 44px line once the list is at least 976px wide, reflowing to two lines below that:\n * the identity and the numerics keep their places on line one, and the provenance metadata\n * drops beneath. The numeric columns are fixed-width so duration and time form real columns\n * down the list rather than tracking each row's name length.\n *\n * The 976px threshold keeps identity and provenance on one line; below it, provenance drops\n * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns\n * readable together; below it, the strip is hidden so the numeric columns remain aligned.\n */\nexport function WorkflowRunRow({\n run,\n workspaceSlug,\n projectSlug,\n}: {\n run: WorkflowRunListItem;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n const duration = run.runAttempt.displayDuration;\n const hasStarted = run.jobs.hasStartedJobExecution;\n const durationLabel = useWorkflowRunDurationAccessibleLabel(duration, hasStarted);\n const status = run.runAttempt.status;\n const statusLabel = getWorkflowStatusVisual(status).label;\n const runNumberLabel = formatWorkflowRunNumberLabel(run);\n const branch = workflowRunBranchLabel(run);\n const commit = workflowRunCommitLabel(run);\n const actor = workflowRunActor(run);\n\n const body = (\n <>\n <WorkflowStatusIcon status={status} size={14} className=\"shrink-0\" />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-tight @min-[976px]:flex-row @min-[976px]:items-center @min-[976px]:gap-cluster\">\n <span className=\"flex min-w-0 items-center gap-inline @min-[976px]:flex-1\">\n <Code variant=\"label\" bold className=\"truncate text-foreground-neutral-base\">\n {run.name}\n </Code>\n {run.number !== null ? <WorkflowRunNumberLabel run={run} /> : null}\n </span>\n\n <span className=\"flex min-w-0 flex-wrap items-center gap-inline text-foreground-neutral-subtle @min-[976px]:flex-nowrap @min-[976px]:shrink-0\">\n {run.triggerDisplayLabel ? <TriggerLabel run={run} /> : null}\n {branch ? <BranchLabel branch={branch} isPullRequest={branch.startsWith('#')} /> : null}\n {commit ? <CommitLabel commit={commit} /> : null}\n {actor ? <ActorLabel actor={actor} /> : null}\n </span>\n </div>\n\n <span className=\"flex shrink-0 items-center gap-cluster\">\n {/* Reserve the API preview's full width so the overflow count cannot paint over the\n duration, and keep it even when a run has no jobs planned yet so the numerics stay in\n line down the list instead of stepping in and out. The max-content width expands if\n the payload ever exceeds the current API preview bound. */}\n <span\n className=\"hidden w-max shrink-0 @min-[1200px]:flex\"\n style={{minWidth: JOB_STATUS_STRIP_WIDTH}}\n >\n <JobStatusStrip jobs={run.jobs} />\n </span>\n <span className=\"flex w-64 justify-end\">\n <WorkflowRunDurationLabel duration={duration} hasStarted={hasStarted} />\n </span>\n <Code\n variant=\"label\"\n className=\"w-64 shrink-0 text-right tabular-nums text-foreground-neutral-muted\"\n >\n <RelativeTime value={run.createdAt} />\n </Code>\n </span>\n </>\n );\n\n // Rows run edge to edge inside the list's scroll container, which would clip the standard\n // outset focus ring, so this one is inset per the design system's focus-ring rule.\n const rowClassName =\n 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-neutral-hover focus-visible:shadow-focus-inset focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';\n\n // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row\n // replaces them on the next poll, so they render non-interactively instead of as a link\n // that would navigate to a workflow run id the detail route rejects.\n if (run.isTemporary || !workspaceSlug || !projectSlug) {\n return <div className={rowClassName}>{body}</div>;\n }\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId: run.id}}\n search={\n ((previous: Record<string, unknown>) =>\n withoutWorkflowRunSelectionSearch(previous)) as never\n }\n // An aria-label is the link's whole accessible name, so anything inside the row that\n // carries its own label (the status glyph, the job strip) goes unspoken unless it is\n // curated in here. The job breakdown is the reason this list is worth its width, so it\n // belongs in what a tabbing user hears, not only in browse mode.\n aria-label={[\n run.name,\n runNumberLabel,\n statusLabel,\n durationLabel,\n run.triggerLabel,\n branch ? `branch ${branch}` : undefined,\n actor ? `by ${actor}` : undefined,\n run.jobs.total > 0 ? jobStatusSummary(run.jobs) : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ')}\n className={rowClassName}\n >\n {body}\n </Link>\n );\n}\n\nfunction TriggerLabel({run}: {run: WorkflowRunListItem}) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex min-w-0 max-w-[140px] items-center gap-tight outline-none\">\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0 text-foreground-neutral-muted\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {run.triggerLabel}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction BranchLabel({branch, isPullRequest}: {branch: string; isPullRequest: boolean}) {\n return (\n <MetadataChip\n icon={isPullRequest ? 'gitPullRequestLine' : 'gitBranchLine'}\n title={isPullRequest ? `Pull request ${branch}` : `Branch ${branch}`}\n className=\"max-w-[180px]\"\n >\n {branch}\n </MetadataChip>\n );\n}\n\nfunction CommitLabel({commit}: {commit: string}) {\n return (\n <MetadataChip icon=\"gitCommitLine\" title={`Commit ${commit}`}>\n {commit}\n </MetadataChip>\n );\n}\n\nfunction ActorLabel({actor}: {actor: string}) {\n return (\n <MetadataChip\n icon=\"userLine\"\n title={`Triggered by ${actor}`}\n // Dropped once the row is two lines, where the provenance line has to stay readable on\n // a phone.\n className=\"hidden max-w-[120px] @min-[976px]:flex\"\n >\n {actor}\n </MetadataChip>\n );\n}\n\n/**\n * A ref, SHA, or handle: monospace because it is content a user copies or pattern-matches,\n * with the icon carrying the kind so the value itself never needs a written label.\n */\nfunction MetadataChip({\n icon,\n title,\n className,\n children,\n}: {\n icon: IconName;\n title: string;\n className?: string | undefined;\n children: string;\n}) {\n return (\n <span className={cn('flex min-w-0 shrink-0 items-center gap-tight', className)} title={title}>\n <Icon name={icon} className=\"size-12 shrink-0 text-foreground-neutral-muted\" aria-hidden />\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {children}\n </Code>\n </span>\n );\n}\n"],"names":["TriggerSourceIcon","Icon","RelativeTime","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","Link","useWorkflowRunDurationAccessibleLabel","WorkflowRunDurationLabel","formatWorkflowRunNumberLabel","WorkflowRunNumberLabel","getWorkflowStatusVisual","WorkflowStatusIcon","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","withoutWorkflowRunSelectionSearch","JOB_STATUS_STRIP_WIDTH","JobStatusStrip","jobStatusSummary","WorkflowRunRowList","runs","workspaceSlug","projectSlug","ul","className","map","run","li","WorkflowRunRow","id","duration","runAttempt","displayDuration","hasStarted","jobs","hasStartedJobExecution","durationLabel","status","statusLabel","label","runNumberLabel","branch","commit","actor","body","size","div","span","variant","bold","name","number","triggerDisplayLabel","TriggerLabel","BranchLabel","isPullRequest","startsWith","CommitLabel","ActorLabel","style","minWidth","value","createdAt","rowClassName","isTemporary","to","params","workflowRunId","search","previous","aria-label","triggerLabel","undefined","total","filter","part","Boolean","join","asChild","provider","triggerProvider","source","triggerSource","aria-hidden","as","MetadataChip","icon","title","children"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB;A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C2C;QAAaC,MAAK;QAAgBC,OAAO,CAAC,OAAO,EAAE7C,QAAQ;kBACzDA;;AAGP;AAEA,SAASgB,WAAW,EAACf,KAAK,EAAkB;IAC1C,qBACE,KAAC0C;QACCC,MAAK;QACLC,OAAO,CAAC,aAAa,EAAE5C,OAAO;QAC9B,uFAAuF;QACvF,WAAW;QACXnB,WAAU;kBAETmB;;AAGP;AAEA;;;CAGC,GACD,SAAS0C,aAAa,EACpBC,IAAI,EACJC,KAAK,EACL/D,SAAS,EACTgE,QAAQ,EAMT;IACC,qBACE,MAACzC;QAAKvB,WAAWpB,GAAG,gDAAgDoB;QAAY+D,OAAOA;;0BACrF,KAAC1F;gBAAKqD,MAAMoC;gBAAM9D,WAAU;gBAAiD2D,aAAW;;0BACxF,KAACjF;gBAAKkF,IAAG;gBAAOpC,SAAQ;gBAAQxB,WAAU;0BACvCgE;;;;AAIT"}
|
|
@@ -10,6 +10,8 @@ export interface StepSourceLocation {
|
|
|
10
10
|
}
|
|
11
11
|
export interface StepError {
|
|
12
12
|
message: string;
|
|
13
|
+
code?: string | undefined;
|
|
14
|
+
managedProviderId?: string | undefined;
|
|
13
15
|
exitCode: number | null;
|
|
14
16
|
signal: string | undefined;
|
|
15
17
|
reason: StepErrorReason | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../../src/core/entities/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,oBAAoB,EAAE,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAEzE,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,sBAAsB,GACtB,sBAAsB,GACtB,uBAAuB,GACvB,+BAA+B,GAC/B,iBAAiB,GACjB,uBAAuB,GACvB,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,sBAAsB,GACtB,yBAAyB,GACzB,2BAA2B,CAAC;AAChC,MAAM,MAAM,gBAAgB,GACxB,qBAAqB,GACrB,yBAAyB,G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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/entities/step.ts"],"sourcesContent":["import type {EvaluationTraceEntry, StepAttempt} from './step-attempt.js';\n\nexport type StepErrorReason =\n | 'checkout_failed'\n | 'checkout_auth_failed'\n | 'checkout_unavailable'\n | 'checkout_path_invalid'\n | 'checkout_destination_occupied'\n | 'git_unavailable'\n | 'workspace_prep_failed'\n | 'setup_aborted'\n | 'config_unresolvable'\n | 'output_invalid'\n | 'agent_config_invalid'\n | 'agent_invocation_failed'\n | 'agent_harness_unavailable';\nexport type AgentConfigIssue =\n | 'step_config_invalid'\n | 'provider_not_configured'\n | 'provider_unsupported'\n | 'model_unavailable'\n | 'credentials_invalid';\nexport type StepErrorCategory = 'setup' | 'user';\nexport const STEP_ERROR_REASONS = new Set<StepErrorReason>([\n 'checkout_failed',\n 'checkout_auth_failed',\n 'checkout_unavailable',\n 'checkout_path_invalid',\n 'checkout_destination_occupied',\n 'git_unavailable',\n 'workspace_prep_failed',\n 'setup_aborted',\n 'config_unresolvable',\n 'output_invalid',\n 'agent_config_invalid',\n 'agent_invocation_failed',\n 'agent_harness_unavailable',\n]);\nexport const AGENT_CONFIG_ISSUES = new Set<AgentConfigIssue>([\n 'step_config_invalid',\n 'provider_not_configured',\n 'provider_unsupported',\n 'model_unavailable',\n 'credentials_invalid',\n]);\n\nexport interface StepSourceLocation {\n startLine: number;\n endLine: number;\n}\n\nexport interface StepError {\n message: string;\n exitCode: number | null;\n signal: string | undefined;\n reason: StepErrorReason | undefined;\n agentConfigIssue: AgentConfigIssue | undefined;\n category: StepErrorCategory | undefined;\n}\n\nexport interface AgentStepConfig {\n provider: string | null;\n model: string | null;\n thinking: string | null;\n}\n\nexport interface Step {\n id: string;\n jobExecutionId: string;\n key: string | null;\n name: string;\n sourceLocation: StepSourceLocation | null;\n status: string;\n statusReason: string | null;\n type: string;\n config: Record<string, unknown>;\n evaluationTrace: EvaluationTraceEntry[] | null;\n agentConfig: AgentStepConfig | null;\n error: StepError | null;\n position: number;\n currentAttempt: number;\n createdAt: string;\n updatedAt: string;\n attempts: StepAttempt[];\n}\n\nexport function resolveStepAttempt(\n step: Step,\n attemptId: string | undefined,\n): StepAttempt | undefined {\n const attemptById = attemptId\n ? step.attempts.find((attempt) => attempt.id === attemptId)\n : undefined;\n if (attemptById) return attemptById;\n\n const currentAttempt = step.attempts.find((attempt) => attempt.attempt === step.currentAttempt);\n if (currentAttempt) return currentAttempt;\n\n return step.attempts.reduce<StepAttempt | undefined>((latest, attempt) => {\n if (!latest) return attempt;\n return compareStepAttempts(attempt, latest) > 0 ? attempt : latest;\n }, undefined);\n}\n\nexport function compareStepAttempts(left: StepAttempt, right: StepAttempt): number {\n return (\n left.attempt - right.attempt ||\n left.executionOrder - right.executionOrder ||\n left.id.localeCompare(right.id)\n );\n}\n"],"names":["STEP_ERROR_REASONS","Set","AGENT_CONFIG_ISSUES","resolveStepAttempt","step","attemptId","attemptById","attempts","find","attempt","id","undefined","currentAttempt","reduce","latest","compareStepAttempts","left","right","executionOrder","localeCompare"],"mappings":"AAuBA,OAAO,MAAMA,qBAAqB,IAAIC,IAAqB;IACzD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AACH,OAAO,MAAMC,sBAAsB,IAAID,IAAsB;IAC3D;IACA;IACA;IACA;IACA;CACD,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../src/core/entities/step.ts"],"sourcesContent":["import type {EvaluationTraceEntry, StepAttempt} from './step-attempt.js';\n\nexport type StepErrorReason =\n | 'checkout_failed'\n | 'checkout_auth_failed'\n | 'checkout_unavailable'\n | 'checkout_path_invalid'\n | 'checkout_destination_occupied'\n | 'git_unavailable'\n | 'workspace_prep_failed'\n | 'setup_aborted'\n | 'config_unresolvable'\n | 'output_invalid'\n | 'agent_config_invalid'\n | 'agent_invocation_failed'\n | 'agent_harness_unavailable';\nexport type AgentConfigIssue =\n | 'step_config_invalid'\n | 'provider_not_configured'\n | 'provider_unsupported'\n | 'model_unavailable'\n | 'credentials_invalid';\nexport type StepErrorCategory = 'setup' | 'user';\nexport const STEP_ERROR_REASONS = new Set<StepErrorReason>([\n 'checkout_failed',\n 'checkout_auth_failed',\n 'checkout_unavailable',\n 'checkout_path_invalid',\n 'checkout_destination_occupied',\n 'git_unavailable',\n 'workspace_prep_failed',\n 'setup_aborted',\n 'config_unresolvable',\n 'output_invalid',\n 'agent_config_invalid',\n 'agent_invocation_failed',\n 'agent_harness_unavailable',\n]);\nexport const AGENT_CONFIG_ISSUES = new Set<AgentConfigIssue>([\n 'step_config_invalid',\n 'provider_not_configured',\n 'provider_unsupported',\n 'model_unavailable',\n 'credentials_invalid',\n]);\n\nexport interface StepSourceLocation {\n startLine: number;\n endLine: number;\n}\n\nexport interface StepError {\n message: string;\n code?: string | undefined;\n managedProviderId?: string | undefined;\n exitCode: number | null;\n signal: string | undefined;\n reason: StepErrorReason | undefined;\n agentConfigIssue: AgentConfigIssue | undefined;\n category: StepErrorCategory | undefined;\n}\n\nexport interface AgentStepConfig {\n provider: string | null;\n model: string | null;\n thinking: string | null;\n}\n\nexport interface Step {\n id: string;\n jobExecutionId: string;\n key: string | null;\n name: string;\n sourceLocation: StepSourceLocation | null;\n status: string;\n statusReason: string | null;\n type: string;\n config: Record<string, unknown>;\n evaluationTrace: EvaluationTraceEntry[] | null;\n agentConfig: AgentStepConfig | null;\n error: StepError | null;\n position: number;\n currentAttempt: number;\n createdAt: string;\n updatedAt: string;\n attempts: StepAttempt[];\n}\n\nexport function resolveStepAttempt(\n step: Step,\n attemptId: string | undefined,\n): StepAttempt | undefined {\n const attemptById = attemptId\n ? step.attempts.find((attempt) => attempt.id === attemptId)\n : undefined;\n if (attemptById) return attemptById;\n\n const currentAttempt = step.attempts.find((attempt) => attempt.attempt === step.currentAttempt);\n if (currentAttempt) return currentAttempt;\n\n return step.attempts.reduce<StepAttempt | undefined>((latest, attempt) => {\n if (!latest) return attempt;\n return compareStepAttempts(attempt, latest) > 0 ? attempt : latest;\n }, undefined);\n}\n\nexport function compareStepAttempts(left: StepAttempt, right: StepAttempt): number {\n return (\n left.attempt - right.attempt ||\n left.executionOrder - right.executionOrder ||\n left.id.localeCompare(right.id)\n );\n}\n"],"names":["STEP_ERROR_REASONS","Set","AGENT_CONFIG_ISSUES","resolveStepAttempt","step","attemptId","attemptById","attempts","find","attempt","id","undefined","currentAttempt","reduce","latest","compareStepAttempts","left","right","executionOrder","localeCompare"],"mappings":"AAuBA,OAAO,MAAMA,qBAAqB,IAAIC,IAAqB;IACzD;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,EAAE;AACH,OAAO,MAAMC,sBAAsB,IAAID,IAAsB;IAC3D;IACA;IACA;IACA;IACA;CACD,EAAE;AA4CH,OAAO,SAASE,mBACdC,IAAU,EACVC,SAA6B;IAE7B,MAAMC,cAAcD,YAChBD,KAAKG,QAAQ,CAACC,IAAI,CAAC,CAACC,UAAYA,QAAQC,EAAE,KAAKL,aAC/CM;IACJ,IAAIL,aAAa,OAAOA;IAExB,MAAMM,iBAAiBR,KAAKG,QAAQ,CAACC,IAAI,CAAC,CAACC,UAAYA,QAAQA,OAAO,KAAKL,KAAKQ,cAAc;IAC9F,IAAIA,gBAAgB,OAAOA;IAE3B,OAAOR,KAAKG,QAAQ,CAACM,MAAM,CAA0B,CAACC,QAAQL;QAC5D,IAAI,CAACK,QAAQ,OAAOL;QACpB,OAAOM,oBAAoBN,SAASK,UAAU,IAAIL,UAAUK;IAC9D,GAAGH;AACL;AAEA,OAAO,SAASI,oBAAoBC,IAAiB,EAAEC,KAAkB;IACvE,OACED,KAAKP,OAAO,GAAGQ,MAAMR,OAAO,IAC5BO,KAAKE,cAAc,GAAGD,MAAMC,cAAc,IAC1CF,KAAKN,EAAE,CAACS,aAAa,CAACF,MAAMP,EAAE;AAElC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run-mapper.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,4BAA4B,EAC5B,cAAc,EAGd,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,oBAAoB,EACzB,GAAG,EACH,YAAY,EAEZ,KAAK,IAAI,EACT,WAAW,EAGX,KAAK,WAAW,EAChB,kBAAkB,EAElB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAGvB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,aAAa,CAAC,GAAG,EAAE,sBAAsB,GAAG,WAAW,CA8BtE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,qBAAqB,GAAG,kBAAkB,CAWnF;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,sBAAsB,GAAG,iBAAiB,CAclF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,sBAAsB,GAAG,mBAAmB,CA8BtF;AAQD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,0BAA0B,GAAG,mBAAmB,CAM1F;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,4BAA4B,GAAG,iBAAiB,CAQxF;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,GAAG,GAAG,CAuBvD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,gCAAgC,GAAG,YAAY,CAqBlF;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"workflow-run-mapper.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,4BAA4B,EAC5B,cAAc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|
171
171
|
agentConfig: toAgentStepConfig(dto),
|
|
172
172
|
error: dto.error ? {
|
|
173
173
|
message: dto.error.message,
|
|
174
|
+
...dto.error.code === undefined ? {} : {
|
|
175
|
+
code: dto.error.code
|
|
176
|
+
},
|
|
177
|
+
...dto.error.managed_provider_id === undefined ? {} : {
|
|
178
|
+
managedProviderId: dto.error.managed_provider_id
|
|
179
|
+
},
|
|
174
180
|
exitCode: dto.error.exit_code ?? null,
|
|
175
181
|
signal: dto.error.signal,
|
|
176
182
|
reason: dto.error.reason,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"sourcesContent":["import type {\n EvaluationTraceDto,\n JobListeningDto,\n StepAttemptDetailResponseDto,\n StepAttemptDto,\n StepGateResultDto,\n WorkflowExecutionEventDto,\n WorkflowRunAttemptDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunJobDetailDto,\n WorkflowRunJobExecutionDetailDto,\n WorkflowRunListItemDto,\n WorkflowRunListResponseDto,\n WorkflowRunResponseDto,\n WorkflowRunStepDetailDto,\n} from '@shipfox/api-workflows-dto';\nimport {\n type EvaluationTraceEntry,\n Job,\n JobExecution,\n type JobListening,\n type Step,\n StepAttempt,\n type StepGateResult,\n type WorkflowExecutionEvent,\n type WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n type WorkflowRunRecord,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\n\nexport function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun {\n return {\n id: dto.id,\n projectId: dto.project_id,\n definitionId: dto.definition_id,\n number: dto.number,\n name: dto.name,\n workflowName: dto.workflow_name,\n currentAttempt: dto.current_attempt,\n triggerProvider: dto.trigger_provider,\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n triggerDisplayLabel: workflowRunTriggerDisplayLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerLabel: workflowRunTriggerLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerPayload: dto.trigger_payload,\n triggerReference: dto.trigger_reference,\n inputs: dto.inputs ?? null,\n sourceSnapshot: dto.source_snapshot\n ? {content: dto.source_snapshot.content, format: dto.source_snapshot.format}\n : null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n isTemporary: dto.id.startsWith('temp-'),\n };\n}\n\nexport function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt {\n return new WorkflowRunAttempt({\n id: dto.id,\n workflowRunId: dto.workflow_run_id,\n attempt: dto.attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n rerunMode: dto.rerun_mode,\n });\n}\n\nexport function toWorkflowRunRecord(dto: WorkflowRunResponseDto): WorkflowRunRecord {\n return {\n ...toWorkflowRun(dto),\n status: dto.status,\n latestAttempt: dto.latest_attempt,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: dto.id,\n attempt: dto.current_attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n }),\n };\n}\n\nexport function toWorkflowRunListItem(dto: WorkflowRunListItemDto): WorkflowRunListItem {\n const hasDisplayStatusCounts = dto.job_display_status_counts !== undefined;\n const statusCounts = (dto.job_display_status_counts ?? dto.job_status_counts).map(\n ({status, count}) => ({status, count}),\n );\n return {\n ...toWorkflowRunRecord(dto),\n jobs: {\n preview: dto.jobs.map((job) => ({\n id: job.id,\n key: job.key,\n name: job.name,\n status: job.status,\n mode: job.mode ?? 'one_shot',\n listenerStatus: job.listener_status ?? 'inactive',\n // The optional display-count field is the rollout capability signal. Pre-display API\n // responses only carry raw verdict counts, so mirror their non-terminal verdict into\n // execution evidence to keep each legacy glyph aligned with those fallback counts.\n executionStatus: hasDisplayStatusCounts\n ? (job.execution_status ?? null)\n : legacyExecutionStatus(job.status),\n position: job.position,\n })),\n statusCounts,\n hasStartedJobExecution: dto.has_started_job_execution ?? true,\n // Derived rather than sent: the counts already cover every job, and a separate total\n // would be a second source of truth that could disagree with them.\n total: statusCounts.reduce((sum, entry) => sum + entry.count, 0),\n },\n };\n}\n\nfunction legacyExecutionStatus(\n status: WorkflowRunListItemDto['jobs'][number]['status'],\n): 'pending' | 'running' | null {\n return status === 'pending' || status === 'running' ? status : null;\n}\n\nexport function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage {\n return {\n runs: dto.runs.map(toWorkflowRunListItem),\n nextCursor: dto.next_cursor,\n filteredTotalCount: dto.filtered_total_count,\n };\n}\n\nexport function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail {\n return {\n ...toWorkflowRun(dto),\n latestAttempt: dto.latest_attempt,\n runAttempt: toWorkflowRunAttempt(dto.run_attempt),\n jobs: dto.jobs.map(toJob),\n hasStartedJobExecution: dto.has_started_job_execution ?? true,\n };\n}\n\nexport function toJob(dto: WorkflowRunJobDetailDto): Job {\n return new Job({\n id: dto.id,\n runAttemptId: dto.run_attempt_id,\n key: dto.key,\n name: dto.name,\n mode: dto.mode,\n status: dto.status,\n statusReason: dto.status_reason,\n carriedOver: dto.carried_over,\n outputs: dto.outputs ?? null,\n success: dto.success ?? null,\n runner: dto.runner ?? null,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n listening: dto.listening ? toJobListening(dto.listening) : null,\n listenerStatus: dto.listener_status,\n resolutionReason: dto.resolution_reason,\n dependencies: dto.dependencies,\n position: dto.position,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n jobExecutions: dto.job_executions.map(toJobExecution),\n });\n}\n\nexport function toJobExecution(dto: WorkflowRunJobExecutionDetailDto): JobExecution {\n return new JobExecution({\n id: dto.id,\n jobId: dto.job_id,\n sequence: dto.sequence,\n name: dto.name,\n status: dto.status,\n statusReason: dto.status_reason,\n statusReasonMessage: dto.status_reason_message ?? null,\n runner: dto.runner ?? null,\n outputs: dto.outputs ?? null,\n triggerEvents: (dto.trigger_events ?? []).map(toWorkflowExecutionEvent),\n queuedAt: dto.queued_at ?? null,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n timedOutAt: dto.timed_out_at ?? null,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n steps: dto.steps.map(toStep),\n });\n}\n\nexport function toStep(dto: WorkflowRunStepDetailDto): Step {\n return {\n id: dto.id,\n jobExecutionId: dto.job_execution_id,\n key: dto.key,\n name: dto.name,\n sourceLocation: dto.source_location\n ? {startLine: dto.source_location.start_line, endLine: dto.source_location.end_line}\n : null,\n status: dto.status,\n statusReason: dto.status_reason,\n type: dto.type,\n config: dto.config,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n agentConfig: toAgentStepConfig(dto),\n error: dto.error\n ? {\n message: dto.error.message,\n exitCode: dto.error.exit_code ?? null,\n signal: dto.error.signal,\n reason: dto.error.reason,\n agentConfigIssue: dto.error.agent_config_issue,\n category: dto.error.category,\n }\n : null,\n position: dto.position,\n currentAttempt: dto.current_attempt,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n attempts: dto.attempts.map((attempt) => toStepAttempt(attempt, dto.job_execution_id)),\n };\n}\n\nexport function toStepAttempt(dto: StepAttemptDto, jobExecutionId: string): StepAttempt {\n return new StepAttempt({\n id: dto.id,\n stepId: dto.step_id,\n jobExecutionId,\n attempt: dto.attempt,\n executionOrder: dto.execution_order,\n status: dto.status,\n exitCode: dto.exit_code ?? null,\n output: dto.output ?? null,\n outputs: dto.outputs ?? dto.output ?? null,\n response: dto.response ?? null,\n error: dto.error ?? null,\n gateResult: toStepGateResult(dto.gate_result),\n restartFeedback: dto.restart_feedback ?? null,\n startedAt: dto.started_at,\n finishedAt: dto.finished_at ?? null,\n });\n}\n\nexport function toStepAttemptDetail(dto: StepAttemptDetailResponseDto) {\n return {\n stepId: dto.step_id,\n attempt: dto.attempt,\n authoredConfig: dto.authored_config,\n config: dto.config,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n };\n}\n\nfunction toJobListening(dto: JobListeningDto): JobListening {\n return {\n on: dto.on,\n until: dto.until,\n timeoutMs: dto.timeout_ms,\n maxExecutions: dto.max_executions,\n batch: dto.batch\n ? {\n debounceMs: dto.batch.debounce_ms,\n maxSize: dto.batch.max_size,\n maxWaitMs: dto.batch.max_wait_ms,\n }\n : null,\n onResolve: dto.on_resolve,\n executionTimeoutMs: dto.execution_timeout_ms,\n name: dto.name,\n };\n}\n\nfunction toWorkflowExecutionEvent(dto: WorkflowExecutionEventDto): WorkflowExecutionEvent {\n return {\n source: dto.source,\n event: dto.event,\n deliveryId: dto.delivery_id,\n receivedAt: dto.received_at,\n project: dto.project,\n repository: dto.repository,\n ref: dto.ref,\n commit: dto.commit,\n data: dto.data,\n };\n}\n\nfunction toStepGateResult(dto: StepGateResultDto): StepGateResult {\n if (dto === null || dto.kind === 'none' || dto.kind === 'not_evaluated') return dto;\n if (dto.kind === 'passed' || dto.kind === 'failed') return {...dto, exitCode: dto.exit_code};\n if (dto.kind === 'uncheckable' || dto.kind === 'evaluation_error')\n return {...dto, exitCode: dto.exit_code};\n return dto;\n}\n\nfunction toEvaluationTrace(trace: EvaluationTraceDto | null): EvaluationTraceEntry[] | null {\n return (\n trace?.map((entry) =>\n 'dropped' in entry\n ? entry\n : {\n expression: entry.expression,\n roots: entry.roots,\n fillTarget: entry.fill_target,\n evaluatedAt: entry.evaluated_at,\n field: entry.field,\n ...(entry.value === undefined ? {} : {value: entry.value}),\n ...(entry.truncated === undefined ? {} : {truncated: entry.truncated}),\n ...(entry.expr_truncated === undefined ? {} : {exprTruncated: entry.expr_truncated}),\n ...(entry.reference === undefined ? {} : {reference: entry.reference}),\n ...(entry.degraded === undefined ? {} : {degraded: entry.degraded}),\n ...(entry.env_key === undefined ? {} : {envKey: entry.env_key}),\n },\n ) ?? null\n );\n}\n\nfunction toAgentStepConfig(dto: WorkflowRunStepDetailDto): Step['agentConfig'] {\n if (dto.type !== 'agent') return null;\n return {\n provider: stringConfigValue(dto.config.provider),\n model: stringConfigValue(dto.config.model),\n thinking: stringConfigValue(dto.config.thinking),\n };\n}\n\nfunction stringConfigValue(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n"],"names":["Job","JobExecution","StepAttempt","WorkflowRunAttempt","WorkflowRunAttemptSummary","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","toWorkflowRun","dto","id","projectId","project_id","definitionId","definition_id","number","name","workflowName","workflow_name","currentAttempt","current_attempt","triggerProvider","trigger_provider","triggerSource","trigger_source","triggerEvent","trigger_event","triggerDisplayLabel","triggerLabel","triggerPayload","trigger_payload","triggerReference","trigger_reference","inputs","sourceSnapshot","source_snapshot","content","format","createdAt","created_at","updatedAt","updated_at","isTemporary","startsWith","toWorkflowRunAttempt","workflowRunId","workflow_run_id","attempt","status","startedAt","started_at","finishedAt","finished_at","rerunMode","rerun_mode","toWorkflowRunRecord","latestAttempt","latest_attempt","runAttempt","toWorkflowRunListItem","hasDisplayStatusCounts","job_display_status_counts","undefined","statusCounts","job_status_counts","map","count","jobs","preview","job","key","mode","listenerStatus","listener_status","executionStatus","execution_status","legacyExecutionStatus","position","hasStartedJobExecution","has_started_job_execution","total","reduce","sum","entry","toWorkflowRunListPage","runs","nextCursor","next_cursor","filteredTotalCount","filtered_total_count","toWorkflowRunDetail","run_attempt","toJob","runAttemptId","run_attempt_id","statusReason","status_reason","carriedOver","carried_over","outputs","success","runner","evaluationTrace","toEvaluationTrace","evaluation_trace","listening","toJobListening","resolutionReason","resolution_reason","dependencies","jobExecutions","job_executions","toJobExecution","jobId","job_id","sequence","statusReasonMessage","status_reason_message","triggerEvents","trigger_events","toWorkflowExecutionEvent","queuedAt","queued_at","timedOutAt","timed_out_at","steps","toStep","jobExecutionId","job_execution_id","sourceLocation","source_location","startLine","start_line","endLine","end_line","type","config","agentConfig","toAgentStepConfig","error","message","exitCode","exit_code","signal","reason","agentConfigIssue","agent_config_issue","category","attempts","toStepAttempt","stepId","step_id","executionOrder","execution_order","output","response","gateResult","toStepGateResult","gate_result","restartFeedback","restart_feedback","toStepAttemptDetail","authoredConfig","authored_config","on","until","timeoutMs","timeout_ms","maxExecutions","max_executions","batch","debounceMs","debounce_ms","maxSize","max_size","maxWaitMs","max_wait_ms","onResolve","on_resolve","executionTimeoutMs","execution_timeout_ms","source","event","deliveryId","delivery_id","receivedAt","received_at","project","repository","ref","commit","data","kind","trace","expression","roots","fillTarget","fill_target","evaluatedAt","evaluated_at","field","value","truncated","expr_truncated","exprTruncated","reference","degraded","env_key","envKey","provider","stringConfigValue","model","thinking","trim"],"mappings":"AAgBA,SAEEA,GAAG,EACHC,YAAY,EAGZC,WAAW,EAIXC,kBAAkB,EAClBC,yBAAyB,EAKzBC,8BAA8B,EAC9BC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,SAASC,cAAcC,GAA2B;IACvD,OAAO;QACLC,IAAID,IAAIC,EAAE;QACVC,WAAWF,IAAIG,UAAU;QACzBC,cAAcJ,IAAIK,aAAa;QAC/BC,QAAQN,IAAIM,MAAM;QAClBC,MAAMP,IAAIO,IAAI;QACdC,cAAcR,IAAIS,aAAa;QAC/BC,gBAAgBV,IAAIW,eAAe;QACnCC,iBAAiBZ,IAAIa,gBAAgB;QACrCC,eAAed,IAAIe,cAAc;QACjCC,cAAchB,IAAIiB,aAAa;QAC/BC,qBAAqBrB,+BAA+B;YAClDiB,eAAed,IAAIe,cAAc;YACjCC,cAAchB,IAAIiB,aAAa;QACjC;QACAE,cAAcrB,wBAAwB;YACpCgB,eAAed,IAAIe,cAAc;YACjCC,cAAchB,IAAIiB,aAAa;QACjC;QACAG,gBAAgBpB,IAAIqB,eAAe;QACnCC,kBAAkBtB,I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AA,CAAC;YACzD,GAAItH,MAAMuH,SAAS,KAAK5I,YAAY,CAAC,IAAI;gBAAC4I,WAAWvH,MAAMuH,SAAS;YAAA,CAAC;YACrE,GAAIvH,MAAMwH,cAAc,KAAK7I,YAAY,CAAC,IAAI;gBAAC8I,eAAezH,MAAMwH,cAAc;YAAA,CAAC;YACnF,GAAIxH,MAAM0H,SAAS,KAAK/I,YAAY,CAAC,IAAI;gBAAC+I,WAAW1H,MAAM0H,SAAS;YAAA,CAAC;YACrE,GAAI1H,MAAM2H,QAAQ,KAAKhJ,YAAY,CAAC,IAAI;gBAACgJ,UAAU3H,MAAM2H,QAAQ;YAAA,CAAC;YAClE,GAAI3H,MAAM4H,OAAO,KAAKjJ,YAAY,CAAC,IAAI;gBAACkJ,QAAQ7H,MAAM4H,OAAO;YAAA,CAAC;QAChE,MACD;AAET;AAEA,SAASrE,kBAAkBjI,GAA6B;IACtD,IAAIA,IAAI8H,IAAI,KAAK,SAAS,OAAO;IACjC,OAAO;QACL0E,UAAUC,kBAAkBzM,IAAI+H,MAAM,CAACyE,QAAQ;QAC/CE,OAAOD,kBAAkBzM,IAAI+H,MAAM,CAAC2E,KAAK;QACzCC,UAAUF,kBAAkBzM,IAAI+H,MAAM,CAAC4E,QAAQ;IACjD;AACF;AAEA,SAASF,kBAAkBT,KAAc;IACvC,OAAO,OAAOA,UAAU,YAAYA,MAAMY,IAAI,KAAKZ,MAAMY,IAAI,KAAK;AACpE"}
|
|
1
|
+
{"version":3,"sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"sourcesContent":["import type {\n EvaluationTraceDto,\n JobListeningDto,\n StepAttemptDetailResponseDto,\n StepAttemptDto,\n StepGateResultDto,\n WorkflowExecutionEventDto,\n WorkflowRunAttemptDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunJobDetailDto,\n WorkflowRunJobExecutionDetailDto,\n WorkflowRunListItemDto,\n WorkflowRunListResponseDto,\n WorkflowRunResponseDto,\n WorkflowRunStepDetailDto,\n} from '@shipfox/api-workflows-dto';\nimport {\n type EvaluationTraceEntry,\n Job,\n JobExecution,\n type JobListening,\n type Step,\n StepAttempt,\n type StepGateResult,\n type WorkflowExecutionEvent,\n type WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n type WorkflowRunRecord,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\n\nexport function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun {\n return {\n id: dto.id,\n projectId: dto.project_id,\n definitionId: dto.definition_id,\n number: dto.number,\n name: dto.name,\n workflowName: dto.workflow_name,\n currentAttempt: dto.current_attempt,\n triggerProvider: dto.trigger_provider,\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n triggerDisplayLabel: workflowRunTriggerDisplayLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerLabel: workflowRunTriggerLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerPayload: dto.trigger_payload,\n triggerReference: dto.trigger_reference,\n inputs: dto.inputs ?? null,\n sourceSnapshot: dto.source_snapshot\n ? {content: dto.source_snapshot.content, format: dto.source_snapshot.format}\n : null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n isTemporary: dto.id.startsWith('temp-'),\n };\n}\n\nexport function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt {\n return new WorkflowRunAttempt({\n id: dto.id,\n workflowRunId: dto.workflow_run_id,\n attempt: dto.attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n rerunMode: dto.rerun_mode,\n });\n}\n\nexport function toWorkflowRunRecord(dto: WorkflowRunResponseDto): WorkflowRunRecord {\n return {\n ...toWorkflowRun(dto),\n status: dto.status,\n latestAttempt: dto.latest_attempt,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: dto.id,\n attempt: dto.current_attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n }),\n };\n}\n\nexport function toWorkflowRunListItem(dto: WorkflowRunListItemDto): WorkflowRunListItem {\n const hasDisplayStatusCounts = dto.job_display_status_counts !== undefined;\n const statusCounts = (dto.job_display_status_counts ?? dto.job_status_counts).map(\n ({status, count}) => ({status, count}),\n );\n return {\n ...toWorkflowRunRecord(dto),\n jobs: {\n preview: dto.jobs.map((job) => ({\n id: job.id,\n key: job.key,\n name: job.name,\n status: job.status,\n mode: job.mode ?? 'one_shot',\n listenerStatus: job.listener_status ?? 'inactive',\n // The optional display-count field is the rollout capability signal. Pre-display API\n // responses only carry raw verdict counts, so mirror their non-terminal verdict into\n // execution evidence to keep each legacy glyph aligned with those fallback counts.\n executionStatus: hasDisplayStatusCounts\n ? (job.execution_status ?? null)\n : legacyExecutionStatus(job.status),\n position: job.position,\n })),\n statusCounts,\n hasStartedJobExecution: dto.has_started_job_execution ?? true,\n // Derived rather than sent: the counts already cover every job, and a separate total\n // would be a second source of truth that could disagree with them.\n total: statusCounts.reduce((sum, entry) => sum + entry.count, 0),\n },\n };\n}\n\nfunction legacyExecutionStatus(\n status: WorkflowRunListItemDto['jobs'][number]['status'],\n): 'pending' | 'running' | null {\n return status === 'pending' || status === 'running' ? status : null;\n}\n\nexport function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage {\n return {\n runs: dto.runs.map(toWorkflowRunListItem),\n nextCursor: dto.next_cursor,\n filteredTotalCount: dto.filtered_total_count,\n };\n}\n\nexport function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail {\n return {\n ...toWorkflowRun(dto),\n latestAttempt: dto.latest_attempt,\n runAttempt: toWorkflowRunAttempt(dto.run_attempt),\n jobs: dto.jobs.map(toJob),\n hasStartedJobExecution: dto.has_started_job_execution ?? true,\n };\n}\n\nexport function toJob(dto: WorkflowRunJobDetailDto): Job {\n return new Job({\n id: dto.id,\n runAttemptId: dto.run_attempt_id,\n key: dto.key,\n name: dto.name,\n mode: dto.mode,\n status: dto.status,\n statusReason: dto.status_reason,\n carriedOver: dto.carried_over,\n outputs: dto.outputs ?? null,\n success: dto.success ?? null,\n runner: dto.runner ?? null,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n listening: dto.listening ? toJobListening(dto.listening) : null,\n listenerStatus: dto.listener_status,\n resolutionReason: dto.resolution_reason,\n dependencies: dto.dependencies,\n position: dto.position,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n jobExecutions: dto.job_executions.map(toJobExecution),\n });\n}\n\nexport function toJobExecution(dto: WorkflowRunJobExecutionDetailDto): JobExecution {\n return new JobExecution({\n id: dto.id,\n jobId: dto.job_id,\n sequence: dto.sequence,\n name: dto.name,\n status: dto.status,\n statusReason: dto.status_reason,\n statusReasonMessage: dto.status_reason_message ?? null,\n runner: dto.runner ?? null,\n outputs: dto.outputs ?? null,\n triggerEvents: (dto.trigger_events ?? []).map(toWorkflowExecutionEvent),\n queuedAt: dto.queued_at ?? null,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n timedOutAt: dto.timed_out_at ?? null,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n steps: dto.steps.map(toStep),\n });\n}\n\nexport function toStep(dto: WorkflowRunStepDetailDto): Step {\n return {\n id: dto.id,\n jobExecutionId: dto.job_execution_id,\n key: dto.key,\n name: dto.name,\n sourceLocation: dto.source_location\n ? {startLine: dto.source_location.start_line, endLine: dto.source_location.end_line}\n : null,\n status: dto.status,\n statusReason: dto.status_reason,\n type: dto.type,\n config: dto.config,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n agentConfig: toAgentStepConfig(dto),\n error: dto.error\n ? {\n message: dto.error.message,\n ...(dto.error.code === undefined ? {} : {code: dto.error.code}),\n ...(dto.error.managed_provider_id === undefined\n ? {}\n : {managedProviderId: dto.error.managed_provider_id}),\n exitCode: dto.error.exit_code ?? null,\n signal: dto.error.signal,\n reason: dto.error.reason,\n agentConfigIssue: dto.error.agent_config_issue,\n category: dto.error.category,\n }\n : null,\n position: dto.position,\n currentAttempt: dto.current_attempt,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n attempts: dto.attempts.map((attempt) => toStepAttempt(attempt, dto.job_execution_id)),\n };\n}\n\nexport function toStepAttempt(dto: StepAttemptDto, jobExecutionId: string): StepAttempt {\n return new StepAttempt({\n id: dto.id,\n stepId: dto.step_id,\n jobExecutionId,\n attempt: dto.attempt,\n executionOrder: dto.execution_order,\n status: dto.status,\n exitCode: dto.exit_code ?? null,\n output: dto.output ?? null,\n outputs: dto.outputs ?? dto.output ?? null,\n response: dto.response ?? null,\n error: dto.error ?? null,\n gateResult: toStepGateResult(dto.gate_result),\n restartFeedback: dto.restart_feedback ?? null,\n startedAt: dto.started_at,\n finishedAt: dto.finished_at ?? null,\n });\n}\n\nexport function toStepAttemptDetail(dto: StepAttemptDetailResponseDto) {\n return {\n stepId: dto.step_id,\n attempt: dto.attempt,\n authoredConfig: dto.authored_config,\n config: dto.config,\n evaluationTrace: toEvaluationTrace(dto.evaluation_trace),\n };\n}\n\nfunction toJobListening(dto: JobListeningDto): JobListening {\n return {\n on: dto.on,\n until: dto.until,\n timeoutMs: dto.timeout_ms,\n maxExecutions: dto.max_executions,\n batch: dto.batch\n ? {\n debounceMs: dto.batch.debounce_ms,\n maxSize: dto.batch.max_size,\n maxWaitMs: dto.batch.max_wait_ms,\n }\n : null,\n onResolve: dto.on_resolve,\n executionTimeoutMs: dto.execution_timeout_ms,\n name: dto.name,\n };\n}\n\nfunction toWorkflowExecutionEvent(dto: WorkflowExecutionEventDto): WorkflowExecutionEvent {\n return {\n source: dto.source,\n event: dto.event,\n deliveryId: dto.delivery_id,\n receivedAt: dto.received_at,\n project: dto.project,\n repository: dto.repository,\n ref: dto.ref,\n commit: dto.commit,\n data: dto.data,\n };\n}\n\nfunction toStepGateResult(dto: StepGateResultDto): StepGateResult {\n if (dto === null || dto.kind === 'none' || dto.kind === 'not_evaluated') return dto;\n if (dto.kind === 'passed' || dto.kind === 'failed') return {...dto, exitCode: dto.exit_code};\n if (dto.kind === 'uncheckable' || dto.kind === 'evaluation_error')\n return {...dto, exitCode: dto.exit_code};\n return dto;\n}\n\nfunction toEvaluationTrace(trace: EvaluationTraceDto | null): EvaluationTraceEntry[] | null {\n return (\n trace?.map((entry) =>\n 'dropped' in entry\n ? entry\n : {\n expression: entry.expression,\n roots: entry.roots,\n fillTarget: entry.fill_target,\n evaluatedAt: entry.evaluated_at,\n field: entry.field,\n ...(entry.value === undefined ? {} : {value: entry.value}),\n ...(entry.truncated === undefined ? {} : {truncated: entry.truncated}),\n ...(entry.expr_truncated === undefined ? {} : {exprTruncated: entry.expr_truncated}),\n ...(entry.reference === undefined ? {} : {reference: entry.reference}),\n ...(entry.degraded === undefined ? {} : {degraded: entry.degraded}),\n ...(entry.env_key === undefined ? {} : {envKey: entry.env_key}),\n },\n ) ?? null\n );\n}\n\nfunction toAgentStepConfig(dto: WorkflowRunStepDetailDto): Step['agentConfig'] {\n if (dto.type !== 'agent') return null;\n return {\n provider: stringConfigValue(dto.config.provider),\n model: stringConfigValue(dto.config.model),\n thinking: stringConfigValue(dto.config.thinking),\n };\n}\n\nfunction stringConfigValue(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n"],"names":["Job","JobExecution","StepAttempt","WorkflowRunAttempt","WorkflowRunAttemptSummary","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","toWorkflowRun","dto","id","projectId","project_id","definitionId","definition_id","number","name","workflowName","workflow_name","currentAttempt","current_attempt","triggerProvider","trigger_provider","triggerSource","trigger_source","triggerEvent","trigger_event","triggerDisplayLabel","triggerLabel","triggerPayload","trigger_payload","triggerReference","trigger_reference","inputs","sourceSnapshot","source_snapshot","content","format","createdAt","created_at","updatedAt","updated_at","isTemporary","startsWith","toWorkflowRunAttempt","workflowRunId","workflow_run_id","attempt","status","startedAt","started_at","finishedAt","finished_at","rerunMode","rerun_mode","toWorkflowRunRecord","latestAttempt","latest_attempt","runAttempt","toWorkflowRunListItem","hasDisplayStatusCounts","job_display_status_counts","undefined","statusCounts","job_status_counts","map","count","jobs","preview","job","key","mode","listenerStatus","listener_status","executionStatus","execution_status","legacyExecutionStatus","position","hasStartedJobExecution","has_started_job_execution","total","reduce","sum","entry","toWorkflowRunListPage","runs","nextCursor","next_cursor","filteredTotalCount","filtered_total_count","toWorkflowRunDetail","run_attempt","toJob","runAttemptId","run_attempt_id","statusReason","status_reason","carriedOver","carried_over","outputs","success","runner","evaluationTrace","toEvaluationTrace","evaluation_trace","listening","toJobListening","resolutionReason","resolution_reason","dependencies","jobExecutions","job_executions","toJobExecution","jobId","job_id","sequence","statusReasonMessage","status_reason_message","triggerEvents","trigger_events","toWorkflowExecutionEvent","queuedAt","queued_at","timedOutAt","timed_out_at","steps","toStep","jobExecutionId","job_execution_id","sourceLocation","source_location","startLine","start_line","endLine","end_line","type","config","agentConfig","toAgentStepConfig","error","message","code","managed_provider_id","managedProviderId","exitCode","exit_code","signal","reason","agentConfigIssue","agent_config_issue","category","attempts","toStepAttempt","stepId","step_id","executionOrder","execution_order","output","response","gateResult","toStepGateResult","gate_result","restartFeedback","restart_feedback","toStepAttemptDetail","authoredConfig","authored_config","on","until","timeoutMs","timeout_ms","maxExecutions","max_executions","batch","debounceMs","debounce_ms","maxSize","max_size","maxWaitMs","max_wait_ms","onResolve","on_resolve","executionTimeoutMs","execution_timeout_ms","source","event","deliveryId","delivery_id","receivedAt","received_at","project","repository","ref","commit","data","kind","trace","expression","roots","fillTarget","fill_target","evaluatedAt","evaluated_at","field","value","truncated","expr_truncated","exprTruncated","reference","degraded","env_key","envKey","provider","stringConfigValue","model","thinking","trim"],"mappings":"AAgBA,SAEEA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