feat: WIP add cli and core packages

pull/715/head
Travis Fischer 2025-05-19 22:19:34 +07:00
rodzic d8e1a3087f
commit d0539ecaff
68 zmienionych plików z 493 dodań i 92 usunięć

Wyświetl plik

@ -0,0 +1,16 @@
import { config } from '@fisch0920/config/eslint'
import drizzle from 'eslint-plugin-drizzle'
export default [
...config,
{
files: ['**/*.ts', '**/*.tsx'],
ignores: ['**/out/**'],
plugins: {
drizzle
},
rules: {
...drizzle.configs.recommended.rules
}
}
]

Wyświetl plik

@ -1,5 +1,5 @@
{
"name": "agentic-platform-api",
"name": "@agentic/platform-api",
"private": true,
"version": "0.1.0",
"description": "Agentic platform API.",
@ -12,20 +12,11 @@
},
"type": "module",
"source": "./src/server.ts",
"types": "./dist/server.d.ts",
"bin": {
"agentic-platform-api": "./dist/server.js"
},
"exports": {
".": {
"types": "./dist/server.d.ts",
"import": "./dist/server.js",
"default": "./dist/server.js"
"import": "./src/server.ts"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
@ -36,6 +27,7 @@
"test:unit": "vitest run"
},
"dependencies": {
"@agentic/platform-core": "workspace:*",
"@agentic/validators": "workspace:*",
"@fisch0920/drizzle-orm": "^0.43.7",
"@fisch0920/drizzle-zod": "^0.7.9",
@ -49,7 +41,6 @@
"bcryptjs": "^3.0.2",
"eventid": "^2.0.1",
"exit-hook": "catalog:",
"hash-object": "^5.0.1",
"hono": "^4.7.9",
"jsonwebtoken": "^9.0.2",
"p-all": "^5.0.0",
@ -59,7 +50,6 @@
"semver": "^7.7.2",
"stripe": "^18.1.0",
"type-fest": "catalog:",
"zod": "catalog:",
"zod-validation-error": "^3.4.1"
},
"devDependencies": {

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { consumerTokenParamsSchema, populateConsumerSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -10,7 +11,6 @@ import {
openapiErrorResponse410,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { parseZodSchema } from '@/lib/utils'
const route = createRoute({
description: 'Creates a new consumer by subscribing a customer to a project.',

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { consumerIdParamsSchema, populateConsumerSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono, z } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { projectIdParamsSchema } from '../projects/schemas'
import { paginationAndPopulateConsumerSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -9,7 +10,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { consumerIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -10,7 +11,6 @@ import {
openapiErrorResponse410,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { parseZodSchema } from '@/lib/utils'
import { consumerIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema, pick, sha256 } from '@agentic/platform-core'
import { validators } from '@agentic/validators'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
@ -14,7 +15,6 @@ import {
openapiErrorResponse409,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema, pick, sha256 } from '@/lib/utils'
import { createDeploymentQuerySchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -9,7 +10,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { deploymentIdParamsSchema, populateDeploymentSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono, z } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -6,7 +7,6 @@ import {
openapiAuthenticatedSecuritySchemas,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { parseZodSchema } from '@/lib/utils'
import { paginationAndPopulateAndFilterDeploymentSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -10,7 +11,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { deploymentIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -9,7 +10,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { deploymentIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema, sha256 } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiAuthenticatedSecuritySchemas,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema, sha256 } from '@/lib/utils'
const route = createRoute({
description: 'Creates a new project.',

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { populateProjectSchema, projectIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono, z } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -7,7 +8,6 @@ import {
openapiAuthenticatedSecuritySchemas,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { parseZodSchema } from '@/lib/utils'
import { paginationAndPopulateProjectSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { projectIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiAuthenticatedSecuritySchemas,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
const route = createRoute({
description: 'Creates a team.',

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { teamSlugParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { teamSlugParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono, z } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -6,7 +7,6 @@ import {
openapiAuthenticatedSecuritySchemas,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { parseZodSchema } from '@/lib/utils'
const route = createRoute({
description: 'Lists all teams the authenticated user belongs to.',

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -9,7 +10,6 @@ import {
openapiErrorResponse409,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { teamSlugParamsSchema } from '../schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -9,7 +10,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { teamSlugTeamMemberUserIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -9,7 +10,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { teamSlugTeamMemberUserIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { teamSlugParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { userIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,3 +1,4 @@
import { assert, parseZodSchema } from '@agentic/platform-core'
import { createRoute, type OpenAPIHono } from '@hono/zod-openapi'
import type { AuthenticatedEnv } from '@/lib/types'
@ -8,7 +9,6 @@ import {
openapiErrorResponse404,
openapiErrorResponses
} from '@/lib/openapi-utils'
import { assert, parseZodSchema } from '@/lib/utils'
import { userIdParamsSchema } from './schemas'

Wyświetl plik

@ -1,11 +1,10 @@
import type { OpenAPIHono } from '@hono/zod-openapi'
import type Stripe from 'stripe'
import { assert,HttpError } from '@agentic/platform-core'
import { and, db, eq, schema } from '@/db'
import { env, isStripeLive } from '@/lib/env'
import { HttpError } from '@/lib/errors'
import { stripe } from '@/lib/stripe'
import { assert } from '@/lib/utils'
const relevantStripeEvents = new Set<Stripe.Event.Type>([
'customer.subscription.updated'

Wyświetl plik

@ -1,3 +1,4 @@
import { sha256 } from '@agentic/platform-core'
import { validators } from '@agentic/validators'
import { relations } from '@fisch0920/drizzle-orm'
import {
@ -10,8 +11,6 @@ import {
} from '@fisch0920/drizzle-orm/pg-core'
import { hashSync } from 'bcryptjs'
import { sha256 } from '@/lib/utils'
import { type AuthProviders, publicAuthProvidersSchema } from './schemas'
import { teams } from './team'
import {

Wyświetl plik

@ -1,3 +1,4 @@
import { hashObject } from '@agentic/platform-core'
import { type Equal, sql, type Writable } from '@fisch0920/drizzle-orm'
import {
pgEnum,
@ -13,8 +14,6 @@ import { createSchemaFactory } from '@fisch0920/drizzle-zod'
import { z } from '@hono/zod-openapi'
import { createId } from '@paralleldrive/cuid2'
import { hashObject } from '@/lib/utils'
import type { RawProject } from '../types'
import type {
PricingInterval,

Wyświetl plik

@ -1,6 +1,7 @@
import { assert } from '@agentic/platform-core'
import type { AuthenticatedContext } from './types'
import { ensureAuthUser } from './ensure-auth-user'
import { assert } from './utils'
export async function aclAdmin(ctx: AuthenticatedContext) {
const user = await ensureAuthUser(ctx)

Wyświetl plik

@ -1,8 +1,9 @@
import { assert } from '@agentic/platform-core'
import { and, db, eq, schema, type TeamMember } from '@/db'
import type { AuthenticatedContext } from './types'
import { ensureAuthUser } from './ensure-auth-user'
import { assert } from './utils'
export async function aclTeamAdmin(
ctx: AuthenticatedContext,

Wyświetl plik

@ -1,8 +1,9 @@
import { assert } from '@agentic/platform-core'
import { and, db, eq, type RawTeamMember, schema } from '@/db'
import type { AuthenticatedContext } from './types'
import { ensureAuthUser } from './ensure-auth-user'
import { assert } from './utils'
export async function aclTeamMember(
ctx: AuthenticatedContext,

Wyświetl plik

@ -1,6 +1,7 @@
import { assert } from '@agentic/platform-core'
import type { AuthenticatedContext } from './types'
import { ensureAuthUser } from './ensure-auth-user'
import { assert } from './utils'
export async function acl<
TModel extends Record<string, unknown>,

Wyświetl plik

@ -1,11 +1,11 @@
import { assert } from '@agentic/platform-core'
import { parseFaasIdentifier } from '@agentic/validators'
import type { AuthenticatedContext } from '@/lib/types'
import { and, db, eq, schema } from '@/db'
import { assert } from '@/lib/utils'
import { acl } from '@/lib/acl'
import { createConsumerToken } from '@/lib/create-consumer-token'
import type { AuthenticatedContext } from '../types'
import { acl } from '../acl'
import { createConsumerToken } from '../create-consumer-token'
import { upsertStripeConnectCustomer } from './upsert-stripe-connect-customer'
import { upsertStripeCustomer } from './upsert-stripe-customer'
import { upsertStripePricing } from './upsert-stripe-pricing'

Wyświetl plik

@ -1,8 +1,8 @@
import type Stripe from 'stripe'
import { assert } from '@agentic/platform-core'
import { db, eq, type RawConsumer, type RawProject, schema } from '@/db'
import { stripe } from '@/lib/stripe'
import { assert } from '@/lib/utils'
// TODO: Update this for the new / updated Stripe Connect API

Wyświetl plik

@ -1,10 +1,10 @@
import type Stripe from 'stripe'
import { assert } from '@agentic/platform-core'
import type { AuthenticatedContext } from '@/lib/types'
import { db, eq, type RawUser, schema } from '@/db'
import { ensureAuthUser } from '@/lib/ensure-auth-user'
import { stripe } from '@/lib/stripe'
import { assert } from '@/lib/utils'
export async function upsertStripeCustomer(ctx: AuthenticatedContext): Promise<{
user: RawUser

Wyświetl plik

@ -1,4 +1,5 @@
import type Stripe from 'stripe'
import { assert } from '@agentic/platform-core'
import pAll from 'p-all'
import { db, eq, type RawDeployment, type RawProject, schema } from '@/db'
@ -10,7 +11,6 @@ import {
type PricingPlanLineItem
} from '@/db/schema'
import { stripe } from '@/lib/stripe'
import { assert } from '@/lib/utils'
/**
* Upserts all the Stripe resources corresponding to a Deployment's pricing

Wyświetl plik

@ -1,5 +1,7 @@
import type Stripe from 'stripe'
import { assert } from '@agentic/platform-core'
import type { AuthenticatedContext } from '@/lib/types'
import {
type ConsumerUpdate,
db,
@ -12,9 +14,6 @@ import {
} from '@/db'
import { getStripePriceIdForPricingPlanLineItem } from '@/db/schema'
import { stripe } from '@/lib/stripe'
import { assert } from '@/lib/utils'
import type { AuthenticatedContext } from '../types'
export async function upsertStripeSubscription(
ctx: AuthenticatedContext,

Wyświetl plik

@ -1,4 +1,4 @@
import { sha256 } from './utils'
import { sha256 } from '@agentic/platform-core'
export function createConsumerToken(): string {
return sha256().slice(0, 24)

Wyświetl plik

@ -1,7 +1,7 @@
import { assert } from '@agentic/platform-core'
import semver from 'semver'
import type { RawProject } from '@/db/types'
import { assert } from '@/lib/utils'
export function normalizeDeploymentVersion({
deploymentId,

Wyświetl plik

@ -1,8 +1,9 @@
import { assert } from '@agentic/platform-core'
import type { AuthenticatedContext } from '@/lib/types'
import { db, eq, type RawDeployment, schema } from '@/db'
import { acl } from '@/lib/acl'
import { assert } from '@/lib/utils'
import type { AuthenticatedContext } from '../types'
import { normalizeDeploymentVersion } from './normalize-deployment-version'
export async function publishDeployment(

Wyświetl plik

@ -1,9 +1,9 @@
import { assert } from '@agentic/platform-core'
import { parseFaasIdentifier } from '@agentic/validators'
import type { AuthenticatedContext } from '@/lib/types'
import { db, eq, type RawDeployment, schema } from '@/db'
import { ensureAuthUser } from '@/lib/ensure-auth-user'
import { assert } from '@/lib/utils'
/**
* Attempts to find the Deployment matching the given identifier.

Wyświetl plik

@ -1,6 +1,7 @@
import { assert } from '@agentic/platform-core'
import type { DeploymentOriginAdapter } from '@/db/schema'
import type { Logger } from '@/lib/logger'
import { assert } from '@/lib/utils'
import { validateOpenAPISpec } from '@/lib/validate-openapi-spec'
/**

Wyświetl plik

@ -1,8 +1,8 @@
import { assert } from '@agentic/platform-core'
import type { AuthenticatedContext } from '@/lib/types'
import { db, eq, type RawUser, schema } from '@/db'
import { assert } from './utils'
export async function ensureAuthUser(
ctx: AuthenticatedContext
): Promise<RawUser> {

Wyświetl plik

@ -1,6 +1,6 @@
import { db, eq, schema } from '@/db'
import { assert } from '@agentic/platform-core'
import { assert } from './utils'
import { db, eq, schema } from '@/db'
export async function ensureUniqueTeamSlug(slug: string) {
slug = slug.toLocaleLowerCase()

Wyświetl plik

@ -1,9 +1,8 @@
import 'dotenv/config'
import { parseZodSchema } from '@agentic/platform-core'
import { z } from 'zod'
import { parseZodSchema } from './utils'
export const envSchema = z.object({
NODE_ENV: z
.enum(['development', 'test', 'production'])

Wyświetl plik

@ -1,3 +1,4 @@
import { assert } from '@agentic/platform-core'
import { createMiddleware } from 'hono/factory'
import * as jwt from 'hono/jwt'
@ -5,8 +6,6 @@ import type { AuthenticatedEnv } from '@/lib/types'
import { db, eq, schema } from '@/db'
import { env } from '@/lib/env'
import { assert } from '../utils'
export const authenticate = createMiddleware<AuthenticatedEnv>(
async function authenticateMiddleware(ctx, next) {
const credentials = ctx.req.raw.headers.get('Authorization')

Wyświetl plik

@ -1,12 +1,11 @@
import type { ContentfulStatusCode } from 'hono/utils/http-status'
import { HttpError } from '@agentic/platform-core'
import * as Sentry from '@sentry/node'
import { createMiddleware } from 'hono/factory'
import { HTTPException } from 'hono/http-exception'
import type { DefaultEnv } from '@/lib/types'
import { HttpError } from '@/lib/errors'
import { env } from '../env'
import { env } from '@/lib/env'
export const errorHandler = createMiddleware<DefaultEnv>(
async function errorHandlerMiddleware(ctx, next) {

Wyświetl plik

@ -2,8 +2,7 @@ import { EventId } from 'eventid'
import { createMiddleware } from 'hono/factory'
import type { DefaultEnv } from '@/lib/types'
import { ConsoleLogger } from '../logger'
import { ConsoleLogger } from '@/lib/logger'
/** Monotonically increasing ID for insertId. */
const eventId = new EventId()

Wyświetl plik

@ -1,11 +1,10 @@
import { assert } from '@agentic/platform-core'
import { and, eq } from '@fisch0920/drizzle-orm'
import { createMiddleware } from 'hono/factory'
import type { AuthenticatedEnv } from '@/lib/types'
import { db, schema } from '@/db'
import { aclTeamMember } from '../acl-team-member'
import { assert } from '../utils'
import { aclTeamMember } from '@/lib/acl-team-member'
export const team = createMiddleware<AuthenticatedEnv>(
async function teamMiddleware(ctx, next) {

Wyświetl plik

@ -38,3 +38,5 @@ initExitHooks({ server })
// eslint-disable-next-line no-console
console.log(`Server running on port ${env.PORT}`)
export { type ApiRoutes } from '@/api-v1'

Wyświetl plik

@ -6,6 +6,6 @@
"@/*": ["src/*"]
}
},
"include": ["src", "*.config.ts"],
"include": ["src", "*.config.ts", "../../packages/core/src/errors.ts"],
"exclude": ["node_modules", "dist"]
}

Wyświetl plik

@ -1,16 +1,11 @@
import { config } from '@fisch0920/config/eslint'
import drizzle from 'eslint-plugin-drizzle'
export default [
...config,
{
files: ['**/*.ts', '**/*.tsx'],
ignores: ['**/out/**'],
plugins: {
drizzle
},
rules: {
...drizzle.configs.recommended.rules,
'no-console': 'error',
'unicorn/no-array-reduce': 'off'
}

Wyświetl plik

@ -0,0 +1,43 @@
{
"name": "@agentic/cli",
"version": "0.0.1",
"description": "CLI for Agentic.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "UNLICENSED",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic-platform.git",
"directory": "packages/cli"
},
"type": "module",
"source": "./src/index.ts",
"types": "./src/index.ts",
"sideEffects": false,
"exports": {
".": "./src/index.ts"
},
"bin": {
"agentic": "./bin/run.js"
},
"scripts": {
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit",
"test:unit": "vitest run"
},
"dependencies": {
"@agentic/platform-core": "workspace:*",
"commander": "^14.0.0",
"conf": "^13.1.0",
"ora": "^8.2.0",
"restore-cursor": "catalog:",
"zod": "catalog:"
},
"devDependencies": {
"@agentic/platform-api": "workspace:*",
"@commander-js/extra-typings": "^14.0.0"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1,3 @@
declare module 'commander' {
export * from '@commander-js/extra-typings'
}

Wyświetl plik

@ -0,0 +1,13 @@
import { Command } from 'commander'
export const signin = new Command('login')
.alias('signin')
.description(
'Signs in to Agentic. If no credentials are provided, uses GitHub auth.'
)
.option('-u, --username <username>', 'account username')
.option('-e, --email <email>', 'account email')
.option('-p, --password <password>', 'account password')
.action(async (opts) => {
console.log('TODO: signin')
})

Wyświetl plik

@ -0,0 +1,12 @@
import { Command } from 'commander'
import { getAuth, requireAuth } from '../store'
export const whoami = new Command('whoami')
.description('Displays info about the current user')
.action(async (opts) => {
const auth = getAuth()
console.log(
JSON.stringify({ user: auth.user, team: auth.teamSlug }, null, 2)
)
})

Wyświetl plik

@ -0,0 +1,15 @@
import { Command } from 'commander'
import restoreCursor from 'restore-cursor'
import { signin } from './commands/signin'
async function main() {
restoreCursor()
const program = new Command()
program.addCommand(signin)
program.parse()
}
await main()

Wyświetl plik

@ -0,0 +1,62 @@
import { assert } from '@agentic/platform-core'
import Conf from 'conf'
export const store = new Conf({ projectName: 'agentic' })
export type Auth = {
token: string
user: string
teamId?: string
teamSlug?: string
}
const keyTeamId = 'teamId'
const keyTeamSlug = 'teamSlug'
const keyToken = 'token'
const keyUser = 'user'
export function isAuthenticated() {
return store.has(keyToken) && store.has(keyUser)
}
export function requireAuth() {
assert(
isAuthenticated(),
'Command requires authentication. Please login first.'
)
}
export function getAuth(): Auth {
requireAuth()
return {
token: store.get(keyToken),
user: store.get(keyUser),
teamId: store.get(keyTeamId),
teamSlug: store.get(keyTeamSlug)
} as Auth
}
export function signinUser({ token, user }: { token: string; user: string }) {
store.set(keyToken, token)
store.set(keyUser, user)
store.delete(keyTeamId)
store.delete(keyTeamSlug)
}
export function signout() {
store.delete(keyToken)
store.delete(keyUser)
store.delete(keyTeamId)
store.delete(keyTeamSlug)
}
export function switchTeam(team?: { id: string; slug: string }) {
if (team?.id) {
store.set(keyTeamId, team.id)
store.set(keyTeamSlug, team.slug)
} else {
store.delete(keyTeamId)
store.delete(keyTeamSlug)
}
}

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@fisch0920/config/tsconfig-node",
"include": ["src", "*.config.ts"],
"exclude": ["node_modules"]
}

Wyświetl plik

@ -0,0 +1,36 @@
{
"name": "@agentic/platform-core",
"version": "0.0.1",
"description": "Core utilities for the Agentic platform.",
"author": "Travis Fischer <travis@transitivebullsh.it>",
"license": "UNLICENSED",
"repository": {
"type": "git",
"url": "git+https://github.com/transitive-bullshit/agentic-platform.git",
"directory": "packages/cli"
},
"type": "module",
"source": "./src/index.ts",
"types": "./src/index.ts",
"sideEffects": false,
"exports": {
".": "./src/index.ts"
},
"scripts": {
"test": "run-s test:*",
"test:lint": "eslint .",
"test:typecheck": "tsc --noEmit",
"test:unit": "vitest run"
},
"dependencies": {
"hash-object": "^5.0.1",
"zod": "catalog:",
"zod-validation-error": "^3.4.1"
},
"devDependencies": {
"hono": "^4.7.9"
},
"publishConfig": {
"access": "public"
}
}

Wyświetl plik

@ -0,0 +1,2 @@
export * from './errors'
export * from './utils'

Wyświetl plik

@ -0,0 +1,5 @@
{
"extends": "@fisch0920/config/tsconfig-node",
"include": ["src", "*.config.ts"],
"exclude": ["node_modules"]
}

Wyświetl plik

@ -125,6 +125,9 @@ importers:
apps/api:
dependencies:
'@agentic/platform-core':
specifier: workspace:*
version: link:../../packages/core
'@agentic/validators':
specifier: workspace:*
version: link:../../packages/validators
@ -164,9 +167,6 @@ importers:
exit-hook:
specifier: 'catalog:'
version: 4.0.0
hash-object:
specifier: ^5.0.1
version: 5.0.1
hono:
specifier: ^4.7.9
version: 4.7.9
@ -194,9 +194,6 @@ importers:
type-fest:
specifier: 'catalog:'
version: 4.41.0
zod:
specifier: 'catalog:'
version: 3.24.4
zod-validation-error:
specifier: ^3.4.1
version: 3.4.1(zod@3.24.4)
@ -217,6 +214,50 @@ importers:
specifier: ^7.8.0
version: 7.8.0(typescript@5.8.3)
packages/cli:
dependencies:
'@agentic/platform-core':
specifier: workspace:*
version: link:../core
commander:
specifier: ^14.0.0
version: 14.0.0
conf:
specifier: ^13.1.0
version: 13.1.0
ora:
specifier: ^8.2.0
version: 8.2.0
restore-cursor:
specifier: 'catalog:'
version: 5.1.0
zod:
specifier: 'catalog:'
version: 3.24.4
devDependencies:
'@agentic/platform-api':
specifier: workspace:*
version: link:../../apps/api
'@commander-js/extra-typings':
specifier: ^14.0.0
version: 14.0.0(commander@14.0.0)
packages/core:
dependencies:
hash-object:
specifier: ^5.0.1
version: 5.0.1
zod:
specifier: 'catalog:'
version: 3.24.4
zod-validation-error:
specifier: ^3.4.1
version: 3.4.1(zod@3.24.4)
devDependencies:
hono:
specifier: ^4.7.9
version: 4.7.9
packages/validators:
dependencies:
'@paralleldrive/cuid2':
@ -248,6 +289,11 @@ packages:
resolution: {integrity: sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==}
engines: {node: '>=6.9.0'}
'@commander-js/extra-typings@14.0.0':
resolution: {integrity: sha512-hIn0ncNaJRLkZrxBIp5AsW/eXEHNKYQBh0aPdoUqNgD+Io3NIykQqpKFyKcuasZhicGaEZJX/JBSIkZ4e5x8Dg==}
peerDependencies:
commander: ~14.0.0
'@drizzle-team/brocli@0.10.2':
resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==}
@ -1279,9 +1325,20 @@ packages:
resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==}
engines: {node: '>= 14'}
ajv-formats@3.0.1:
resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}
peerDependencies:
ajv: ^8.0.0
peerDependenciesMeta:
ajv:
optional: true
ajv@6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
ajv@8.17.1:
resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
ansi-colors@4.1.3:
resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==}
engines: {node: '>=6'}
@ -1359,6 +1416,9 @@ packages:
resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==}
engines: {node: '>= 0.4'}
atomically@2.0.3:
resolution: {integrity: sha512-kU6FmrwZ3Lx7/7y3hPS5QnbJfaohcIul5fGqf7ok+4KklIEk9tJ0C2IQPdacSbVUWv6zVHXEBWoWd6NrVMT7Cw==}
available-typed-arrays@1.0.7:
resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==}
engines: {node: '>= 0.4'}
@ -1478,6 +1538,10 @@ packages:
resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==}
engines: {node: '>=18'}
cli-spinners@2.9.2:
resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==}
engines: {node: '>=6'}
cli-truncate@4.0.0:
resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==}
engines: {node: '>=18'}
@ -1499,6 +1563,10 @@ packages:
resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==}
engines: {node: '>=18'}
commander@14.0.0:
resolution: {integrity: sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==}
engines: {node: '>=20'}
commander@4.1.1:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
engines: {node: '>= 6'}
@ -1506,6 +1574,10 @@ packages:
concat-map@0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
conf@13.1.0:
resolution: {integrity: sha512-Bi6v586cy1CoTFViVO4lGTtx780lfF96fUmS1lSX6wpZf6330NvHUu6fReVuDP1de8Mg0nkZb01c8tAQdz1o3w==}
engines: {node: '>=18'}
consola@3.4.2:
resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==}
engines: {node: ^14.18.0 || >=16.10.0}
@ -1552,6 +1624,10 @@ packages:
resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==}
engines: {node: '>= 0.4'}
debounce-fn@6.0.0:
resolution: {integrity: sha512-rBMW+F2TXryBwB54Q0d8drNEI+TfoS9JpNTAoVpukbWEhjXQq4rySFYLaqXMFXwdv61Zb2OHtj5bviSoimqxRQ==}
engines: {node: '>=18'}
debug@3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
@ -1614,6 +1690,10 @@ packages:
resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==}
engines: {node: '>=0.10.0'}
dot-prop@9.0.0:
resolution: {integrity: sha512-1gxPBJpI/pcjQhKgIU91II6Wkay+dLcN3M6rf2uwP8hRur3HtQXjVrdAK3sjC0piaEuxzMwjXChcETiJl47lAQ==}
engines: {node: '>=18'}
dotenv@16.5.0:
resolution: {integrity: sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg==}
engines: {node: '>=12'}
@ -1744,6 +1824,10 @@ packages:
resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==}
engines: {node: '>= 0.8'}
env-paths@3.0.0:
resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
environment@1.1.0:
resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==}
engines: {node: '>=18'}
@ -2002,6 +2086,9 @@ packages:
fast-levenshtein@2.0.6:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
fast-uri@3.0.6:
resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==}
fastq@1.19.1:
resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
@ -2288,6 +2375,10 @@ packages:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
engines: {node: '>=0.10.0'}
is-interactive@2.0.0:
resolution: {integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==}
engines: {node: '>=12'}
is-map@2.0.3:
resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==}
engines: {node: '>= 0.4'}
@ -2347,6 +2438,14 @@ packages:
resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==}
engines: {node: '>= 0.4'}
is-unicode-supported@1.3.0:
resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==}
engines: {node: '>=12'}
is-unicode-supported@2.1.0:
resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==}
engines: {node: '>=18'}
is-weakmap@2.0.2:
resolution: {integrity: sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==}
engines: {node: '>= 0.4'}
@ -2414,6 +2513,9 @@ packages:
json-schema-traverse@1.0.0:
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
json-schema-typed@8.0.1:
resolution: {integrity: sha512-XQmWYj2Sm4kn4WeTYvmpKEbyPsL7nBsb647c7pMe6l02/yx2+Jfc4dT6UZkEXnIUb5LhD55r2HPsJ1milQ4rDg==}
json-stable-stringify-without-jsonify@1.0.1:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
@ -2500,6 +2602,10 @@ packages:
lodash.sortby@4.7.0:
resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==}
log-symbols@6.0.0:
resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==}
engines: {node: '>=18'}
log-update@6.1.0:
resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==}
engines: {node: '>=18'}
@ -2684,6 +2790,10 @@ packages:
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
engines: {node: '>= 0.8.0'}
ora@8.2.0:
resolution: {integrity: sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==}
engines: {node: '>=18'}
own-keys@1.0.1:
resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==}
engines: {node: '>= 0.4'}
@ -3114,6 +3224,10 @@ packages:
std-env@3.9.0:
resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==}
stdin-discarder@0.2.2:
resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}
engines: {node: '>=18'}
string-argv@0.3.2:
resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}
engines: {node: '>=0.6.19'}
@ -3182,6 +3296,9 @@ packages:
'@types/node':
optional: true
stubborn-fs@1.2.5:
resolution: {integrity: sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==}
sucrase@3.35.0:
resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==}
engines: {node: '>=16 || 14 >=14.17'}
@ -3366,6 +3483,10 @@ packages:
engines: {node: '>=14.17'}
hasBin: true
uint8array-extras@1.4.0:
resolution: {integrity: sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==}
engines: {node: '>=18'}
unbox-primitive@1.1.0:
resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==}
engines: {node: '>= 0.4'}
@ -3495,6 +3616,9 @@ packages:
whatwg-url@7.1.0:
resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==}
when-exit@2.1.4:
resolution: {integrity: sha512-4rnvd3A1t16PWzrBUcSDZqcAmsUIy4minDXT/CZ8F2mVDgd65i4Aalimgz1aQkRGU0iH5eT5+6Rx2TK8o443Pg==}
which-boxed-primitive@1.1.1:
resolution: {integrity: sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==}
engines: {node: '>= 0.4'}
@ -3602,6 +3726,10 @@ snapshots:
dependencies:
regenerator-runtime: 0.14.1
'@commander-js/extra-typings@14.0.0(commander@14.0.0)':
dependencies:
commander: 14.0.0
'@drizzle-team/brocli@0.10.2': {}
'@esbuild-kit/core-utils@3.3.2':
@ -4532,6 +4660,10 @@ snapshots:
agent-base@7.1.3: {}
ajv-formats@3.0.1(ajv@8.17.1):
optionalDependencies:
ajv: 8.17.1
ajv@6.12.6:
dependencies:
fast-deep-equal: 3.1.3
@ -4539,6 +4671,13 @@ snapshots:
json-schema-traverse: 0.4.1
uri-js: 4.4.1
ajv@8.17.1:
dependencies:
fast-deep-equal: 3.1.3
fast-uri: 3.0.6
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
ansi-colors@4.1.3: {}
ansi-escapes@7.0.0:
@ -4632,6 +4771,11 @@ snapshots:
async-function@1.0.0: {}
atomically@2.0.3:
dependencies:
stubborn-fs: 1.2.5
when-exit: 2.1.4
available-typed-arrays@1.0.7:
dependencies:
possible-typed-array-names: 1.1.0
@ -4749,6 +4893,8 @@ snapshots:
dependencies:
restore-cursor: 5.1.0
cli-spinners@2.9.2: {}
cli-truncate@4.0.0:
dependencies:
slice-ansi: 5.0.0
@ -4766,10 +4912,24 @@ snapshots:
commander@13.1.0: {}
commander@14.0.0: {}
commander@4.1.1: {}
concat-map@0.0.1: {}
conf@13.1.0:
dependencies:
ajv: 8.17.1
ajv-formats: 3.0.1(ajv@8.17.1)
atomically: 2.0.3
debounce-fn: 6.0.0
dot-prop: 9.0.0
env-paths: 3.0.0
json-schema-typed: 8.0.1
semver: 7.7.2
uint8array-extras: 1.4.0
consola@3.4.2: {}
content-disposition@1.0.0:
@ -4817,6 +4977,10 @@ snapshots:
es-errors: 1.3.0
is-data-view: 1.0.2
debounce-fn@6.0.0:
dependencies:
mimic-function: 5.0.1
debug@3.2.7:
dependencies:
ms: 2.1.3
@ -4869,6 +5033,10 @@ snapshots:
dependencies:
esutils: 2.0.3
dot-prop@9.0.0:
dependencies:
type-fest: 4.41.0
dotenv@16.5.0: {}
drizzle-kit@0.31.1:
@ -4912,6 +5080,8 @@ snapshots:
encodeurl@2.0.0: {}
env-paths@3.0.0: {}
environment@1.1.0: {}
es-abstract@1.23.9:
@ -5367,6 +5537,8 @@ snapshots:
fast-levenshtein@2.0.6: {}
fast-uri@3.0.6: {}
fastq@1.19.1:
dependencies:
reusify: 1.1.0
@ -5667,6 +5839,8 @@ snapshots:
dependencies:
is-extglob: 2.1.1
is-interactive@2.0.0: {}
is-map@2.0.3: {}
is-number-object@1.1.1:
@ -5718,6 +5892,10 @@ snapshots:
dependencies:
which-typed-array: 1.1.19
is-unicode-supported@1.3.0: {}
is-unicode-supported@2.1.0: {}
is-weakmap@2.0.2: {}
is-weakref@1.1.1:
@ -5772,6 +5950,8 @@ snapshots:
json-schema-traverse@1.0.0: {}
json-schema-typed@8.0.1: {}
json-stable-stringify-without-jsonify@1.0.1: {}
json5@1.0.2:
@ -5876,6 +6056,11 @@ snapshots:
lodash.sortby@4.7.0: {}
log-symbols@6.0.0:
dependencies:
chalk: 5.4.1
is-unicode-supported: 1.3.0
log-update@6.1.0:
dependencies:
ansi-escapes: 7.0.0
@ -6063,6 +6248,18 @@ snapshots:
type-check: 0.4.0
word-wrap: 1.2.5
ora@8.2.0:
dependencies:
chalk: 5.4.1
cli-cursor: 5.0.0
cli-spinners: 2.9.2
is-interactive: 2.0.0
is-unicode-supported: 2.1.0
log-symbols: 6.0.0
stdin-discarder: 0.2.2
string-width: 7.2.0
strip-ansi: 7.1.0
own-keys@1.0.1:
dependencies:
get-intrinsic: 1.3.0
@ -6507,6 +6704,8 @@ snapshots:
std-env@3.9.0: {}
stdin-discarder@0.2.2: {}
string-argv@0.3.2: {}
string-width@4.2.3:
@ -6599,6 +6798,8 @@ snapshots:
optionalDependencies:
'@types/node': 22.15.18
stubborn-fs@1.2.5: {}
sucrase@3.35.0:
dependencies:
'@jridgewell/gen-mapping': 0.3.8
@ -6793,6 +6994,8 @@ snapshots:
typescript@5.8.3: {}
uint8array-extras@1.4.0: {}
unbox-primitive@1.1.0:
dependencies:
call-bound: 1.0.4
@ -6922,6 +7125,8 @@ snapshots:
tr46: 1.0.1
webidl-conversions: 4.0.2
when-exit@2.1.4: {}
which-boxed-primitive@1.1.1:
dependencies:
is-bigint: 1.1.0