@little-samo/samo-ai-sdk 0.2.1 → 0.3.1

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.
@@ -10,6 +10,7 @@ export interface AgentPublicDto {
10
10
  export interface AgentPrivateDto extends AgentPublicDto {
11
11
  config: AgentConfig | null;
12
12
  credentialTypes: string[];
13
+ isEditable: boolean;
13
14
  }
14
15
  export interface AgentCostDto {
15
16
  agentId: AgentId;
@@ -50,7 +50,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
50
50
  }, {
51
51
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
52
52
  }>>;
53
- llmPreset: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"gemini-low">, z.ZodLiteral<"gemini-medium">, z.ZodLiteral<"gemini-high">, z.ZodLiteral<"openai-low">, z.ZodLiteral<"openai-medium">]>>;
53
+ llmPreset: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"free">, z.ZodLiteral<"gemini-low">, z.ZodLiteral<"gemini-medium">, z.ZodLiteral<"gemini-high">, z.ZodLiteral<"openai-low">, z.ZodLiteral<"openai-medium">, z.ZodLiteral<"xai-low">, z.ZodLiteral<"xai-medium">]>>;
54
54
  languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
55
55
  timeZone: z.ZodOptional<z.ZodString>;
56
56
  greeting: z.ZodOptional<z.ZodString>;
@@ -146,13 +146,12 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
146
146
  rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
147
147
  }, "strict", z.ZodTypeAny, {
148
148
  name?: string | undefined;
149
+ avatar?: string | undefined;
150
+ appearance?: string | undefined;
149
151
  core?: {
150
152
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
151
153
  } | undefined;
152
- rules?: string[] | undefined;
153
- appearance?: string | undefined;
154
- avatar?: string | undefined;
155
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
154
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
156
155
  languages?: string[] | undefined;
157
156
  timeZone?: string | undefined;
158
157
  greeting?: string | undefined;
@@ -177,15 +176,15 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
177
176
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
178
177
  } | undefined;
179
178
  } | undefined;
179
+ rules?: string[] | undefined;
180
180
  }, {
181
181
  name?: string | undefined;
182
+ avatar?: string | undefined;
183
+ appearance?: string | undefined;
182
184
  core?: {
183
185
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
184
186
  } | undefined;
185
- rules?: string[] | undefined;
186
- appearance?: string | undefined;
187
- avatar?: string | undefined;
188
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
187
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
189
188
  languages?: string[] | undefined;
190
189
  timeZone?: string | undefined;
191
190
  greeting?: string | undefined;
@@ -210,17 +209,17 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
210
209
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
211
210
  } | undefined;
212
211
  } | undefined;
212
+ rules?: string[] | undefined;
213
213
  }>;
214
214
  }, "strip", z.ZodTypeAny, {
215
215
  config: {
216
216
  name?: string | undefined;
217
+ avatar?: string | undefined;
218
+ appearance?: string | undefined;
217
219
  core?: {
218
220
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
219
221
  } | undefined;
220
- rules?: string[] | undefined;
221
- appearance?: string | undefined;
222
- avatar?: string | undefined;
223
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
222
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
224
223
  languages?: string[] | undefined;
225
224
  timeZone?: string | undefined;
226
225
  greeting?: string | undefined;
@@ -245,18 +244,18 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
245
244
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
246
245
  } | undefined;
247
246
  } | undefined;
247
+ rules?: string[] | undefined;
248
248
  };
249
249
  agentId: bigint;
250
250
  }, {
251
251
  config: {
252
252
  name?: string | undefined;
253
+ avatar?: string | undefined;
254
+ appearance?: string | undefined;
253
255
  core?: {
254
256
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
255
257
  } | undefined;
256
- rules?: string[] | undefined;
257
- appearance?: string | undefined;
258
- avatar?: string | undefined;
259
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
258
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
260
259
  languages?: string[] | undefined;
261
260
  timeZone?: string | undefined;
262
261
  greeting?: string | undefined;
@@ -281,6 +280,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
281
280
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
282
281
  } | undefined;
283
282
  } | undefined;
283
+ rules?: string[] | undefined;
284
284
  };
285
285
  agentId: bigint;
286
286
  }>;
@@ -378,7 +378,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
378
378
  }, {
379
379
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
380
380
  }>>;
381
- llmPreset: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"gemini-low">, z.ZodLiteral<"gemini-medium">, z.ZodLiteral<"gemini-high">, z.ZodLiteral<"openai-low">, z.ZodLiteral<"openai-medium">]>>;
381
+ llmPreset: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"free">, z.ZodLiteral<"gemini-low">, z.ZodLiteral<"gemini-medium">, z.ZodLiteral<"gemini-high">, z.ZodLiteral<"openai-low">, z.ZodLiteral<"openai-medium">, z.ZodLiteral<"xai-low">, z.ZodLiteral<"xai-medium">]>>;
382
382
  languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
383
383
  timeZone: z.ZodOptional<z.ZodString>;
384
384
  greeting: z.ZodOptional<z.ZodString>;
@@ -474,13 +474,12 @@ export declare const CreateAgentSchema: z.ZodObject<{
474
474
  rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
475
475
  }, "strict", z.ZodTypeAny, {
476
476
  name?: string | undefined;
477
+ avatar?: string | undefined;
478
+ appearance?: string | undefined;
477
479
  core?: {
478
480
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
479
481
  } | undefined;
480
- rules?: string[] | undefined;
481
- appearance?: string | undefined;
482
- avatar?: string | undefined;
483
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
482
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
484
483
  languages?: string[] | undefined;
485
484
  timeZone?: string | undefined;
486
485
  greeting?: string | undefined;
@@ -505,15 +504,15 @@ export declare const CreateAgentSchema: z.ZodObject<{
505
504
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
506
505
  } | undefined;
507
506
  } | undefined;
507
+ rules?: string[] | undefined;
508
508
  }, {
509
509
  name?: string | undefined;
510
+ avatar?: string | undefined;
511
+ appearance?: string | undefined;
510
512
  core?: {
511
513
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
512
514
  } | undefined;
513
- rules?: string[] | undefined;
514
- appearance?: string | undefined;
515
- avatar?: string | undefined;
516
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
515
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
517
516
  languages?: string[] | undefined;
518
517
  timeZone?: string | undefined;
519
518
  greeting?: string | undefined;
@@ -538,17 +537,17 @@ export declare const CreateAgentSchema: z.ZodObject<{
538
537
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
539
538
  } | undefined;
540
539
  } | undefined;
540
+ rules?: string[] | undefined;
541
541
  }>;
542
542
  }, "strip", z.ZodTypeAny, {
543
543
  config: {
544
544
  name?: string | undefined;
545
+ avatar?: string | undefined;
546
+ appearance?: string | undefined;
545
547
  core?: {
546
548
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
547
549
  } | undefined;
548
- rules?: string[] | undefined;
549
- appearance?: string | undefined;
550
- avatar?: string | undefined;
551
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
550
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
552
551
  languages?: string[] | undefined;
553
552
  timeZone?: string | undefined;
554
553
  greeting?: string | undefined;
@@ -573,17 +572,17 @@ export declare const CreateAgentSchema: z.ZodObject<{
573
572
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
574
573
  } | undefined;
575
574
  } | undefined;
575
+ rules?: string[] | undefined;
576
576
  };
577
577
  }, {
578
578
  config: {
579
579
  name?: string | undefined;
580
+ avatar?: string | undefined;
581
+ appearance?: string | undefined;
580
582
  core?: {
581
583
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
582
584
  } | undefined;
583
- rules?: string[] | undefined;
584
- appearance?: string | undefined;
585
- avatar?: string | undefined;
586
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
585
+ llmPreset?: "free" | "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "xai-low" | "xai-medium" | undefined;
587
586
  languages?: string[] | undefined;
588
587
  timeZone?: string | undefined;
589
588
  greeting?: string | undefined;
@@ -608,6 +607,7 @@ export declare const CreateAgentSchema: z.ZodObject<{
608
607
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
609
608
  } | undefined;
610
609
  } | undefined;
610
+ rules?: string[] | undefined;
611
611
  };
612
612
  }>;
613
613
  export type CreateAgentDto = z.infer<typeof CreateAgentSchema>;
@@ -1,8 +1,9 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GimmickCoreDescriptions: {
3
3
  readonly web_search: "Searches the web for up-to-date or missing information using an LLM, providing both a summary and detailed results. Execution takes approximately 30 seconds";
4
- readonly image_generator: "Generates an image using an LLM based on text prompts and optional reference images. Execution takes approximately 30 seconds";
4
+ readonly image_generator: "Generates an image using an LLM based on text prompts and optional reference images. Can also modify or edit existing images within the current context based on text instructions. Execution takes approximately 30 seconds";
5
+ readonly character_image_generator: "Generates consistent character images by using the gimmick's appearance configuration as a common prompt, which helps maintain character identity and physical traits. The style, defaulting to \"anime style\", can be customized in the appearance settings with comma-separated values. Supported values include \"realistic\" for a photorealistic style. Can optionally select one description from the images array to combine with the common prompt for enhanced image generation.";
5
6
  readonly notion: "Interacts with Notion platform for content management and collaboration";
6
7
  };
7
8
  export type GimmickCore = keyof typeof GimmickCoreDescriptions;
8
- export declare const GimmickCoreSchema: z.ZodUnion<[z.ZodLiteral<"notion" | "web_search" | "image_generator">, z.ZodLiteral<"notion" | "web_search" | "image_generator">, ...z.ZodLiteral<"notion" | "web_search" | "image_generator">[]]>;
9
+ export declare const GimmickCoreSchema: z.ZodUnion<[z.ZodLiteral<"web_search" | "image_generator" | "character_image_generator" | "notion">, z.ZodLiteral<"web_search" | "image_generator" | "character_image_generator" | "notion">, ...z.ZodLiteral<"web_search" | "image_generator" | "character_image_generator" | "notion">[]]>;
@@ -4,7 +4,8 @@ exports.GimmickCoreSchema = exports.GimmickCoreDescriptions = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.GimmickCoreDescriptions = {
6
6
  web_search: 'Searches the web for up-to-date or missing information using an LLM, providing both a summary and detailed results. Execution takes approximately 30 seconds',
7
- image_generator: 'Generates an image using an LLM based on text prompts and optional reference images. Execution takes approximately 30 seconds',
7
+ image_generator: 'Generates an image using an LLM based on text prompts and optional reference images. Can also modify or edit existing images within the current context based on text instructions. Execution takes approximately 30 seconds',
8
+ character_image_generator: 'Generates consistent character images by using the gimmick\'s appearance configuration as a common prompt, which helps maintain character identity and physical traits. The style, defaulting to "anime style", can be customized in the appearance settings with comma-separated values. Supported values include "realistic" for a photorealistic style. Can optionally select one description from the images array to combine with the common prompt for enhanced image generation.',
8
9
  notion: 'Interacts with Notion platform for content management and collaboration',
9
10
  };
10
11
  exports.GimmickCoreSchema = zod_1.z.union(Object.keys(exports.GimmickCoreDescriptions).map((key) => zod_1.z.literal(key).describe(exports.GimmickCoreDescriptions[key])));
@@ -1 +1 @@
1
- {"version":3,"file":"gimmick.config.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/gimmick.config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,uBAAuB,GAAG;IACrC,UAAU,EACR,8JAA8J;IAChK,eAAe,EACb,+HAA+H;IACjI,MAAM,EACJ,yEAAyE;CACnE,CAAC;AAIE,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CACtC,MAAM,CAAC,IAAI,CAAC,+BAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC/C,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,+BAAuB,CAAC,GAAkB,CAAC,CAAC,CAKrE,CACF,CAAC"}
1
+ {"version":3,"file":"gimmick.config.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/gimmick.config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,uBAAuB,GAAG;IACrC,UAAU,EACR,8JAA8J;IAChK,eAAe,EACb,8NAA8N;IAChO,yBAAyB,EACvB,ydAAyd;IAC3d,MAAM,EACJ,yEAAyE;CACnE,CAAC;AAIE,QAAA,iBAAiB,GAAG,OAAC,CAAC,KAAK,CACtC,MAAM,CAAC,IAAI,CAAC,+BAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAC/C,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,+BAAuB,CAAC,GAAkB,CAAC,CAAC,CAKrE,CACF,CAAC"}
@@ -9,6 +9,9 @@ export interface UserPublicDto {
9
9
  appearance: string | null;
10
10
  }
11
11
  export interface UserPrivateDto extends UserPublicDto {
12
+ locale: string;
13
+ country: string;
14
+ adminLevel: number;
12
15
  birthDate: Date | null;
13
16
  email: string | null;
14
17
  defaultCredits: number;
@@ -6,11 +6,15 @@ export interface ItemDto {
6
6
  count: number;
7
7
  param1: number;
8
8
  param2: number;
9
+ param3: number;
10
+ param4: number;
9
11
  updatedAt: Date;
10
12
  }
11
13
  export interface ItemUpdateDto {
12
14
  count: number;
13
15
  param1: number;
14
16
  param2: number;
17
+ param3: number;
18
+ param4: number;
15
19
  updatedAt: Date;
16
20
  }
@@ -1,5 +1,5 @@
1
1
  import { AgentId, EntityId, EntityType, LocationId, UserId } from '@little-samo/samo-ai';
2
- import type { LocationConfig, LocationEnvironment, LocationPlatform, LocationType } from '@little-samo/samo-ai-sdk/models';
2
+ import type { LocationConfig, LocationConfigCanvas, LocationEnvironment, LocationPlatform, LocationType } from '@little-samo/samo-ai-sdk/models';
3
3
  import type { LocationMessageDto } from './location.message';
4
4
  import type { AgentCostDto } from '../entities/agents/agent';
5
5
  import type { GimmickCostDto, GimmickPublicDto } from '../entities/gimmicks/gimmick';
@@ -12,7 +12,9 @@ export interface LocationPublicDto {
12
12
  maxUsers: number;
13
13
  thumbnail: string | null;
14
14
  ownerUserId: UserId | null;
15
+ canvasConfigs: LocationConfigCanvas[];
15
16
  gimmicks: GimmickPublicDto[];
17
+ sourceLocationPresetId: bigint | null;
16
18
  isPublished: boolean;
17
19
  publishedAt: Date | null;
18
20
  publishDescription: string | null;
@@ -37,6 +39,8 @@ export interface LocationPublicDto {
37
39
  export interface LocationPrivateDto extends LocationPublicDto {
38
40
  config: LocationConfig | null;
39
41
  credentialTypes: string[];
42
+ overrideAgentLlmLevel: 'FREE' | 'LOW' | 'MEDIUM' | 'HIGH' | null;
43
+ isEditable: boolean;
40
44
  }
41
45
  export interface LocationListItemDto extends LocationPublicDto {
42
46
  lastMessage: LocationMessageDto | null;
@@ -57,6 +61,7 @@ export interface LocationContentDto {
57
61
  id: LocationId;
58
62
  canvases: Record<string, LocationCanvasDto>;
59
63
  rendering: string | null;
64
+ suggestedResponses: string[] | null;
60
65
  }
61
66
  export interface LocationCostDto {
62
67
  locationId: LocationId;
@@ -5,6 +5,8 @@ export declare const LocationEventType: {
5
5
  readonly AgentJoined: "AgentJoined";
6
6
  readonly AgentLeft: "AgentLeft";
7
7
  readonly AgentExecuting: "AgentExecuting";
8
+ readonly AgentSendMessageStream: "AgentSendMessageStream";
9
+ readonly AgentExecuteNextAction: "AgentExecuteNextAction";
8
10
  readonly AgentExecuted: "AgentExecuted";
9
11
  readonly UserJoined: "UserJoined";
10
12
  readonly UserLeft: "UserLeft";
@@ -15,6 +17,8 @@ export declare const LocationEventType: {
15
17
  readonly MessageProcessed: "MessageProcessed";
16
18
  readonly RenderingUpdated: "RenderingUpdated";
17
19
  readonly CanvasUpdated: "CanvasUpdated";
20
+ readonly CanvasCleared: "CanvasCleared";
21
+ readonly SuggestedResponsesUpdated: "SuggestedResponsesUpdated";
18
22
  readonly PauseUpdateUntilUpdated: "PauseUpdateUntilUpdated";
19
23
  readonly LocationUpdated: "LocationUpdated";
20
24
  };
@@ -28,6 +32,18 @@ export interface LocationAgentExecutingEventDto extends LocationEventDtoBase {
28
32
  type: typeof LocationEventType.AgentExecuting;
29
33
  agentId: AgentId;
30
34
  }
35
+ export interface LocationAgentSendMessageStreamEventDto extends LocationEventDtoBase {
36
+ type: typeof LocationEventType.AgentSendMessageStream;
37
+ agentId: AgentId;
38
+ index: number;
39
+ sequence: number;
40
+ delta: string;
41
+ }
42
+ export interface LocationAgentExecuteNextActionEventDto extends LocationEventDtoBase {
43
+ type: typeof LocationEventType.AgentExecuteNextAction;
44
+ agentId: AgentId;
45
+ index: number;
46
+ }
31
47
  export interface LocationAgentExecutedEventDto extends LocationEventDtoBase {
32
48
  type: typeof LocationEventType.AgentExecuted;
33
49
  agentId: AgentId;
@@ -82,6 +98,13 @@ export interface LocationCanvasUpdatedEventDto extends LocationEventDtoBase {
82
98
  name: string;
83
99
  canvas: LocationCanvasDto;
84
100
  }
101
+ export interface LocationCanvasClearedEventDto extends LocationEventDtoBase {
102
+ type: typeof LocationEventType.CanvasCleared;
103
+ }
104
+ export interface LocationSuggestedResponsesUpdatedEventDto extends LocationEventDtoBase {
105
+ type: typeof LocationEventType.SuggestedResponsesUpdated;
106
+ suggestedResponses: string[] | null;
107
+ }
85
108
  export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDtoBase {
86
109
  type: typeof LocationEventType.PauseUpdateUntilUpdated;
87
110
  pauseUpdateUntil: Date | null;
@@ -90,4 +113,4 @@ export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDt
90
113
  export interface LocationUpdatedEventDto extends LocationEventDtoBase {
91
114
  type: typeof LocationEventType.LocationUpdated;
92
115
  }
93
- export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationUpdateMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
116
+ export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentSendMessageStreamEventDto | LocationAgentExecuteNextActionEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationUpdateMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationCanvasClearedEventDto | LocationSuggestedResponsesUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
@@ -5,6 +5,8 @@ exports.LocationEventType = {
5
5
  AgentJoined: 'AgentJoined',
6
6
  AgentLeft: 'AgentLeft',
7
7
  AgentExecuting: 'AgentExecuting',
8
+ AgentSendMessageStream: 'AgentSendMessageStream',
9
+ AgentExecuteNextAction: 'AgentExecuteNextAction',
8
10
  AgentExecuted: 'AgentExecuted',
9
11
  UserJoined: 'UserJoined',
10
12
  UserLeft: 'UserLeft',
@@ -15,6 +17,8 @@ exports.LocationEventType = {
15
17
  MessageProcessed: 'MessageProcessed',
16
18
  RenderingUpdated: 'RenderingUpdated',
17
19
  CanvasUpdated: 'CanvasUpdated',
20
+ CanvasCleared: 'CanvasCleared',
21
+ SuggestedResponsesUpdated: 'SuggestedResponsesUpdated',
18
22
  PauseUpdateUntilUpdated: 'PauseUpdateUntilUpdated',
19
23
  LocationUpdated: 'LocationUpdated',
20
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"location.events.js","sourceRoot":"","sources":["../../../src/dto/locations/location.events.ts"],"names":[],"mappings":";;;AAKa,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;CAC1B,CAAC"}
1
+ {"version":3,"file":"location.events.js","sourceRoot":"","sources":["../../../src/dto/locations/location.events.ts"],"names":[],"mappings":";;;AAKa,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,sBAAsB,EAAE,wBAAwB;IAChD,sBAAsB,EAAE,wBAAwB;IAChD,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,gBAAgB,EAAE,kBAAkB;IACpC,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,yBAAyB,EAAE,2BAA2B;IACtD,uBAAuB,EAAE,yBAAyB;IAClD,eAAe,EAAE,iBAAiB;CAC1B,CAAC"}
@@ -10,6 +10,7 @@ export interface LocationMessageDto {
10
10
  action?: string;
11
11
  emotion?: string;
12
12
  image?: string;
13
+ isSensitiveImage?: boolean;
13
14
  processed?: boolean;
14
15
  createdAt: Date;
15
16
  updatedAt: Date;
@@ -1,5 +1,6 @@
1
- import { UserId } from '@little-samo/samo-ai';
1
+ import { LocationId, UserId } from '@little-samo/samo-ai';
2
2
  import z from 'zod';
3
+ import type { LocationConfigCanvas } from '@little-samo/samo-ai-sdk/models';
3
4
  import type { AgentCostDto, AgentPublicDto, GimmickCostDto, GimmickPublicDto } from '../entities';
4
5
  export declare const LocationPresetMessageSchema: z.ZodObject<{
5
6
  entityType: z.ZodNativeEnum<{
@@ -9,31 +10,52 @@ export declare const LocationPresetMessageSchema: z.ZodObject<{
9
10
  readonly Gimmick: "gimmick";
10
11
  }>;
11
12
  entityId: z.ZodBigInt;
12
- message: z.ZodString;
13
+ message: z.ZodOptional<z.ZodString>;
14
+ image: z.ZodOptional<z.ZodString>;
13
15
  }, "strip", z.ZodTypeAny, {
14
- message: string;
15
16
  entityType: "system" | "agent" | "user" | "gimmick";
16
17
  entityId: bigint;
18
+ message?: string | undefined;
19
+ image?: string | undefined;
17
20
  }, {
18
- message: string;
19
21
  entityType: "system" | "agent" | "user" | "gimmick";
20
22
  entityId: bigint;
23
+ message?: string | undefined;
24
+ image?: string | undefined;
21
25
  }>;
22
26
  export type LocationPresetMessageDto = z.infer<typeof LocationPresetMessageSchema>;
27
+ export declare const LocationPresetCanvasSchema: z.ZodObject<{
28
+ name: z.ZodString;
29
+ text: z.ZodString;
30
+ }, "strip", z.ZodTypeAny, {
31
+ name: string;
32
+ text: string;
33
+ }, {
34
+ name: string;
35
+ text: string;
36
+ }>;
37
+ export type LocationPresetCanvasDto = z.infer<typeof LocationPresetCanvasSchema>;
23
38
  export interface LocationPresetDto {
24
39
  id: bigint;
25
40
  name: string;
41
+ version: number;
42
+ versionUpdatedAt: Date;
26
43
  presetDescription: string;
44
+ presetShortDescription: string;
27
45
  thumbnail: string | null;
28
46
  ownerUserId: UserId | null;
47
+ sourceLocationId: LocationId | null;
29
48
  agents: AgentPublicDto[];
30
49
  agentCosts: AgentCostDto[];
31
50
  gimmicks: GimmickPublicDto[];
32
51
  gimmickCosts: GimmickCostDto[];
52
+ canvases: LocationPresetCanvasDto[];
53
+ canvasConfigs: LocationConfigCanvas[];
33
54
  messages: LocationPresetMessageDto[];
34
55
  isPublished: boolean;
35
56
  publishedAt: Date | null;
36
57
  hashtags: string[];
58
+ likeCount: number;
37
59
  isPublic: boolean;
38
60
  isAllowImport: boolean;
39
61
  isSensitive: boolean;
@@ -41,6 +63,7 @@ export interface LocationPresetDto {
41
63
  updatedAt: Date;
42
64
  }
43
65
  export interface LocationPresetDetailDto extends LocationPresetDto {
66
+ userRating: 'LIKE' | 'DISLIKE' | null;
44
67
  locationCount: number;
45
68
  totalUsedCredit: number;
46
69
  totalMessageCount: number;
@@ -3,12 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.LocationPresetMessageSchema = void 0;
6
+ exports.LocationPresetCanvasSchema = exports.LocationPresetMessageSchema = void 0;
7
7
  const samo_ai_1 = require("@little-samo/samo-ai");
8
8
  const zod_1 = __importDefault(require("zod"));
9
9
  exports.LocationPresetMessageSchema = zod_1.default.object({
10
10
  entityType: zod_1.default.nativeEnum(samo_ai_1.EntityType),
11
11
  entityId: zod_1.default.coerce.bigint(),
12
- message: zod_1.default.string().max(800),
12
+ message: zod_1.default.string().max(800).optional(),
13
+ image: zod_1.default
14
+ .string()
15
+ .max(4 * 1024 * 1024)
16
+ .optional(),
17
+ });
18
+ exports.LocationPresetCanvasSchema = zod_1.default.object({
19
+ name: zod_1.default.string().max(32),
20
+ text: zod_1.default.string().max(5000),
13
21
  });
14
22
  //# sourceMappingURL=location.preset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.preset.js","sourceRoot":"","sources":["../../../src/dto/locations/location.preset.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0D;AAC1D,8CAAoB;AASP,QAAA,2BAA2B,GAAG,aAAC,CAAC,MAAM,CAAC;IAClD,UAAU,EAAE,aAAC,CAAC,UAAU,CAAC,oBAAU,CAAC;IACpC,QAAQ,EAAE,aAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC3B,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;CAC7B,CAAC,CAAC"}
1
+ {"version":3,"file":"location.preset.js","sourceRoot":"","sources":["../../../src/dto/locations/location.preset.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAsE;AACtE,8CAAoB;AAWP,QAAA,2BAA2B,GAAG,aAAC,CAAC,MAAM,CAAC;IAClD,UAAU,EAAE,aAAC,CAAC,UAAU,CAAC,oBAAU,CAAC;IACpC,QAAQ,EAAE,aAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAE3B,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACvC,KAAK,EAAE,aAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;SACpB,QAAQ,EAAE;CACd,CAAC,CAAC;AAMU,QAAA,0BAA0B,GAAG,aAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACxB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;CAC3B,CAAC,CAAC"}