@workflow/web 4.0.1-beta.0

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.
Files changed (98) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +55 -0
  3. package/.next/app-path-routes-manifest.json +7 -0
  4. package/.next/build-manifest.json +33 -0
  5. package/.next/export-marker.json +6 -0
  6. package/.next/images-manifest.json +57 -0
  7. package/.next/next-minimal-server.js.nft.json +1 -0
  8. package/.next/next-server.js.nft.json +1 -0
  9. package/.next/package.json +1 -0
  10. package/.next/prerender-manifest.json +41 -0
  11. package/.next/react-loadable-manifest.json +1 -0
  12. package/.next/required-server-files.json +318 -0
  13. package/.next/routes-manifest.json +77 -0
  14. package/.next/server/app/_not-found/page.js +2 -0
  15. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  17. package/.next/server/app/favicon.ico/route.js +1 -0
  18. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  19. package/.next/server/app/favicon.ico.body +0 -0
  20. package/.next/server/app/favicon.ico.meta +1 -0
  21. package/.next/server/app/page.js +2 -0
  22. package/.next/server/app/page.js.nft.json +1 -0
  23. package/.next/server/app/page_client-reference-manifest.js +1 -0
  24. package/.next/server/app/run/[runId]/page.js +5 -0
  25. package/.next/server/app/run/[runId]/page.js.nft.json +1 -0
  26. package/.next/server/app/run/[runId]/page_client-reference-manifest.js +1 -0
  27. package/.next/server/app/run/[runId]/streams/[streamId]/page.js +2 -0
  28. package/.next/server/app/run/[runId]/streams/[streamId]/page.js.nft.json +1 -0
  29. package/.next/server/app/run/[runId]/streams/[streamId]/page_client-reference-manifest.js +1 -0
  30. package/.next/server/app-paths-manifest.json +7 -0
  31. package/.next/server/chunks/111.js +1 -0
  32. package/.next/server/chunks/122.js +22 -0
  33. package/.next/server/chunks/138.js +1 -0
  34. package/.next/server/chunks/207.js +6 -0
  35. package/.next/server/chunks/255.js +1 -0
  36. package/.next/server/chunks/464.js +1 -0
  37. package/.next/server/chunks/656.js +42 -0
  38. package/.next/server/chunks/701.js +6 -0
  39. package/.next/server/chunks/907.js +1 -0
  40. package/.next/server/functions-config-manifest.json +4 -0
  41. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  42. package/.next/server/middleware-build-manifest.js +1 -0
  43. package/.next/server/middleware-manifest.json +6 -0
  44. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  45. package/.next/server/next-font-manifest.js +1 -0
  46. package/.next/server/next-font-manifest.json +1 -0
  47. package/.next/server/pages/500.html +1 -0
  48. package/.next/server/pages/_app.js +1 -0
  49. package/.next/server/pages/_app.js.nft.json +1 -0
  50. package/.next/server/pages/_document.js +1 -0
  51. package/.next/server/pages/_document.js.nft.json +1 -0
  52. package/.next/server/pages/_error.js +19 -0
  53. package/.next/server/pages/_error.js.nft.json +1 -0
  54. package/.next/server/pages-manifest.json +5 -0
  55. package/.next/server/server-reference-manifest.js +1 -0
  56. package/.next/server/server-reference-manifest.json +1 -0
  57. package/.next/server/webpack-runtime.js +1 -0
  58. package/.next/static/chunks/412-a430cced2eddabdc.js +1 -0
  59. package/.next/static/chunks/508-34c7cba42228a753.js +1 -0
  60. package/.next/static/chunks/624-fa4aee3e4518a6bf.js +1 -0
  61. package/.next/static/chunks/687-ad38291defb5159c.js +1 -0
  62. package/.next/static/chunks/724-597f8080461271d4.js +1 -0
  63. package/.next/static/chunks/793.b2d5c21bf87e0c8f.js +1 -0
  64. package/.next/static/chunks/98-4fb0632ee8eb5945.js +1 -0
  65. package/.next/static/chunks/app/_not-found/page-e10213493435545e.js +1 -0
  66. package/.next/static/chunks/app/layout-5511efd4ea55fd71.js +1 -0
  67. package/.next/static/chunks/app/page-14a46aa6ed9fb9f8.js +1 -0
  68. package/.next/static/chunks/app/run/[runId]/page-b70fe3bd91479208.js +1 -0
  69. package/.next/static/chunks/app/run/[runId]/streams/[streamId]/page-5813197c8ca1670b.js +1 -0
  70. package/.next/static/chunks/c4f718af-c178cc1cc033b5b4.js +1 -0
  71. package/.next/static/chunks/framework-4334835da20708d1.js +1 -0
  72. package/.next/static/chunks/main-9b3d7ee2f9cd10fa.js +1 -0
  73. package/.next/static/chunks/main-app-2d7c43866080ba5d.js +1 -0
  74. package/.next/static/chunks/pages/_app-4e2b7a90afe6e377.js +1 -0
  75. package/.next/static/chunks/pages/_error-1e1f0821587194ac.js +1 -0
  76. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  77. package/.next/static/chunks/webpack-b430e07cf9392cd1.js +1 -0
  78. package/.next/static/css/2002c05225ea0e5e.css +1 -0
  79. package/.next/static/css/bb92b93f39c57915.css +3 -0
  80. package/.next/static/idQnUYapsIqHwK0hfmmKZ/_buildManifest.js +1 -0
  81. package/.next/static/idQnUYapsIqHwK0hfmmKZ/_ssgManifest.js +1 -0
  82. package/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  83. package/.next/static/media/747892c23ea88013-s.woff2 +0 -0
  84. package/.next/static/media/8d697b304b401681-s.woff2 +0 -0
  85. package/.next/static/media/93f479601ee12b01-s.p.woff2 +0 -0
  86. package/.next/static/media/9610d9e46709d722-s.woff2 +0 -0
  87. package/.next/static/media/ba015fad6dcf6784-s.woff2 +0 -0
  88. package/.next/trace +19 -0
  89. package/.next/types/app/page.ts +84 -0
  90. package/.next/types/app/run/[runId]/page.ts +84 -0
  91. package/.next/types/app/run/[runId]/streams/[streamId]/page.ts +84 -0
  92. package/.next/types/cache-life.d.ts +141 -0
  93. package/.next/types/package.json +1 -0
  94. package/.next/types/routes.d.ts +59 -0
  95. package/.next/types/validator.ts +79 -0
  96. package/LICENSE.md +21 -0
  97. package/README.md +47 -0
  98. package/package.json +50 -0
@@ -0,0 +1,84 @@
1
+ // File: /home/runner/work/workflow/workflow/packages/web/src/app/page.tsx
2
+ import * as entry from '../../../src/app/page.js'
3
+ import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
+
5
+ type TEntry = typeof import('../../../src/app/page.js')
6
+
7
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
8
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
9
+ : T
10
+
11
+ // Check that the entry is a valid entry
12
+ checkFields<Diff<{
13
+ default: Function
14
+ config?: {}
15
+ generateStaticParams?: Function
16
+ revalidate?: RevalidateRange<TEntry> | false
17
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
18
+ dynamicParams?: boolean
19
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
20
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
21
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
22
+ maxDuration?: number
23
+
24
+ metadata?: any
25
+ generateMetadata?: Function
26
+ viewport?: any
27
+ generateViewport?: Function
28
+ experimental_ppr?: boolean
29
+
30
+ }, TEntry, ''>>()
31
+
32
+
33
+ // Check the prop type of the entry function
34
+ checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
35
+
36
+ // Check the arguments and return type of the generateMetadata function
37
+ if ('generateMetadata' in entry) {
38
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
39
+ checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
40
+ }
41
+
42
+ // Check the arguments and return type of the generateViewport function
43
+ if ('generateViewport' in entry) {
44
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
45
+ checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
46
+ }
47
+
48
+ // Check the arguments and return type of the generateStaticParams function
49
+ if ('generateStaticParams' in entry) {
50
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
51
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
52
+ }
53
+
54
+ export interface PageProps {
55
+ params?: Promise<SegmentParams>
56
+ searchParams?: Promise<any>
57
+ }
58
+ export interface LayoutProps {
59
+ children?: React.ReactNode
60
+
61
+ params?: Promise<SegmentParams>
62
+ }
63
+
64
+ // =============
65
+ // Utility types
66
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
67
+
68
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
69
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
70
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
71
+
72
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
73
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
74
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
75
+
76
+
77
+
78
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
79
+
80
+ // https://github.com/sindresorhus/type-fest
81
+ type Numeric = number | bigint
82
+ type Zero = 0 | 0n
83
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
84
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -0,0 +1,84 @@
1
+ // File: /home/runner/work/workflow/workflow/packages/web/src/app/run/[runId]/page.tsx
2
+ import * as entry from '../../../../../src/app/run/[runId]/page.js'
3
+ import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
+
5
+ type TEntry = typeof import('../../../../../src/app/run/[runId]/page.js')
6
+
7
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
8
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
9
+ : T
10
+
11
+ // Check that the entry is a valid entry
12
+ checkFields<Diff<{
13
+ default: Function
14
+ config?: {}
15
+ generateStaticParams?: Function
16
+ revalidate?: RevalidateRange<TEntry> | false
17
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
18
+ dynamicParams?: boolean
19
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
20
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
21
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
22
+ maxDuration?: number
23
+
24
+ metadata?: any
25
+ generateMetadata?: Function
26
+ viewport?: any
27
+ generateViewport?: Function
28
+ experimental_ppr?: boolean
29
+
30
+ }, TEntry, ''>>()
31
+
32
+
33
+ // Check the prop type of the entry function
34
+ checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
35
+
36
+ // Check the arguments and return type of the generateMetadata function
37
+ if ('generateMetadata' in entry) {
38
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
39
+ checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
40
+ }
41
+
42
+ // Check the arguments and return type of the generateViewport function
43
+ if ('generateViewport' in entry) {
44
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
45
+ checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
46
+ }
47
+
48
+ // Check the arguments and return type of the generateStaticParams function
49
+ if ('generateStaticParams' in entry) {
50
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
51
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
52
+ }
53
+
54
+ export interface PageProps {
55
+ params?: Promise<SegmentParams>
56
+ searchParams?: Promise<any>
57
+ }
58
+ export interface LayoutProps {
59
+ children?: React.ReactNode
60
+
61
+ params?: Promise<SegmentParams>
62
+ }
63
+
64
+ // =============
65
+ // Utility types
66
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
67
+
68
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
69
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
70
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
71
+
72
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
73
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
74
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
75
+
76
+
77
+
78
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
79
+
80
+ // https://github.com/sindresorhus/type-fest
81
+ type Numeric = number | bigint
82
+ type Zero = 0 | 0n
83
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
84
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -0,0 +1,84 @@
1
+ // File: /home/runner/work/workflow/workflow/packages/web/src/app/run/[runId]/streams/[streamId]/page.tsx
2
+ import * as entry from '../../../../../../../src/app/run/[runId]/streams/[streamId]/page.js'
3
+ import type { ResolvingMetadata, ResolvingViewport } from 'next/dist/lib/metadata/types/metadata-interface.js'
4
+
5
+ type TEntry = typeof import('../../../../../../../src/app/run/[runId]/streams/[streamId]/page.js')
6
+
7
+ type SegmentParams<T extends Object = any> = T extends Record<string, any>
8
+ ? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
9
+ : T
10
+
11
+ // Check that the entry is a valid entry
12
+ checkFields<Diff<{
13
+ default: Function
14
+ config?: {}
15
+ generateStaticParams?: Function
16
+ revalidate?: RevalidateRange<TEntry> | false
17
+ dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
18
+ dynamicParams?: boolean
19
+ fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
20
+ preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
21
+ runtime?: 'nodejs' | 'experimental-edge' | 'edge'
22
+ maxDuration?: number
23
+
24
+ metadata?: any
25
+ generateMetadata?: Function
26
+ viewport?: any
27
+ generateViewport?: Function
28
+ experimental_ppr?: boolean
29
+
30
+ }, TEntry, ''>>()
31
+
32
+
33
+ // Check the prop type of the entry function
34
+ checkFields<Diff<PageProps, FirstArg<TEntry['default']>, 'default'>>()
35
+
36
+ // Check the arguments and return type of the generateMetadata function
37
+ if ('generateMetadata' in entry) {
38
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
39
+ checkFields<Diff<ResolvingMetadata, SecondArg<MaybeField<TEntry, 'generateMetadata'>>, 'generateMetadata'>>()
40
+ }
41
+
42
+ // Check the arguments and return type of the generateViewport function
43
+ if ('generateViewport' in entry) {
44
+ checkFields<Diff<PageProps, FirstArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
45
+ checkFields<Diff<ResolvingViewport, SecondArg<MaybeField<TEntry, 'generateViewport'>>, 'generateViewport'>>()
46
+ }
47
+
48
+ // Check the arguments and return type of the generateStaticParams function
49
+ if ('generateStaticParams' in entry) {
50
+ checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
51
+ checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
52
+ }
53
+
54
+ export interface PageProps {
55
+ params?: Promise<SegmentParams>
56
+ searchParams?: Promise<any>
57
+ }
58
+ export interface LayoutProps {
59
+ children?: React.ReactNode
60
+
61
+ params?: Promise<SegmentParams>
62
+ }
63
+
64
+ // =============
65
+ // Utility types
66
+ type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
67
+
68
+ // If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
69
+ type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
70
+ type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
71
+
72
+ type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
73
+ type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
74
+ type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
75
+
76
+
77
+
78
+ function checkFields<_ extends { [k in keyof any]: never }>() {}
79
+
80
+ // https://github.com/sindresorhus/type-fest
81
+ type Numeric = number | bigint
82
+ type Zero = 0 | 0n
83
+ type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
84
+ type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
@@ -0,0 +1,141 @@
1
+ // Type definitions for Next.js cacheLife configs
2
+
3
+ declare module 'next/cache' {
4
+ export { unstable_cache } from 'next/dist/server/web/spec-extension/unstable-cache'
5
+ export {
6
+ revalidateTag,
7
+ revalidatePath,
8
+ unstable_expireTag,
9
+ unstable_expirePath,
10
+ } from 'next/dist/server/web/spec-extension/revalidate'
11
+ export { unstable_noStore } from 'next/dist/server/web/spec-extension/unstable-no-store'
12
+
13
+
14
+ /**
15
+ * Cache this `"use cache"` for a timespan defined by the `"default"` profile.
16
+ * ```
17
+ * stale: 300 seconds (5 minutes)
18
+ * revalidate: 900 seconds (15 minutes)
19
+ * expire: never
20
+ * ```
21
+ *
22
+ * This cache may be stale on clients for 5 minutes before checking with the server.
23
+ * If the server receives a new request after 15 minutes, start revalidating new values in the background.
24
+ * It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
25
+ */
26
+ export function unstable_cacheLife(profile: "default"): void
27
+
28
+ /**
29
+ * Cache this `"use cache"` for a timespan defined by the `"seconds"` profile.
30
+ * ```
31
+ * stale: 30 seconds
32
+ * revalidate: 1 seconds
33
+ * expire: 60 seconds (1 minute)
34
+ * ```
35
+ *
36
+ * This cache may be stale on clients for 30 seconds before checking with the server.
37
+ * If the server receives a new request after 1 seconds, start revalidating new values in the background.
38
+ * If this entry has no traffic for 1 minute it will expire. The next request will recompute it.
39
+ */
40
+ export function unstable_cacheLife(profile: "seconds"): void
41
+
42
+ /**
43
+ * Cache this `"use cache"` for a timespan defined by the `"minutes"` profile.
44
+ * ```
45
+ * stale: 300 seconds (5 minutes)
46
+ * revalidate: 60 seconds (1 minute)
47
+ * expire: 3600 seconds (1 hour)
48
+ * ```
49
+ *
50
+ * This cache may be stale on clients for 5 minutes before checking with the server.
51
+ * If the server receives a new request after 1 minute, start revalidating new values in the background.
52
+ * If this entry has no traffic for 1 hour it will expire. The next request will recompute it.
53
+ */
54
+ export function unstable_cacheLife(profile: "minutes"): void
55
+
56
+ /**
57
+ * Cache this `"use cache"` for a timespan defined by the `"hours"` profile.
58
+ * ```
59
+ * stale: 300 seconds (5 minutes)
60
+ * revalidate: 3600 seconds (1 hour)
61
+ * expire: 86400 seconds (1 day)
62
+ * ```
63
+ *
64
+ * This cache may be stale on clients for 5 minutes before checking with the server.
65
+ * If the server receives a new request after 1 hour, start revalidating new values in the background.
66
+ * If this entry has no traffic for 1 day it will expire. The next request will recompute it.
67
+ */
68
+ export function unstable_cacheLife(profile: "hours"): void
69
+
70
+ /**
71
+ * Cache this `"use cache"` for a timespan defined by the `"days"` profile.
72
+ * ```
73
+ * stale: 300 seconds (5 minutes)
74
+ * revalidate: 86400 seconds (1 day)
75
+ * expire: 604800 seconds (1 week)
76
+ * ```
77
+ *
78
+ * This cache may be stale on clients for 5 minutes before checking with the server.
79
+ * If the server receives a new request after 1 day, start revalidating new values in the background.
80
+ * If this entry has no traffic for 1 week it will expire. The next request will recompute it.
81
+ */
82
+ export function unstable_cacheLife(profile: "days"): void
83
+
84
+ /**
85
+ * Cache this `"use cache"` for a timespan defined by the `"weeks"` profile.
86
+ * ```
87
+ * stale: 300 seconds (5 minutes)
88
+ * revalidate: 604800 seconds (1 week)
89
+ * expire: 2592000 seconds (30 days)
90
+ * ```
91
+ *
92
+ * This cache may be stale on clients for 5 minutes before checking with the server.
93
+ * If the server receives a new request after 1 week, start revalidating new values in the background.
94
+ * If this entry has no traffic for 30 days it will expire. The next request will recompute it.
95
+ */
96
+ export function unstable_cacheLife(profile: "weeks"): void
97
+
98
+ /**
99
+ * Cache this `"use cache"` for a timespan defined by the `"max"` profile.
100
+ * ```
101
+ * stale: 300 seconds (5 minutes)
102
+ * revalidate: 2592000 seconds (30 days)
103
+ * expire: never
104
+ * ```
105
+ *
106
+ * This cache may be stale on clients for 5 minutes before checking with the server.
107
+ * If the server receives a new request after 30 days, start revalidating new values in the background.
108
+ * It lives for the maximum age of the server cache. If this entry has no traffic for a while, it may serve an old value the next request.
109
+ */
110
+ export function unstable_cacheLife(profile: "max"): void
111
+
112
+ /**
113
+ * Cache this `"use cache"` using a custom timespan.
114
+ * ```
115
+ * stale: ... // seconds
116
+ * revalidate: ... // seconds
117
+ * expire: ... // seconds
118
+ * ```
119
+ *
120
+ * This is similar to Cache-Control: max-age=`stale`,s-max-age=`revalidate`,stale-while-revalidate=`expire-revalidate`
121
+ *
122
+ * If a value is left out, the lowest of other cacheLife() calls or the default, is used instead.
123
+ */
124
+ export function unstable_cacheLife(profile: {
125
+ /**
126
+ * This cache may be stale on clients for ... seconds before checking with the server.
127
+ */
128
+ stale?: number,
129
+ /**
130
+ * If the server receives a new request after ... seconds, start revalidating new values in the background.
131
+ */
132
+ revalidate?: number,
133
+ /**
134
+ * If this entry has no traffic for ... seconds it will expire. The next request will recompute it.
135
+ */
136
+ expire?: number
137
+ }): void
138
+
139
+
140
+ export { cacheTag as unstable_cacheTag } from 'next/dist/server/use-cache/cache-tag'
141
+ }
@@ -0,0 +1 @@
1
+ {"type": "module"}
@@ -0,0 +1,59 @@
1
+ // This file is generated automatically by Next.js
2
+ // Do not edit this file manually
3
+
4
+ type AppRoutes = "/" | "/run/[runId]" | "/run/[runId]/streams/[streamId]"
5
+ type PageRoutes = never
6
+ type LayoutRoutes = "/"
7
+ type RedirectRoutes = never
8
+ type RewriteRoutes = never
9
+ type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes
10
+
11
+
12
+ interface ParamMap {
13
+ "/": {}
14
+ "/run/[runId]": { "runId": string; }
15
+ "/run/[runId]/streams/[streamId]": { "runId": string; "streamId": string; }
16
+ }
17
+
18
+
19
+ export type ParamsOf<Route extends Routes> = ParamMap[Route]
20
+
21
+ interface LayoutSlotMap {
22
+ "/": never
23
+ }
24
+
25
+
26
+ export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap }
27
+
28
+ declare global {
29
+ /**
30
+ * Props for Next.js App Router page components
31
+ * @example
32
+ * ```tsx
33
+ * export default function Page(props: PageProps<'/blog/[slug]'>) {
34
+ * const { slug } = await props.params
35
+ * return <div>Blog post: {slug}</div>
36
+ * }
37
+ * ```
38
+ */
39
+ interface PageProps<AppRoute extends AppRoutes> {
40
+ params: Promise<ParamMap[AppRoute]>
41
+ searchParams: Promise<Record<string, string | string[] | undefined>>
42
+ }
43
+
44
+ /**
45
+ * Props for Next.js App Router layout components
46
+ * @example
47
+ * ```tsx
48
+ * export default function Layout(props: LayoutProps<'/dashboard'>) {
49
+ * return <div>{props.children}</div>
50
+ * }
51
+ * ```
52
+ */
53
+ type LayoutProps<LayoutRoute extends LayoutRoutes> = {
54
+ params: Promise<ParamMap[LayoutRoute]>
55
+ children: React.ReactNode
56
+ } & {
57
+ [K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
58
+ }
59
+ }
@@ -0,0 +1,79 @@
1
+ // This file is generated automatically by Next.js
2
+ // Do not edit this file manually
3
+ // This file validates that all pages and layouts export the correct types
4
+
5
+ import type { AppRoutes, LayoutRoutes, ParamMap } from "./routes.js"
6
+ import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
7
+
8
+ type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
9
+ default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
10
+ generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
11
+ generateMetadata?: (
12
+ props: { params: Promise<ParamMap[Route]> } & any,
13
+ parent: ResolvingMetadata
14
+ ) => Promise<any> | any
15
+ generateViewport?: (
16
+ props: { params: Promise<ParamMap[Route]> } & any,
17
+ parent: ResolvingViewport
18
+ ) => Promise<any> | any
19
+ metadata?: any
20
+ viewport?: any
21
+ }
22
+
23
+ type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
24
+ default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
25
+ generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
26
+ generateMetadata?: (
27
+ props: { params: Promise<ParamMap[Route]> } & any,
28
+ parent: ResolvingMetadata
29
+ ) => Promise<any> | any
30
+ generateViewport?: (
31
+ props: { params: Promise<ParamMap[Route]> } & any,
32
+ parent: ResolvingViewport
33
+ ) => Promise<any> | any
34
+ metadata?: any
35
+ viewport?: any
36
+ }
37
+
38
+
39
+ // Validate ../../src/app/page.tsx
40
+ {
41
+ type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
42
+ const handler = {} as typeof import("../../src/app/page.js")
43
+ type __Check = __IsExpected<typeof handler>
44
+ // @ts-ignore
45
+ type __Unused = __Check
46
+ }
47
+
48
+ // Validate ../../src/app/run/[runId]/page.tsx
49
+ {
50
+ type __IsExpected<Specific extends AppPageConfig<"/run/[runId]">> = Specific
51
+ const handler = {} as typeof import("../../src/app/run/[runId]/page.js")
52
+ type __Check = __IsExpected<typeof handler>
53
+ // @ts-ignore
54
+ type __Unused = __Check
55
+ }
56
+
57
+ // Validate ../../src/app/run/[runId]/streams/[streamId]/page.tsx
58
+ {
59
+ type __IsExpected<Specific extends AppPageConfig<"/run/[runId]/streams/[streamId]">> = Specific
60
+ const handler = {} as typeof import("../../src/app/run/[runId]/streams/[streamId]/page.js")
61
+ type __Check = __IsExpected<typeof handler>
62
+ // @ts-ignore
63
+ type __Unused = __Check
64
+ }
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+ // Validate ../../src/app/layout.tsx
73
+ {
74
+ type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
75
+ const handler = {} as typeof import("../../src/app/layout.js")
76
+ type __Check = __IsExpected<typeof handler>
77
+ // @ts-ignore
78
+ type __Unused = __Check
79
+ }
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Vercel, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @workflow/web
2
+
3
+ A Next.js-based web interface for inspecting workflow runs, steps, streams, and events. This package is designed to be launched from the `@workflow/cli` package with the `--web` flag, e.g. `wf i runs --web`. It can also be self-hosted to provide a standalone observability UI.
4
+
5
+ ## Installation
6
+
7
+ ### For End Users
8
+
9
+ When published to npm, install globally:
10
+
11
+ ```bash
12
+ npm install -g @workflow/cli
13
+ # or
14
+ pnpm install -g @workflow/cli
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ### Via CLI
20
+
21
+ The primary way to start using the web UI is through the CLI:
22
+
23
+ ```bash
24
+ # Basic usage - view local runs in web UI
25
+ wf inspect runs --web
26
+
27
+ # Viewing remote production data
28
+ wf inspect events --web \
29
+ --backend=vercel \
30
+ --env=production \
31
+ --project=my-project \
32
+ --team=my-team
33
+ ```
34
+
35
+ Once the web UI is started, you can use it to navigate and inspect all available workflow-related data.
36
+
37
+ ## Contributing
38
+
39
+ ### Development Workflow
40
+
41
+ In the `packages/web` directory, run the server live:
42
+
43
+ ```bash
44
+ pnpm dev
45
+ ```
46
+
47
+ Then use the web config to point to your local or remote workflow data.
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@workflow/web",
3
+ "description": "Workflow Observability UI",
4
+ "version": "4.0.1-beta.0",
5
+ "private": false,
6
+ "files": [
7
+ ".next",
8
+ "!.next/cache",
9
+ "!.next/diagnostics"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "dependencies": {
15
+ "next": "15.5.4"
16
+ },
17
+ "devDependencies": {
18
+ "@biomejs/biome": "^2.2.5",
19
+ "@radix-ui/react-label": "^2.1.7",
20
+ "@radix-ui/react-select": "^2.2.6",
21
+ "@radix-ui/react-slot": "^1.1.1",
22
+ "@radix-ui/react-switch": "^1.1.2",
23
+ "@radix-ui/react-tooltip": "^1.2.8",
24
+ "@tailwindcss/postcss": "^4",
25
+ "@types/node": "24.6.2",
26
+ "@types/react": "^19",
27
+ "@types/react-dom": "^19",
28
+ "class-variance-authority": "^0.7.1",
29
+ "clsx": "^2.1.1",
30
+ "date-fns": "^4.1.0",
31
+ "json-colorizer": "^3.0.1",
32
+ "lucide-react": "^0.469.0",
33
+ "react": "19.1.0",
34
+ "react-dom": "19.1.0",
35
+ "swr": "^2.3.6",
36
+ "tailwind-merge": "^2.5.5",
37
+ "tailwindcss": "^4",
38
+ "typescript": "^5.9.3",
39
+ "@workflow/core": "4.0.1-beta.0",
40
+ "@workflow/world": "4.0.1-beta.0"
41
+ },
42
+ "scripts": {
43
+ "dev": "next dev --turbopack --port 3456",
44
+ "build": "next build",
45
+ "clean": "rm -r .next ||:",
46
+ "start": "next start",
47
+ "lint": "biome check",
48
+ "format": "biome format --write"
49
+ }
50
+ }