feat: HLS streaming, transcripts, agent course generation & landing-page course previews (#663)
New features: - HLS video encoding/streaming (hls routes, hls-encoder) and a media transcripts pipeline (transcripts route + media-transcript queries) - AI assistant chat vs. run model: agent-course-generation worker/queue, run-monitor pane, chat-changes card, content ask-ai bar - Per-theme course-page previews across org landing-page themes (bold, classic, corporate, editorial, etc.) with a shared course token/component set - View-as-student mode and login-link / link-invite invite flows Refactor: - Extract packages/core consolidating config (env, storage, dashboard-url), services and utils previously duplicated under apps/api/src/config - Remove legacy agent service modules (chat-tools, chat-context, context-window, document, fetch-url, lesson-content) - Relax Cross-Origin-Resource-Policy to allow cross-origin media embedding - Add format script to tenant-router so turbo run format covers it
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { ErrorCodes, type ErrorCode } from '../constants';
|
||||
|
||||
export { ErrorCodes, type ErrorCode };
|
||||
|
||||
/**
|
||||
* Standard HTTP status code value. Kept as a structural `number` so this
|
||||
* module stays free of HTTP-framework deps (hono). The api layer narrows
|
||||
* this when handing the value to its response helpers.
|
||||
*/
|
||||
export type AppErrorStatusCode = number;
|
||||
|
||||
/**
|
||||
* Standard application error with code for easy identification.
|
||||
*
|
||||
* Lives in `@cio/utils/errors` so it can be thrown from any workspace package
|
||||
* (notably `@cio/core`) without those packages depending on `@cio/api`.
|
||||
* HTTP-shaped helpers like `handleError` stay in `@cio/api`.
|
||||
*/
|
||||
export class AppError extends Error {
|
||||
constructor(
|
||||
error: string | Error,
|
||||
public code: string,
|
||||
public statusCode: AppErrorStatusCode = 500,
|
||||
public field?: string
|
||||
) {
|
||||
super(error instanceof Error ? error.message : error);
|
||||
this.name = 'AppError';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user