briyah 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/LLM/anthropic.service.d.ts +1 -1
- package/dist/ai/LLM/base-ai.service.d.ts +1 -1
- package/dist/ai/LLM/deepseek.service.d.ts +1 -1
- package/dist/ai/LLM/deepseek.service.js +1 -1
- package/dist/ai/LLM/fal.service.d.ts +1 -1
- package/dist/ai/LLM/googleai.service.d.ts +1 -1
- package/dist/ai/LLM/grok.service.d.ts +1 -1
- package/dist/ai/LLM/mock.service.d.ts +1 -1
- package/dist/ai/LLM/openai.service.d.ts +1 -1
- package/dist/ai/LLM/together.service.d.ts +1 -1
- package/dist/ai/LLM/vertexai.service.d.ts +1 -1
- package/dist/ai/agent.d.ts +1 -1
- package/dist/ai/agent.js +1 -1
- package/dist/ai/artifact.service.d.ts +1 -1
- package/dist/app/stripe.controller.d.ts +1 -1
- package/dist/app/stripe.controller.js +1 -1
- package/dist/app/transaction.service.d.ts +1 -1
- package/dist/app.controller.d.ts +1 -1
- package/dist/app.controller.js +1 -1
- package/dist/app.service.d.ts +2 -2
- package/dist/app.service.js +1 -1
- package/dist/main.js +1 -1
- package/dist/room/message.d.ts +1 -1
- package/dist/room/message.js +1 -1
- package/dist/room/room-store.service.d.ts +1 -1
- package/dist/room/room.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/server/src/ai/LLM/anthropic.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/base-ai.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/deepseek.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/deepseek.service.js +1 -1
- package/dist/server/src/ai/LLM/fal.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/googleai.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/grok.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/mock.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/openai.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/together.service.d.ts +1 -1
- package/dist/server/src/ai/LLM/vertexai.service.d.ts +1 -1
- package/dist/server/src/ai/agent.d.ts +1 -1
- package/dist/server/src/ai/agent.js +1 -1
- package/dist/server/src/ai/artifact.service.d.ts +1 -1
- package/dist/server/src/app/stripe.controller.d.ts +1 -1
- package/dist/server/src/app/transaction.service.d.ts +1 -1
- package/dist/server/src/app.controller.d.ts +1 -1
- package/dist/server/src/app.service.d.ts +2 -2
- package/dist/server/src/app.service.js +1 -1
- package/dist/server/src/room/message.d.ts +1 -1
- package/dist/server/src/room/message.js +1 -1
- package/dist/server/src/room/room-store.service.d.ts +1 -1
- package/dist/server/src/room/room.js +1 -1
- package/dist/server/src/sdk/index.d.ts +1 -1
- package/dist/server/src/story/story-message.service.d.ts +1 -1
- package/dist/server/src/story/story-store.service.d.ts +1 -1
- package/dist/server/src/story/story.service.d.ts +1 -1
- package/dist/server/src/story/story.service.js +1 -1
- package/dist/story/story-message.service.d.ts +1 -1
- package/dist/story/story-store.service.d.ts +1 -1
- package/dist/story/story.service.d.ts +1 -1
- package/dist/story/story.service.js +1 -1
- package/package.json +3 -2
|
@@ -5,7 +5,7 @@ import { ConfigurationService } from '../../config/configuration.service';
|
|
|
5
5
|
import { AgentStoreService } from '../agent-store.service';
|
|
6
6
|
import { BalanceService } from '../../app/balance.service';
|
|
7
7
|
import { ArtifactService } from '../artifact.service';
|
|
8
|
-
import { ModelInfo } from '
|
|
8
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
9
9
|
export declare class AnthropicAiService extends BaseAiService {
|
|
10
10
|
protected anthropic: Anthropic;
|
|
11
11
|
constructor();
|
|
@@ -3,7 +3,7 @@ import { ConfigurationService } from '../../config/configuration.service';
|
|
|
3
3
|
import { ArtifactService } from '../artifact.service';
|
|
4
4
|
import { AgentStoreService } from '../agent-store.service';
|
|
5
5
|
import { BalanceService } from '../../app/balance.service';
|
|
6
|
-
import { ModelInfo } from '
|
|
6
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
7
7
|
export interface ImageGenerationOptions {
|
|
8
8
|
model?: string;
|
|
9
9
|
size?: '1024x1024' | '1536x1024' | '1024x1536' | 'auto';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createDeepSeek } from '@ai-sdk/deepseek';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
3
|
import { BaseAiService } from './base-ai.service';
|
|
4
|
-
import { ModelInfo } from '
|
|
4
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
5
5
|
export declare class DeepSeekAiService extends BaseAiService {
|
|
6
6
|
protected deepseekClient: ReturnType<typeof createDeepSeek>;
|
|
7
7
|
constructor();
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.DeepSeekAiService = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const deepseek_1 = require("@ai-sdk/deepseek");
|
|
18
|
-
const ai_1 = require("ai");
|
|
18
|
+
const ai_1 = require("../../ai");
|
|
19
19
|
const base_ai_service_1 = require("./base-ai.service");
|
|
20
20
|
const zod_1 = require("zod");
|
|
21
21
|
const model_prices_1 = __importDefault(require("../model_prices"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
4
4
|
export declare class FalAiService extends BaseAiService {
|
|
5
5
|
constructor();
|
|
6
6
|
getServiceName(): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
4
4
|
export declare class GoogleAiService extends BaseAiService {
|
|
5
5
|
private googleAI;
|
|
6
6
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
4
4
|
export declare class GrokAiService extends BaseAiService {
|
|
5
5
|
private openai;
|
|
6
6
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
4
4
|
export declare class MockAiService extends BaseAiService {
|
|
5
5
|
constructor();
|
|
6
6
|
getServiceName(): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Agent } from '../agent';
|
|
2
2
|
import { BaseAiService } from './base-ai.service';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
4
4
|
export declare class OpenAiService extends BaseAiService {
|
|
5
5
|
private openai;
|
|
6
6
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
4
4
|
export declare class TogetherAiService extends BaseAiService {
|
|
5
5
|
private togetherClient;
|
|
6
6
|
constructor();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VertexAI } from '@google-cloud/vertexai';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
3
|
import { BaseAiService } from './base-ai.service';
|
|
4
|
-
import { ModelInfo } from '
|
|
4
|
+
import { ModelInfo } from '../../shared/types/app.types';
|
|
5
5
|
export declare class VertexAiService extends BaseAiService {
|
|
6
6
|
vertexAI: VertexAI;
|
|
7
7
|
constructor();
|
package/dist/ai/agent.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAI } from 'openai';
|
|
2
2
|
import { Assistant } from 'openai/resources/beta/assistants';
|
|
3
3
|
import { VectorStore } from 'openai/resources/vector-stores';
|
|
4
|
-
import { Message } from '
|
|
4
|
+
import { Message } from '../shared/types/app.types';
|
|
5
5
|
import { BaseAiService } from './LLM/base-ai.service';
|
|
6
6
|
import { FileMetadata } from './attached-file.service';
|
|
7
7
|
import { ArtifactService } from './artifact.service';
|
package/dist/ai/agent.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Agent = void 0;
|
|
4
|
-
const app_types_1 = require("
|
|
4
|
+
const app_types_1 = require("../shared/types/app.types");
|
|
5
5
|
const crypto_1 = require("crypto");
|
|
6
6
|
class Agent {
|
|
7
7
|
id;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '../config/configuration.service';
|
|
2
|
-
import { ArtifactMetadata } from '
|
|
2
|
+
import { ArtifactMetadata } from '../shared/types/app.types';
|
|
3
3
|
export declare class ArtifactService {
|
|
4
4
|
private readonly configService;
|
|
5
5
|
private readonly artifactsDir;
|
|
@@ -2,7 +2,7 @@ import { RawBodyRequest } from '@nestjs/common';
|
|
|
2
2
|
import { StripeService } from './stripe.service';
|
|
3
3
|
import { UserServiceManager } from './user-service-manager';
|
|
4
4
|
import type { Request as ExpressRequest } from 'express';
|
|
5
|
-
import { CreatePaymentIntentRequest, CreatePaymentIntentResponse, TransactionHistoryResponse, CreateCheckoutSessionRequest, CreateCheckoutSessionResponse } from '
|
|
5
|
+
import { CreatePaymentIntentRequest, CreatePaymentIntentResponse, TransactionHistoryResponse, CreateCheckoutSessionRequest, CreateCheckoutSessionResponse } from '../shared/types/app.types';
|
|
6
6
|
export declare class StripeController {
|
|
7
7
|
private readonly stripeService;
|
|
8
8
|
private readonly userServiceManager;
|
|
@@ -19,7 +19,7 @@ const stripe_service_1 = require("./stripe.service");
|
|
|
19
19
|
const user_service_manager_1 = require("./user-service-manager");
|
|
20
20
|
const jwt_auth_guard_1 = require("../auth/jwt-auth.guard");
|
|
21
21
|
const public_decorator_1 = require("../auth/public.decorator");
|
|
22
|
-
const app_types_1 = require("
|
|
22
|
+
const app_types_1 = require("../shared/types/app.types");
|
|
23
23
|
let StripeController = class StripeController {
|
|
24
24
|
stripeService;
|
|
25
25
|
userServiceManager;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '../config/configuration.service';
|
|
2
|
-
import { Transaction } from '
|
|
2
|
+
import { Transaction } from '../shared/types/app.types';
|
|
3
3
|
export declare class TransactionService {
|
|
4
4
|
private userId;
|
|
5
5
|
private configService;
|
package/dist/app.controller.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import { UserServiceManager } from './app/user-service-manager';
|
|
5
5
|
import { PublishedAgentsService } from './ai/published-agents.service';
|
|
6
6
|
import { PublishedRoomsService } from './room/published-rooms.service';
|
|
7
|
-
import { AgentInfo, CreateAgentResponse, UpdateAgentRequest, RoomInfo, RoomDetails, CreateRoomResponse, AgentMessagesResponse, RoomMessagesResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, CreatePromptFolderRequest, CreatePromptFileRequest, UpdatePromptFileRequest, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, StoryInfo, StoryState, Character, ModelInfo, StoryModelDefaults, ChapterInfo, StoryIdea } from '
|
|
7
|
+
import { AgentInfo, CreateAgentResponse, UpdateAgentRequest, RoomInfo, RoomDetails, CreateRoomResponse, AgentMessagesResponse, RoomMessagesResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, CreatePromptFolderRequest, CreatePromptFileRequest, UpdatePromptFileRequest, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, StoryInfo, StoryState, Character, ModelInfo, StoryModelDefaults, ChapterInfo, StoryIdea } from './shared/types/app.types';
|
|
8
8
|
import { RoomMessage } from './room/message';
|
|
9
9
|
export declare class AppController {
|
|
10
10
|
private readonly userServiceManager;
|
package/dist/app.controller.js
CHANGED
|
@@ -57,7 +57,7 @@ const user_service_manager_1 = require("./app/user-service-manager");
|
|
|
57
57
|
const published_agents_service_1 = require("./ai/published-agents.service");
|
|
58
58
|
const published_rooms_service_1 = require("./room/published-rooms.service");
|
|
59
59
|
const errors_1 = require("./common/errors");
|
|
60
|
-
const app_types_1 = require("
|
|
60
|
+
const app_types_1 = require("./shared/types/app.types");
|
|
61
61
|
const path = __importStar(require("path"));
|
|
62
62
|
let AppController = class AppController {
|
|
63
63
|
userServiceManager;
|
package/dist/app.service.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { StoryService } from './story/story.service';
|
|
|
12
12
|
import { ConfigurationService } from './config/configuration.service';
|
|
13
13
|
import { AttachedFileService } from './ai/attached-file.service';
|
|
14
14
|
import { ArtifactService } from './ai/artifact.service';
|
|
15
|
-
import { ArtifactMetadata, ModelInfo, ChapterInfo, StoryIdea } from '
|
|
15
|
+
import { ArtifactMetadata, ModelInfo, ChapterInfo, StoryIdea } from './shared/types/app.types';
|
|
16
16
|
import { PublishedAgentsService } from './ai/published-agents.service';
|
|
17
17
|
import { PublishedRoomsService } from './room/published-rooms.service';
|
|
18
18
|
import { BalanceService } from './app/balance.service';
|
|
@@ -21,7 +21,7 @@ import { TransactionService } from './app/transaction.service';
|
|
|
21
21
|
import { AgentFactory } from './ai/agent-factory';
|
|
22
22
|
import { RoomFactory } from './room/room-factory';
|
|
23
23
|
import { EventEmitter } from 'events';
|
|
24
|
-
import { AgentInfo, RoomInfo, RoomDetails, CreateRoomResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryInfo, StoryState, Character } from '
|
|
24
|
+
import { AgentInfo, RoomInfo, RoomDetails, CreateRoomResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryInfo, StoryState, Character } from './shared/types/app.types';
|
|
25
25
|
import { RoomMessage } from './room/message';
|
|
26
26
|
export declare class AppService {
|
|
27
27
|
private readonly aiFactoryService;
|
package/dist/app.service.js
CHANGED
|
@@ -37,7 +37,7 @@ exports.AppService = void 0;
|
|
|
37
37
|
const errors_1 = require("./common/errors");
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
|
-
const app_types_1 = require("
|
|
40
|
+
const app_types_1 = require("./shared/types/app.types");
|
|
41
41
|
const pdf_lib_1 = require("pdf-lib");
|
|
42
42
|
const message_1 = require("./room/message");
|
|
43
43
|
class AppService {
|
package/dist/main.js
CHANGED
package/dist/room/message.d.ts
CHANGED
package/dist/room/message.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RoomMessage = void 0;
|
|
4
|
-
const app_types_1 = require("
|
|
4
|
+
const app_types_1 = require("../shared/types/app.types");
|
|
5
5
|
class RoomMessage {
|
|
6
6
|
sender;
|
|
7
7
|
action;
|
|
@@ -2,7 +2,7 @@ import { Room } from './room';
|
|
|
2
2
|
import { ConfigurationService } from '../config/configuration.service';
|
|
3
3
|
import { AgentStoreService } from '../ai/agent-store.service';
|
|
4
4
|
import { AttachedFileService } from '../ai/attached-file.service';
|
|
5
|
-
import { RoomInfo } from '
|
|
5
|
+
import { RoomInfo } from '../shared/types/app.types';
|
|
6
6
|
import { RoomMessage } from './message';
|
|
7
7
|
import { ArtifactStoreService } from './artifact-store.service';
|
|
8
8
|
import { Artifact } from './artifact';
|
package/dist/room/room.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Room = void 0;
|
|
4
|
-
const app_types_1 = require("
|
|
4
|
+
const app_types_1 = require("../shared/types/app.types");
|
|
5
5
|
const message_1 = require("./message");
|
|
6
6
|
const crypto_1 = require("crypto");
|
|
7
7
|
const errors_1 = require("../common/errors");
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Briyah } from './briyah';
|
|
2
2
|
export { BriyahConfigService, BriyahConfigOptions } from './briyah-config';
|
|
3
3
|
export type { AppService } from '../app.service';
|
|
4
|
-
export type { AgentInfo, CreateAgentResponse, RoomInfo, RoomDetails, CreateRoomResponse, StoryInfo, CreateStoryResponse, ProcessTextResponse, FileList, PromptFileContent, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryState, Message, MessageAction, } from '
|
|
4
|
+
export type { AgentInfo, CreateAgentResponse, RoomInfo, RoomDetails, CreateRoomResponse, StoryInfo, CreateStoryResponse, ProcessTextResponse, FileList, PromptFileContent, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryState, Message, MessageAction, } from '../shared/types/app.types';
|
|
5
5
|
export { Agent } from '../ai/agent';
|
|
6
6
|
export { Room } from '../room/room';
|
|
@@ -5,7 +5,7 @@ import { ConfigurationService } from '../../config/configuration.service';
|
|
|
5
5
|
import { AgentStoreService } from '../agent-store.service';
|
|
6
6
|
import { BalanceService } from '../../app/balance.service';
|
|
7
7
|
import { ArtifactService } from '../artifact.service';
|
|
8
|
-
import { ModelInfo } from '
|
|
8
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
9
9
|
export declare class AnthropicAiService extends BaseAiService {
|
|
10
10
|
protected anthropic: Anthropic;
|
|
11
11
|
constructor();
|
|
@@ -3,7 +3,7 @@ import { ConfigurationService } from '../../config/configuration.service';
|
|
|
3
3
|
import { ArtifactService } from '../artifact.service';
|
|
4
4
|
import { AgentStoreService } from '../agent-store.service';
|
|
5
5
|
import { BalanceService } from '../../app/balance.service';
|
|
6
|
-
import { ModelInfo } from '
|
|
6
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
7
7
|
export interface ImageGenerationOptions {
|
|
8
8
|
model?: string;
|
|
9
9
|
size?: '1024x1024' | '1536x1024' | '1024x1536' | 'auto';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createDeepSeek } from '@ai-sdk/deepseek';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
3
|
import { BaseAiService } from './base-ai.service';
|
|
4
|
-
import { ModelInfo } from '
|
|
4
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
5
5
|
export declare class DeepSeekAiService extends BaseAiService {
|
|
6
6
|
protected deepseekClient: ReturnType<typeof createDeepSeek>;
|
|
7
7
|
constructor();
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.DeepSeekAiService = void 0;
|
|
16
16
|
const common_1 = require("@nestjs/common");
|
|
17
17
|
const deepseek_1 = require("@ai-sdk/deepseek");
|
|
18
|
-
const ai_1 = require("ai");
|
|
18
|
+
const ai_1 = require("../../../../ai");
|
|
19
19
|
const base_ai_service_1 = require("./base-ai.service");
|
|
20
20
|
const zod_1 = require("zod");
|
|
21
21
|
const model_prices_1 = __importDefault(require("../model_prices"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
4
4
|
export declare class FalAiService extends BaseAiService {
|
|
5
5
|
constructor();
|
|
6
6
|
getServiceName(): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
4
4
|
export declare class GoogleAiService extends BaseAiService {
|
|
5
5
|
private googleAI;
|
|
6
6
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
4
4
|
export declare class GrokAiService extends BaseAiService {
|
|
5
5
|
private openai;
|
|
6
6
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
4
4
|
export declare class MockAiService extends BaseAiService {
|
|
5
5
|
constructor();
|
|
6
6
|
getServiceName(): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Agent } from '../agent';
|
|
2
2
|
import { BaseAiService } from './base-ai.service';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
4
4
|
export declare class OpenAiService extends BaseAiService {
|
|
5
5
|
private openai;
|
|
6
6
|
constructor();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseAiService } from './base-ai.service';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
|
-
import { ModelInfo } from '
|
|
3
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
4
4
|
export declare class TogetherAiService extends BaseAiService {
|
|
5
5
|
private togetherClient;
|
|
6
6
|
constructor();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VertexAI } from '@google-cloud/vertexai';
|
|
2
2
|
import { Agent } from '../agent';
|
|
3
3
|
import { BaseAiService } from './base-ai.service';
|
|
4
|
-
import { ModelInfo } from '
|
|
4
|
+
import { ModelInfo } from '../../../../shared/types/app.types';
|
|
5
5
|
export declare class VertexAiService extends BaseAiService {
|
|
6
6
|
vertexAI: VertexAI;
|
|
7
7
|
constructor();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OpenAI } from 'openai';
|
|
2
2
|
import { Assistant } from 'openai/resources/beta/assistants';
|
|
3
3
|
import { VectorStore } from 'openai/resources/vector-stores';
|
|
4
|
-
import { Message } from '
|
|
4
|
+
import { Message } from '../../../shared/types/app.types';
|
|
5
5
|
import { BaseAiService } from './LLM/base-ai.service';
|
|
6
6
|
import { FileMetadata } from './attached-file.service';
|
|
7
7
|
import { ArtifactService } from './artifact.service';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Agent = void 0;
|
|
4
|
-
const app_types_1 = require("
|
|
4
|
+
const app_types_1 = require("../../../shared/types/app.types");
|
|
5
5
|
const crypto_1 = require("crypto");
|
|
6
6
|
class Agent {
|
|
7
7
|
id;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '../config/configuration.service';
|
|
2
|
-
import { ArtifactMetadata } from '
|
|
2
|
+
import { ArtifactMetadata } from '../../../shared/types/app.types';
|
|
3
3
|
export declare class ArtifactService {
|
|
4
4
|
private readonly configService;
|
|
5
5
|
private readonly artifactsDir;
|
|
@@ -2,7 +2,7 @@ import { RawBodyRequest } from '@nestjs/common';
|
|
|
2
2
|
import { StripeService } from './stripe.service';
|
|
3
3
|
import { UserServiceManager } from './user-service-manager';
|
|
4
4
|
import type { Request as ExpressRequest } from 'express';
|
|
5
|
-
import { CreatePaymentIntentRequest, CreatePaymentIntentResponse, TransactionHistoryResponse, CreateCheckoutSessionRequest, CreateCheckoutSessionResponse } from '
|
|
5
|
+
import { CreatePaymentIntentRequest, CreatePaymentIntentResponse, TransactionHistoryResponse, CreateCheckoutSessionRequest, CreateCheckoutSessionResponse } from '../../../shared/types/app.types';
|
|
6
6
|
export declare class StripeController {
|
|
7
7
|
private readonly stripeService;
|
|
8
8
|
private readonly userServiceManager;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '../config/configuration.service';
|
|
2
|
-
import { Transaction } from '
|
|
2
|
+
import { Transaction } from '../../../shared/types/app.types';
|
|
3
3
|
export declare class TransactionService {
|
|
4
4
|
private userId;
|
|
5
5
|
private configService;
|
|
@@ -4,7 +4,7 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import { UserServiceManager } from './app/user-service-manager';
|
|
5
5
|
import { PublishedAgentsService } from './ai/published-agents.service';
|
|
6
6
|
import { PublishedRoomsService } from './room/published-rooms.service';
|
|
7
|
-
import { AgentInfo, CreateAgentResponse, UpdateAgentRequest, RoomInfo, RoomDetails, CreateRoomResponse, AgentMessagesResponse, RoomMessagesResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, CreatePromptFolderRequest, CreatePromptFileRequest, UpdatePromptFileRequest, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, StoryInfo, StoryState, Character, ModelInfo, StoryModelDefaults, ChapterInfo, StoryIdea } from '
|
|
7
|
+
import { AgentInfo, CreateAgentResponse, UpdateAgentRequest, RoomInfo, RoomDetails, CreateRoomResponse, AgentMessagesResponse, RoomMessagesResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, CreatePromptFolderRequest, CreatePromptFileRequest, UpdatePromptFileRequest, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, StoryInfo, StoryState, Character, ModelInfo, StoryModelDefaults, ChapterInfo, StoryIdea } from '../../shared/types/app.types';
|
|
8
8
|
import { RoomMessage } from './room/message';
|
|
9
9
|
export declare class AppController {
|
|
10
10
|
private readonly userServiceManager;
|
|
@@ -12,7 +12,7 @@ import { StoryService } from './story/story.service';
|
|
|
12
12
|
import { ConfigurationService } from './config/configuration.service';
|
|
13
13
|
import { AttachedFileService } from './ai/attached-file.service';
|
|
14
14
|
import { ArtifactService } from './ai/artifact.service';
|
|
15
|
-
import { ArtifactMetadata, ModelInfo, ChapterInfo, StoryIdea } from '
|
|
15
|
+
import { ArtifactMetadata, ModelInfo, ChapterInfo, StoryIdea } from '../../shared/types/app.types';
|
|
16
16
|
import { PublishedAgentsService } from './ai/published-agents.service';
|
|
17
17
|
import { PublishedRoomsService } from './room/published-rooms.service';
|
|
18
18
|
import { BalanceService } from './app/balance.service';
|
|
@@ -21,7 +21,7 @@ import { TransactionService } from './app/transaction.service';
|
|
|
21
21
|
import { AgentFactory } from './ai/agent-factory';
|
|
22
22
|
import { RoomFactory } from './room/room-factory';
|
|
23
23
|
import { EventEmitter } from 'events';
|
|
24
|
-
import { AgentInfo, RoomInfo, RoomDetails, CreateRoomResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryInfo, StoryState, Character } from '
|
|
24
|
+
import { AgentInfo, RoomInfo, RoomDetails, CreateRoomResponse, FileList, PromptFileContent, PromptFoldersResponse, PromptFilesResponse, PromptScope, ProcessTextResponse, PreparedPromptResponse, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryInfo, StoryState, Character } from '../../shared/types/app.types';
|
|
25
25
|
import { RoomMessage } from './room/message';
|
|
26
26
|
export declare class AppService {
|
|
27
27
|
private readonly aiFactoryService;
|
|
@@ -37,7 +37,7 @@ exports.AppService = void 0;
|
|
|
37
37
|
const errors_1 = require("./common/errors");
|
|
38
38
|
const fs = __importStar(require("fs"));
|
|
39
39
|
const path = __importStar(require("path"));
|
|
40
|
-
const app_types_1 = require("
|
|
40
|
+
const app_types_1 = require("../../shared/types/app.types");
|
|
41
41
|
const pdf_lib_1 = require("pdf-lib");
|
|
42
42
|
const message_1 = require("./room/message");
|
|
43
43
|
class AppService {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RoomMessage = void 0;
|
|
4
|
-
const app_types_1 = require("
|
|
4
|
+
const app_types_1 = require("../../../shared/types/app.types");
|
|
5
5
|
class RoomMessage {
|
|
6
6
|
sender;
|
|
7
7
|
action;
|
|
@@ -2,7 +2,7 @@ import { Room } from './room';
|
|
|
2
2
|
import { ConfigurationService } from '../config/configuration.service';
|
|
3
3
|
import { AgentStoreService } from '../ai/agent-store.service';
|
|
4
4
|
import { AttachedFileService } from '../ai/attached-file.service';
|
|
5
|
-
import { RoomInfo } from '
|
|
5
|
+
import { RoomInfo } from '../../../shared/types/app.types';
|
|
6
6
|
import { RoomMessage } from './message';
|
|
7
7
|
import { ArtifactStoreService } from './artifact-store.service';
|
|
8
8
|
import { Artifact } from './artifact';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Room = void 0;
|
|
4
|
-
const app_types_1 = require("
|
|
4
|
+
const app_types_1 = require("../../../shared/types/app.types");
|
|
5
5
|
const message_1 = require("./message");
|
|
6
6
|
const crypto_1 = require("crypto");
|
|
7
7
|
const errors_1 = require("../common/errors");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Briyah } from './briyah';
|
|
2
2
|
export { BriyahConfigService, BriyahConfigOptions } from './briyah-config';
|
|
3
3
|
export type { AppService } from '../app.service';
|
|
4
|
-
export type { AgentInfo, CreateAgentResponse, RoomInfo, RoomDetails, CreateRoomResponse, StoryInfo, CreateStoryResponse, ProcessTextResponse, FileList, PromptFileContent, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryState, Message, MessageAction, } from '
|
|
4
|
+
export type { AgentInfo, CreateAgentResponse, RoomInfo, RoomDetails, CreateRoomResponse, StoryInfo, CreateStoryResponse, ProcessTextResponse, FileList, PromptFileContent, AttachDocumentResponse, AgentMessagesResponse, RoomMessagesResponse, StoryState, Message, MessageAction, } from '../../../shared/types/app.types';
|
|
5
5
|
export { Agent } from '../ai/agent';
|
|
6
6
|
export { Room } from '../room/room';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { StoryMessageUpdate } from '
|
|
2
|
+
import { StoryMessageUpdate } from '../../../shared/types/app.types';
|
|
3
3
|
export declare class StoryMessageService {
|
|
4
4
|
private messageEmitters;
|
|
5
5
|
getOrCreateEmitter(storyId: string): EventEmitter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '../config/configuration.service';
|
|
2
|
-
import { StoryInfo, ChapterInfo } from '
|
|
2
|
+
import { StoryInfo, ChapterInfo } from '../../../shared/types/app.types';
|
|
3
3
|
import { RoomMessage } from '../room/message';
|
|
4
4
|
import { RoomStoreService } from '../room/room-store.service';
|
|
5
5
|
export declare class StoryStoreService {
|
|
@@ -6,7 +6,7 @@ import { AgentFactory } from '../ai/agent-factory';
|
|
|
6
6
|
import { Room } from '../room/room';
|
|
7
7
|
import { RoomFactory } from '../room/room-factory';
|
|
8
8
|
import { RoomStoreService } from '../room/room-store.service';
|
|
9
|
-
import { StoryInfo, StoryState, Character } from '
|
|
9
|
+
import { StoryInfo, StoryState, Character } from '../../../shared/types/app.types';
|
|
10
10
|
import { ConfigurationService } from '../config/configuration.service';
|
|
11
11
|
import { ArtifactService } from '../ai/artifact.service';
|
|
12
12
|
import { Readable } from 'stream';
|
|
@@ -54,7 +54,7 @@ const agent_store_service_1 = require("../ai/agent-store.service");
|
|
|
54
54
|
const agent_factory_1 = require("../ai/agent-factory");
|
|
55
55
|
const room_factory_1 = require("../room/room-factory");
|
|
56
56
|
const room_store_service_1 = require("../room/room-store.service");
|
|
57
|
-
const app_types_1 = require("
|
|
57
|
+
const app_types_1 = require("../../../shared/types/app.types");
|
|
58
58
|
const configuration_service_1 = require("../config/configuration.service");
|
|
59
59
|
const artifact_service_1 = require("../ai/artifact.service");
|
|
60
60
|
const path = __importStar(require("path"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { StoryMessageUpdate } from '
|
|
2
|
+
import { StoryMessageUpdate } from '../shared/types/app.types';
|
|
3
3
|
export declare class StoryMessageService {
|
|
4
4
|
private messageEmitters;
|
|
5
5
|
getOrCreateEmitter(storyId: string): EventEmitter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigurationService } from '../config/configuration.service';
|
|
2
|
-
import { StoryInfo, ChapterInfo } from '
|
|
2
|
+
import { StoryInfo, ChapterInfo } from '../shared/types/app.types';
|
|
3
3
|
import { RoomMessage } from '../room/message';
|
|
4
4
|
import { RoomStoreService } from '../room/room-store.service';
|
|
5
5
|
export declare class StoryStoreService {
|
|
@@ -6,7 +6,7 @@ import { AgentFactory } from '../ai/agent-factory';
|
|
|
6
6
|
import { Room } from '../room/room';
|
|
7
7
|
import { RoomFactory } from '../room/room-factory';
|
|
8
8
|
import { RoomStoreService } from '../room/room-store.service';
|
|
9
|
-
import { StoryInfo, StoryState, Character } from '
|
|
9
|
+
import { StoryInfo, StoryState, Character } from '../shared/types/app.types';
|
|
10
10
|
import { ConfigurationService } from '../config/configuration.service';
|
|
11
11
|
import { ArtifactService } from '../ai/artifact.service';
|
|
12
12
|
import { Readable } from 'stream';
|
|
@@ -54,7 +54,7 @@ const agent_store_service_1 = require("../ai/agent-store.service");
|
|
|
54
54
|
const agent_factory_1 = require("../ai/agent-factory");
|
|
55
55
|
const room_factory_1 = require("../room/room-factory");
|
|
56
56
|
const room_store_service_1 = require("../room/room-store.service");
|
|
57
|
-
const app_types_1 = require("
|
|
57
|
+
const app_types_1 = require("../shared/types/app.types");
|
|
58
58
|
const configuration_service_1 = require("../config/configuration.service");
|
|
59
59
|
const artifact_service_1 = require("../ai/artifact.service");
|
|
60
60
|
const path = __importStar(require("path"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "briyah",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Briyah multi-agent AI SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/server/src/sdk/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"prebuild": "rimraf dist",
|
|
17
17
|
"build": "nest build",
|
|
18
|
-
"build:sdk": "tsc -p tsconfig.build.json",
|
|
18
|
+
"build:sdk": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
19
19
|
"prepublishOnly": "npm run build:sdk",
|
|
20
20
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
21
21
|
"start": "nest start",
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"ts-jest": "^29.4.9",
|
|
103
103
|
"ts-loader": "^9.5.7",
|
|
104
104
|
"ts-node": "^10.9.2",
|
|
105
|
+
"tsc-alias": "^1.8.16",
|
|
105
106
|
"tsconfig-paths": "^4.2.0",
|
|
106
107
|
"typescript": "^5.8.3"
|
|
107
108
|
},
|