kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: finesse public project component; fix timezone issue with dev db
rodzic
178bb5d543
commit
e6c41ed26b
|
@ -156,6 +156,7 @@ export function registerV1CreateDeployment(
|
|||
let [deployment] = await db
|
||||
.insert(schema.deployments)
|
||||
.values({
|
||||
iconUrl: user.image,
|
||||
...agenticProjectConfig,
|
||||
identifier: deploymentIdentifier,
|
||||
hash,
|
||||
|
|
|
@ -134,6 +134,7 @@ export function timestamp<
|
|||
: PgTimestampBuilderInitial<''> {
|
||||
return timestampImpl<TMode>({
|
||||
mode: 'string' as unknown as TMode,
|
||||
withTimezone: true,
|
||||
...config
|
||||
})
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@ export const client = new AgenticApiClient({
|
|||
})
|
||||
|
||||
async function main() {
|
||||
// TODO: clear existing tables? and include prompt to double check if so...
|
||||
|
||||
{
|
||||
console.log('\n\nCreating "dev" user...\n\n')
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"@agentic/platform-core": "workspace:*",
|
||||
"@agentic/platform-types": "workspace:*",
|
||||
"@agentic/platform-validators": "workspace:*",
|
||||
"@date-fns/utc": "^2.1.0",
|
||||
"@number-flow/react": "catalog:",
|
||||
"@pmndrs/assets": "catalog:",
|
||||
"@radix-ui/react-dropdown-menu": "catalog:",
|
||||
|
@ -44,6 +45,7 @@
|
|||
"canvas-confetti": "catalog:",
|
||||
"class-variance-authority": "catalog:",
|
||||
"clsx": "catalog:",
|
||||
"date-fns": "^4.1.0",
|
||||
"hast-util-to-jsx-runtime": "catalog:",
|
||||
"ky": "catalog:",
|
||||
"lucide-react": "catalog:",
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<svg width="82" height="82" viewBox="0 0 82 82" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="41" cy="41" r="41" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.4578 61.5308C19.3253 61.572 16.2142 61.5305 13.1245 61.4063C22.8506 46.0201 32.578 30.6306 42.3067 15.2374C43.7021 13.8021 45.2577 13.6154 46.9734 14.6774C49.1069 16.4727 49.7499 18.6919 48.9023 21.3352C47.3988 23.8863 45.864 26.4167 44.2978 28.9263C37.7437 39.2967 31.1897 49.6671 24.6356 60.0374C24.161 60.9068 23.4351 61.4046 22.4578 61.5308Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M47.3466 30.9175C47.6254 31.0504 47.8536 31.2577 48.031 31.5397C54.9747 41.5901 61.9643 51.6079 68.9999 61.593C65.9303 61.676 62.8607 61.676 59.791 61.593C58.9198 61.396 58.1939 60.9605 57.6133 60.2864C53.2469 53.918 48.8499 47.5714 44.4222 41.2464C43.9577 40.5736 43.543 39.8684 43.1777 39.1308C43.025 38.1776 43.2325 37.3065 43.7999 36.5175C45.0134 34.6631 46.1956 32.7965 47.3466 30.9175Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M54.5645 61.4063C51.0185 61.5305 47.451 61.5719 43.8623 61.5307C42.9149 60.1055 41.9401 58.6952 40.9378 57.2996C40.0136 58.6925 39.1217 60.1029 38.2623 61.5307C34.7564 61.5719 31.272 61.5305 27.809 61.4063C31.0789 56.2481 34.3766 51.1044 37.7023 45.9752C39.0503 44.5629 40.6474 44.2103 42.4934 44.9174C42.9837 45.1521 43.4193 45.4632 43.8001 45.8507C47.4157 51.021 51.0038 56.2063 54.5645 61.4063Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1244 61.4063C16.2142 61.5305 19.3253 61.5719 22.4578 61.5308C19.3255 61.6961 16.173 61.6961 13 61.5308C13.0154 61.4552 13.0569 61.4138 13.1244 61.4063Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M27.8089 61.4063C31.2719 61.5305 34.7564 61.5719 38.2622 61.5308C34.7566 61.6961 31.2307 61.6961 27.6844 61.5308C27.6999 61.4552 27.7413 61.4138 27.8089 61.4063Z" fill="white"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M54.5644 61.4063C54.632 61.4138 54.6734 61.4552 54.6888 61.5308C51.0596 61.6963 47.4507 61.6963 43.8622 61.5308C47.4509 61.5719 51.0184 61.5305 54.5644 61.4063Z" fill="white"/>
|
||||
</svg>
|
Po Szerokość: | Wysokość: | Rozmiar: 2.1 KiB |
|
@ -1,10 +1,10 @@
|
|||
'use client'
|
||||
|
||||
import Link from 'next/link'
|
||||
import useInfiniteScroll from 'react-infinite-scroll-hook'
|
||||
|
||||
import { useAgentic } from '@/components/agentic-provider'
|
||||
import { LoadingIndicator } from '@/components/loading-indicator'
|
||||
import { PublicProject } from '@/components/public-project'
|
||||
import { useInfiniteQuery } from '@/lib/query-client'
|
||||
|
||||
export function MarketplaceIndex() {
|
||||
|
@ -76,25 +76,7 @@ export function MarketplaceIndex() {
|
|||
) : (
|
||||
<div className='grid gap-4'>
|
||||
{projects.map((project) => (
|
||||
<Link
|
||||
key={project.id}
|
||||
className='p-4 border rounded-lg hover:border-gray-400 transition-colors'
|
||||
href={`/marketplace/projects/${project.identifier}`}
|
||||
>
|
||||
<h3 className='font-medium'>{project.name}</h3>
|
||||
|
||||
<p className='text-sm text-gray-500'>
|
||||
{project.identifier}
|
||||
</p>
|
||||
|
||||
{project.lastPublishedDeployment && (
|
||||
<p className='text-sm text-gray-500 mt-1'>
|
||||
Last published:{' '}
|
||||
{project.lastPublishedDeployment.version ||
|
||||
project.lastPublishedDeployment.hash}
|
||||
</p>
|
||||
)}
|
||||
</Link>
|
||||
<PublicProject key={project.id} project={project} />
|
||||
))}
|
||||
|
||||
{hasNextPage && (
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
import type { Project } from '@agentic/platform-types'
|
||||
import { UTCDate } from '@date-fns/utc'
|
||||
import { formatDistanceToNow } from 'date-fns'
|
||||
import Link from 'next/link'
|
||||
|
||||
export function PublicProject({ project }: { project: Project }) {
|
||||
const deployment = project.lastPublishedDeployment!
|
||||
|
||||
return (
|
||||
<Link
|
||||
key={project.id}
|
||||
className='p-2 border rounded-lg hover:border-gray-400
|
||||
divide-y divide-gray-200 overflow-hidden bg-white shadow-sm max-w-md
|
||||
'
|
||||
href={`/marketplace/projects/${project.identifier}`}
|
||||
>
|
||||
<div className='p-2 flex gap-2 items-center'>
|
||||
<img
|
||||
src={
|
||||
deployment.iconUrl ||
|
||||
project.user?.image ||
|
||||
'/agentic-icon-circle-light.svg'
|
||||
}
|
||||
alt={project.name}
|
||||
className='aspect-square w-8 h-8'
|
||||
/>
|
||||
|
||||
<div className='flex flex-col gap-1'>
|
||||
<h3 className='font-semibold text-lg text-gray-900 leading-tight'>
|
||||
{project.name}
|
||||
</h3>
|
||||
|
||||
<p className='text-sm text-gray-500'>{project.identifier}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='p-2 flex flex-col gap-2'>
|
||||
{deployment.description && (
|
||||
<p className='text-sm text-gray-700'>{deployment.description}</p>
|
||||
)}
|
||||
|
||||
{project.lastPublishedDeployment && (
|
||||
<div className='text-xs text-gray-500 flex items-center justify-between'>
|
||||
<div>{deployment.version}</div>
|
||||
|
||||
<div>
|
||||
Last published{' '}
|
||||
{formatDistanceToNow(new UTCDate(deployment.createdAt), {
|
||||
addSuffix: true
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
}
|
|
@ -4,6 +4,8 @@ import { defineConfig } from '@agentic/platform'
|
|||
|
||||
export default defineConfig({
|
||||
name: 'search',
|
||||
description:
|
||||
'Google Search tool. Useful for finding up-to-date news and information about any topic.',
|
||||
origin: {
|
||||
type: 'mcp',
|
||||
url: process.env.MCP_ORIGIN_URL!
|
||||
|
@ -11,6 +13,7 @@ export default defineConfig({
|
|||
toolConfigs: [
|
||||
{
|
||||
name: 'search',
|
||||
// Allow results to be cached publicly for ~1 minute
|
||||
cacheControl: 'public, max-age=60, s-maxage=60 stale-while-revalidate=10'
|
||||
}
|
||||
]
|
||||
|
|
211
pnpm-lock.yaml
211
pnpm-lock.yaml
|
@ -6,69 +6,150 @@ settings:
|
|||
|
||||
catalogs:
|
||||
default:
|
||||
'@fisch0920/drizzle-orm':
|
||||
specifier: ^0.43.7
|
||||
version: 0.43.7
|
||||
'@fisch0920/drizzle-zod':
|
||||
specifier: ^0.7.9
|
||||
version: 0.7.9
|
||||
'@hono/node-server':
|
||||
specifier: 1.14.4
|
||||
version: 1.14.4
|
||||
'@hono/zod-openapi':
|
||||
specifier: ^0.19.8
|
||||
version: 0.19.8
|
||||
'@paralleldrive/cuid2':
|
||||
specifier: ^2.2.2
|
||||
version: 2.2.2
|
||||
'@sentry/node':
|
||||
specifier: ^9.30.0
|
||||
version: 9.30.0
|
||||
'@types/semver':
|
||||
specifier: ^7.7.0
|
||||
version: 7.7.0
|
||||
bcryptjs:
|
||||
specifier: ^3.0.2
|
||||
version: 3.0.2
|
||||
drizzle-kit:
|
||||
specifier: ^0.31.1
|
||||
version: 0.31.1
|
||||
drizzle-orm:
|
||||
specifier: ^0.44.2
|
||||
version: 0.44.2
|
||||
exit-hook:
|
||||
specifier: 4.0.0
|
||||
version: 4.0.0
|
||||
hono:
|
||||
specifier: 4.8.1
|
||||
version: 4.8.1
|
||||
'@number-flow/react':
|
||||
specifier: ^0.5.10
|
||||
version: 0.5.10
|
||||
'@pmndrs/assets':
|
||||
specifier: ^1.7.0
|
||||
version: 1.7.0
|
||||
'@radix-ui/react-dropdown-menu':
|
||||
specifier: ^2.1.15
|
||||
version: 2.1.15
|
||||
'@radix-ui/react-label':
|
||||
specifier: ^2.1.7
|
||||
version: 2.1.7
|
||||
'@radix-ui/react-slot':
|
||||
specifier: ^1.2.3
|
||||
version: 1.2.3
|
||||
'@radix-ui/react-tabs':
|
||||
specifier: ^1.1.12
|
||||
version: 1.1.12
|
||||
'@radix-ui/react-tooltip':
|
||||
specifier: ^1.2.7
|
||||
version: 1.2.7
|
||||
'@react-three/cannon':
|
||||
specifier: ^6.6.0
|
||||
version: 6.6.0
|
||||
'@react-three/drei':
|
||||
specifier: ^10.2.0
|
||||
version: 10.3.0
|
||||
'@react-three/fiber':
|
||||
specifier: ^9.1.2
|
||||
version: 9.1.2
|
||||
'@react-three/postprocessing':
|
||||
specifier: ^3.0.4
|
||||
version: 3.0.4
|
||||
'@react-three/rapier':
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
'@tailwindcss/postcss':
|
||||
specifier: ^4.1.10
|
||||
version: 4.1.10
|
||||
'@tailwindcss/typography':
|
||||
specifier: ^0.5.16
|
||||
version: 0.5.16
|
||||
'@tanstack/react-form':
|
||||
specifier: ^1.12.3
|
||||
version: 1.12.3
|
||||
'@tanstack/react-query':
|
||||
specifier: ^5.80.10
|
||||
version: 5.80.10
|
||||
'@tanstack/react-query-devtools':
|
||||
specifier: ^5.80.10
|
||||
version: 5.80.10
|
||||
'@types/canvas-confetti':
|
||||
specifier: ^1.9.0
|
||||
version: 1.9.0
|
||||
'@types/react':
|
||||
specifier: ^19.1.8
|
||||
version: 19.1.8
|
||||
'@types/react-dom':
|
||||
specifier: ^19.1.6
|
||||
version: 19.1.6
|
||||
'@types/three':
|
||||
specifier: ^0.177.0
|
||||
version: 0.177.0
|
||||
autoprefixer:
|
||||
specifier: ^10.4.21
|
||||
version: 10.4.21
|
||||
canvas-confetti:
|
||||
specifier: ^1.9.3
|
||||
version: 1.9.3
|
||||
class-variance-authority:
|
||||
specifier: ^0.7.1
|
||||
version: 0.7.1
|
||||
clsx:
|
||||
specifier: ^2.1.1
|
||||
version: 2.1.1
|
||||
hast-util-to-jsx-runtime:
|
||||
specifier: ^2.3.6
|
||||
version: 2.3.6
|
||||
ky:
|
||||
specifier: 1.8.1
|
||||
version: 1.8.1
|
||||
octokit:
|
||||
specifier: ^5.0.3
|
||||
version: 5.0.3
|
||||
p-all:
|
||||
specifier: ^5.0.0
|
||||
version: 5.0.0
|
||||
postgres:
|
||||
specifier: ^3.4.7
|
||||
version: 3.4.7
|
||||
restore-cursor:
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0
|
||||
semver:
|
||||
specifier: ^7.7.2
|
||||
version: 7.7.2
|
||||
lucide-react:
|
||||
specifier: ^0.518.0
|
||||
version: 0.518.0
|
||||
motion:
|
||||
specifier: ^12.18.1
|
||||
version: 12.18.1
|
||||
next:
|
||||
specifier: ^15.3.4
|
||||
version: 15.3.4
|
||||
next-themes:
|
||||
specifier: ^0.4.6
|
||||
version: 0.4.6
|
||||
postcss:
|
||||
specifier: ^8.5.6
|
||||
version: 8.5.6
|
||||
posthog-js:
|
||||
specifier: ^1.255.0
|
||||
version: 1.255.0
|
||||
react:
|
||||
specifier: ^19.1.0
|
||||
version: 19.1.0
|
||||
react-dom:
|
||||
specifier: ^19.1.0
|
||||
version: 19.1.0
|
||||
react-infinite-scroll-hook:
|
||||
specifier: ^6.0.1
|
||||
version: 6.0.1
|
||||
react-lottie-player:
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
react-use:
|
||||
specifier: ^17.6.0
|
||||
version: 17.6.0
|
||||
server-only:
|
||||
specifier: ^0.0.1
|
||||
version: 0.0.1
|
||||
shiki:
|
||||
specifier: ^3.7.0
|
||||
version: 3.7.0
|
||||
sonner:
|
||||
specifier: ^2.0.5
|
||||
version: 2.0.5
|
||||
stripe:
|
||||
specifier: ^18.2.1
|
||||
version: 18.2.1
|
||||
suspend-react:
|
||||
specifier: ^0.1.3
|
||||
version: 0.1.3
|
||||
tailwind-merge:
|
||||
specifier: ^3.3.1
|
||||
version: 3.3.1
|
||||
tailwindcss:
|
||||
specifier: ^4.1.10
|
||||
version: 4.1.10
|
||||
three:
|
||||
specifier: ^0.177.0
|
||||
version: 0.177.0
|
||||
tw-animate-css:
|
||||
specifier: ^1.3.4
|
||||
version: 1.3.4
|
||||
type-fest:
|
||||
specifier: ^4.41.0
|
||||
version: 4.41.0
|
||||
zod-validation-error:
|
||||
specifier: ^3.5.2
|
||||
version: 3.5.2
|
||||
|
||||
importers:
|
||||
|
||||
|
@ -347,6 +428,9 @@ importers:
|
|||
'@agentic/platform-validators':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/validators
|
||||
'@date-fns/utc':
|
||||
specifier: ^2.1.0
|
||||
version: 2.1.0
|
||||
'@number-flow/react':
|
||||
specifier: 'catalog:'
|
||||
version: 0.5.10(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
|
@ -404,6 +488,9 @@ importers:
|
|||
clsx:
|
||||
specifier: 'catalog:'
|
||||
version: 2.1.1
|
||||
date-fns:
|
||||
specifier: ^4.1.0
|
||||
version: 4.1.0
|
||||
hast-util-to-jsx-runtime:
|
||||
specifier: 'catalog:'
|
||||
version: 2.3.6
|
||||
|
@ -1037,6 +1124,9 @@ packages:
|
|||
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
'@date-fns/utc@2.1.0':
|
||||
resolution: {integrity: sha512-176grgAgU2U303rD2/vcOmNg0kGPbhzckuH1TEP2al7n0AQipZIy9P15usd2TKQCG1g+E1jX/ZVQSzs4sUDwgA==}
|
||||
|
||||
'@dimforge/rapier3d-compat@0.12.0':
|
||||
resolution: {integrity: sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==}
|
||||
|
||||
|
@ -4148,6 +4238,9 @@ packages:
|
|||
resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
date-fns@4.1.0:
|
||||
resolution: {integrity: sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg==}
|
||||
|
||||
debounce-fn@6.0.0:
|
||||
resolution: {integrity: sha512-rBMW+F2TXryBwB54Q0d8drNEI+TfoS9JpNTAoVpukbWEhjXQq4rySFYLaqXMFXwdv61Zb2OHtj5bviSoimqxRQ==}
|
||||
engines: {node: '>=18'}
|
||||
|
@ -7849,6 +7942,8 @@ snapshots:
|
|||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.9
|
||||
|
||||
'@date-fns/utc@2.1.0': {}
|
||||
|
||||
'@dimforge/rapier3d-compat@0.12.0': {}
|
||||
|
||||
'@dimforge/rapier3d-compat@0.15.0': {}
|
||||
|
@ -10735,6 +10830,8 @@ snapshots:
|
|||
es-errors: 1.3.0
|
||||
is-data-view: 1.0.2
|
||||
|
||||
date-fns@4.1.0: {}
|
||||
|
||||
debounce-fn@6.0.0:
|
||||
dependencies:
|
||||
mimic-function: 5.0.1
|
||||
|
@ -11053,7 +11150,7 @@ snapshots:
|
|||
|
||||
esbuild-register@3.6.0(esbuild@0.25.5):
|
||||
dependencies:
|
||||
debug: 4.4.1
|
||||
debug: 4.4.1(supports-color@10.0.0)
|
||||
esbuild: 0.25.5
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
@ -12575,7 +12672,7 @@ snapshots:
|
|||
micromark@4.0.2:
|
||||
dependencies:
|
||||
'@types/debug': 4.1.12
|
||||
debug: 4.4.1(supports-color@10.0.0)
|
||||
debug: 4.4.1
|
||||
decode-named-character-reference: 1.2.0
|
||||
devlop: 1.1.0
|
||||
micromark-core-commonmark: 2.0.3
|
||||
|
@ -13385,7 +13482,7 @@ snapshots:
|
|||
|
||||
require-in-the-middle@7.5.2:
|
||||
dependencies:
|
||||
debug: 4.4.1
|
||||
debug: 4.4.1(supports-color@10.0.0)
|
||||
module-details-from-path: 1.0.4
|
||||
resolve: 1.22.10
|
||||
transitivePeerDependencies:
|
||||
|
|
|
@ -3,16 +3,13 @@ packages:
|
|||
- apps/*
|
||||
- examples/*
|
||||
- packages/fixtures/valid/*
|
||||
ignoredBuiltDependencies:
|
||||
- '@fisch0920/config'
|
||||
onlyBuiltDependencies:
|
||||
- '@sentry/cli'
|
||||
|
||||
catalog:
|
||||
'@agentic/core': ^7.6.7
|
||||
'@agentic/serper': ^7.6.7
|
||||
'@ai-sdk/openai': ^1.3.22
|
||||
'@apideck/better-ajv-errors': ^0.3.6
|
||||
'@clack/prompts': ^0.11.0
|
||||
'@clack/prompts': 0.11.0
|
||||
'@cloudflare/workers-types': ^4.20250620.0
|
||||
'@commander-js/extra-typings': ^14.0.0
|
||||
'@dotenvx/dotenvx': ^1.45.1
|
||||
|
@ -148,3 +145,9 @@ catalog:
|
|||
zod: ^3.25.67
|
||||
zod-to-json-schema: ^3.24.5
|
||||
zod-validation-error: ^3.5.2
|
||||
|
||||
ignoredBuiltDependencies:
|
||||
- '@fisch0920/config'
|
||||
|
||||
onlyBuiltDependencies:
|
||||
- '@sentry/cli'
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
- RateLimit-Policy: "burst";q=100;w=60,"daily";q=1000;w=86400
|
||||
- https://datatracker.ietf.org/doc/draft-ietf-httpapi-ratelimit-headers/
|
||||
- make json `$schema` public for `agentic.config.json`
|
||||
- handle hosting of deployment and user images
|
||||
|
||||
## Connect
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue