@little-samo/samo-ai-sdk 0.1.0-rv2 → 0.1.0-rv4

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.
Files changed (36) hide show
  1. package/dist/dto/entities/agents/agent.d.ts +4 -6
  2. package/dist/dto/entities/agents/agent.requests.d.ts +27 -13
  3. package/dist/dto/entities/agents/agent.requests.js +11 -3
  4. package/dist/dto/entities/agents/agent.requests.js.map +1 -1
  5. package/dist/dto/entities/index.d.ts +0 -1
  6. package/dist/dto/entities/index.js +0 -1
  7. package/dist/dto/entities/index.js.map +1 -1
  8. package/dist/dto/entities/users/index.d.ts +1 -0
  9. package/dist/dto/entities/users/index.js +1 -0
  10. package/dist/dto/entities/users/index.js.map +1 -1
  11. package/dist/dto/entities/users/user.d.ts +0 -4
  12. package/dist/dto/entities/users/user.requests.d.ts +13 -0
  13. package/dist/dto/entities/users/user.requests.js +13 -0
  14. package/dist/dto/entities/users/user.requests.js.map +1 -0
  15. package/dist/dto/items/item.rankings.d.ts +3 -3
  16. package/dist/dto/locations/index.d.ts +1 -1
  17. package/dist/dto/locations/index.js +1 -1
  18. package/dist/dto/locations/index.js.map +1 -1
  19. package/dist/dto/locations/location.d.ts +7 -15
  20. package/dist/dto/locations/location.events.d.ts +6 -5
  21. package/dist/dto/locations/location.message.d.ts +13 -0
  22. package/dist/dto/locations/location.message.js +3 -0
  23. package/dist/dto/locations/location.message.js.map +1 -0
  24. package/dist/dto/locations/location.messages.d.ts +2 -1
  25. package/dist/dto/locations/location.messages.js +15 -0
  26. package/dist/dto/locations/location.messages.js.map +1 -1
  27. package/dist/dto/locations/location.requests.d.ts +88 -28
  28. package/dist/dto/locations/location.requests.js +36 -11
  29. package/dist/dto/locations/location.requests.js.map +1 -1
  30. package/dist/models/locations/location.config.d.ts +2 -3
  31. package/dist/models/locations/location.config.js +1 -18
  32. package/dist/models/locations/location.config.js.map +1 -1
  33. package/dist/models/locations/location.constants.d.ts +8 -0
  34. package/dist/models/locations/location.constants.js +8 -1
  35. package/dist/models/locations/location.constants.js.map +1 -1
  36. package/package.json +1 -1
@@ -1,13 +1,11 @@
1
1
  import { AgentId, UserId } from '@little-samo/samo-ai';
2
2
  import { AgentConfig } from '@little-samo/samo-ai-sdk/models';
3
- import { EntityDto } from '../entity';
4
- export interface AgentDto extends EntityDto {
5
- id: AgentId;
6
- }
7
- export interface AgentPrivateDto {
3
+ export interface AgentPublicDto {
8
4
  id: AgentId;
9
5
  name: string;
10
- username: string | null;
6
+ avatar: string;
11
7
  ownerUserId: UserId;
8
+ }
9
+ export interface AgentPrivateDto extends AgentPublicDto {
12
10
  config: AgentConfig;
13
11
  }
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AgentPrivateDto } from './agent';
2
+ import { AgentPrivateDto, AgentPublicDto } from './agent';
3
3
  import { AgentPresetDto } from './agent.preset';
4
4
  export declare const AgentsPaginationQuerySchema: z.ZodObject<{
5
5
  page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -21,6 +21,20 @@ export interface AgentsPaginatedResponseDto {
21
21
  totalPages: number;
22
22
  };
23
23
  }
24
+ export declare const GetAgentsByIdsQuerySchema: z.ZodObject<{
25
+ agentIds: z.ZodEffects<z.ZodEffects<z.ZodString, bigint[], string>, bigint[], string>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ agentIds: bigint[];
28
+ }, {
29
+ agentIds: string;
30
+ }>;
31
+ export type GetAgentsByIdsQueryDto = z.infer<typeof GetAgentsByIdsQuerySchema>;
32
+ export interface GetAgentPublicsByIdsResponseDto {
33
+ agents: AgentPublicDto[];
34
+ }
35
+ export interface GetAgentPrivatesByIdsResponseDto {
36
+ agents: AgentPrivateDto[];
37
+ }
24
38
  export declare const AgentUpdateConfigSchema: z.ZodObject<{
25
39
  agentId: z.ZodBigInt;
26
40
  config: z.ZodObject<{
@@ -208,11 +222,12 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
208
222
  rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
209
223
  }, "strip", z.ZodTypeAny, {
210
224
  name?: string | undefined;
211
- avatar?: string | undefined;
212
- appearance?: string | undefined;
213
225
  core?: {
214
226
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
215
227
  } | undefined;
228
+ rules?: string[] | undefined;
229
+ avatar?: string | undefined;
230
+ appearance?: string | undefined;
216
231
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
217
232
  languages?: string[] | undefined;
218
233
  timeZone?: string | undefined;
@@ -274,14 +289,14 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
274
289
  mbti: z.ZodOptional<z.ZodString>;
275
290
  }, z.ZodOptional<z.ZodString>, "strip">>>;
276
291
  }, z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodObject<{}, "strip", z.ZodOptional<z.ZodString>, z.objectOutputType<{}, z.ZodOptional<z.ZodString>, "strip">, z.objectInputType<{}, z.ZodOptional<z.ZodString>, "strip">>]>, "strip"> | undefined;
277
- rules?: string[] | undefined;
278
292
  }, {
279
293
  name?: string | undefined;
280
- avatar?: string | undefined;
281
- appearance?: string | undefined;
282
294
  core?: {
283
295
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
284
296
  } | undefined;
297
+ rules?: string[] | undefined;
298
+ avatar?: string | undefined;
299
+ appearance?: string | undefined;
285
300
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
286
301
  languages?: string[] | undefined;
287
302
  timeZone?: string | undefined;
@@ -343,17 +358,17 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
343
358
  mbti: z.ZodOptional<z.ZodString>;
344
359
  }, z.ZodOptional<z.ZodString>, "strip">>>;
345
360
  }, z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodObject<{}, "strip", z.ZodOptional<z.ZodString>, z.objectOutputType<{}, z.ZodOptional<z.ZodString>, "strip">, z.objectInputType<{}, z.ZodOptional<z.ZodString>, "strip">>]>, "strip"> | undefined;
346
- rules?: string[] | undefined;
347
361
  }>;
348
362
  }, "strip", z.ZodTypeAny, {
349
363
  agentId: bigint;
350
364
  config: {
351
365
  name?: string | undefined;
352
- avatar?: string | undefined;
353
- appearance?: string | undefined;
354
366
  core?: {
355
367
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
356
368
  } | undefined;
369
+ rules?: string[] | undefined;
370
+ avatar?: string | undefined;
371
+ appearance?: string | undefined;
357
372
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
358
373
  languages?: string[] | undefined;
359
374
  timeZone?: string | undefined;
@@ -415,17 +430,17 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
415
430
  mbti: z.ZodOptional<z.ZodString>;
416
431
  }, z.ZodOptional<z.ZodString>, "strip">>>;
417
432
  }, z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodObject<{}, "strip", z.ZodOptional<z.ZodString>, z.objectOutputType<{}, z.ZodOptional<z.ZodString>, "strip">, z.objectInputType<{}, z.ZodOptional<z.ZodString>, "strip">>]>, "strip"> | undefined;
418
- rules?: string[] | undefined;
419
433
  };
420
434
  }, {
421
435
  agentId: bigint;
422
436
  config: {
423
437
  name?: string | undefined;
424
- avatar?: string | undefined;
425
- appearance?: string | undefined;
426
438
  core?: {
427
439
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
428
440
  } | undefined;
441
+ rules?: string[] | undefined;
442
+ avatar?: string | undefined;
443
+ appearance?: string | undefined;
429
444
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
430
445
  languages?: string[] | undefined;
431
446
  timeZone?: string | undefined;
@@ -487,7 +502,6 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
487
502
  mbti: z.ZodOptional<z.ZodString>;
488
503
  }, z.ZodOptional<z.ZodString>, "strip">>>;
489
504
  }, z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodObject<{}, "strip", z.ZodOptional<z.ZodString>, z.objectOutputType<{}, z.ZodOptional<z.ZodString>, "strip">, z.objectInputType<{}, z.ZodOptional<z.ZodString>, "strip">>]>, "strip"> | undefined;
490
- rules?: string[] | undefined;
491
505
  };
492
506
  }>;
493
507
  export type AgentUpdateConfigDto = z.infer<typeof AgentUpdateConfigSchema>;
@@ -1,14 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetHelperAgentSchema = exports.CreateAgentFromPresetSchema = exports.AgentPresetsPaginationQuerySchema = exports.AgentUpdateConfigSchema = exports.AgentsPaginationQuerySchema = void 0;
3
+ exports.GetHelperAgentSchema = exports.CreateAgentFromPresetSchema = exports.AgentPresetsPaginationQuerySchema = exports.AgentUpdateConfigSchema = exports.GetAgentsByIdsQuerySchema = exports.AgentsPaginationQuerySchema = void 0;
4
4
  const models_1 = require("@little-samo/samo-ai-sdk/models");
5
5
  const zod_1 = require("zod");
6
6
  exports.AgentsPaginationQuerySchema = zod_1.z.object({
7
7
  page: zod_1.z.coerce.number().int().min(1).optional().default(1),
8
8
  limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(10),
9
9
  });
10
+ exports.GetAgentsByIdsQuerySchema = zod_1.z.object({
11
+ agentIds: zod_1.z
12
+ .string()
13
+ .transform((val) => val.split(',').map((id) => BigInt(id.trim())))
14
+ .refine((arr) => arr.length > 0 && arr.length <= 25, {
15
+ message: 'agentIds must contain 1-25 agent IDs',
16
+ }),
17
+ });
10
18
  exports.AgentUpdateConfigSchema = zod_1.z.object({
11
- agentId: zod_1.z.bigint(),
19
+ agentId: zod_1.z.coerce.bigint(),
12
20
  config: models_1.AgentConfigSchema.partial(),
13
21
  });
14
22
  exports.AgentPresetsPaginationQuerySchema = zod_1.z.object({
@@ -16,7 +24,7 @@ exports.AgentPresetsPaginationQuerySchema = zod_1.z.object({
16
24
  limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(20),
17
25
  });
18
26
  exports.CreateAgentFromPresetSchema = zod_1.z.object({
19
- presetId: zod_1.z.bigint(),
27
+ presetId: zod_1.z.coerce.bigint(),
20
28
  });
21
29
  exports.GetHelperAgentSchema = zod_1.z.object({
22
30
  helperType: zod_1.z.nativeEnum(models_1.AgentHelperType),
@@ -1 +1 @@
1
- {"version":3,"file":"agent.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/agents/agent.requests.ts"],"names":[],"mappings":";;;AAAA,4DAGyC;AACzC,6BAAwB;AAKX,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACtE,CAAC,CAAC;AAgBU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,0BAAiB,CAAC,OAAO,EAAE;CACpC,CAAC,CAAC;AAIU,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,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AAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SACjE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE;QACnD,OAAO,EAAE,sCAAsC;KAChD,CAAC;CACL,CAAC,CAAC;AAYU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC1B,MAAM,EAAE,0BAAiB,CAAC,OAAO,EAAE;CACpC,CAAC,CAAC;AAIU,QAAA,iCAAiC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;CACtE,CAAC,CAAC;AAgBU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC5B,CAAC,CAAC;AAUU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,wBAAe,CAAC;CAC1C,CAAC,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './agents';
2
2
  export * from './users';
3
- export * from './entity';
@@ -16,5 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./agents"), exports);
18
18
  __exportStar(require("./users"), exports);
19
- __exportStar(require("./entity"), exports);
20
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB"}
@@ -1,2 +1,3 @@
1
1
  export * from './user.events';
2
+ export * from './user.requests';
2
3
  export * from './user';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./user.events"), exports);
18
+ __exportStar(require("./user.requests"), exports);
18
19
  __exportStar(require("./user"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,kDAAgC;AAChC,yCAAuB"}
@@ -1,8 +1,4 @@
1
1
  import { UserId } from '@little-samo/samo-ai';
2
- import { EntityDto } from '../entity';
3
- export interface UserDto extends EntityDto {
4
- id: UserId;
5
- }
6
2
  export interface UserPublicDto {
7
3
  id: UserId;
8
4
  username: string | null;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ import { UserPublicDto } from './user';
3
+ export declare const GetUsersByIdsQuerySchema: z.ZodObject<{
4
+ userIds: z.ZodEffects<z.ZodEffects<z.ZodString, bigint[], string>, bigint[], string>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ userIds: bigint[];
7
+ }, {
8
+ userIds: string;
9
+ }>;
10
+ export type GetUsersByIdsQueryDto = z.infer<typeof GetUsersByIdsQuerySchema>;
11
+ export interface GetUserPublicsByIdsResponseDto {
12
+ users: UserPublicDto[];
13
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetUsersByIdsQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.GetUsersByIdsQuerySchema = zod_1.z.object({
6
+ userIds: zod_1.z
7
+ .string()
8
+ .transform((val) => val.split(',').map((id) => BigInt(id.trim())))
9
+ .refine((arr) => arr.length > 0 && arr.length <= 25, {
10
+ message: 'userIds must contain 1-25 user IDs',
11
+ }),
12
+ });
13
+ //# sourceMappingURL=user.requests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/user.requests.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAIX,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SACjE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE;QACnD,OAAO,EAAE,oCAAoC;KAC9C,CAAC;CACL,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
- import { AgentDto, UserDto } from '../entities';
1
+ import { AgentPublicDto, UserPublicDto } from '../entities';
2
2
  export interface ItemRankingDto {
3
3
  rank: number;
4
- ownerAgent?: AgentDto;
5
- ownerUser?: UserDto;
4
+ ownerAgent?: AgentPublicDto;
5
+ ownerUser?: UserPublicDto;
6
6
  count: number;
7
7
  }
@@ -1,5 +1,5 @@
1
1
  export * from './location.events';
2
- export * from './location.messages';
2
+ export * from './location.message';
3
3
  export * from './location.preset';
4
4
  export * from './location.requests';
5
5
  export * from './location.states';
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./location.events"), exports);
18
- __exportStar(require("./location.messages"), exports);
18
+ __exportStar(require("./location.message"), exports);
19
19
  __exportStar(require("./location.preset"), exports);
20
20
  __exportStar(require("./location.requests"), exports);
21
21
  __exportStar(require("./location.states"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,6CAA2B"}
@@ -1,21 +1,13 @@
1
1
  import { LocationId } from '@little-samo/samo-ai';
2
- import { LocationConfig } from '@little-samo/samo-ai-sdk/models';
3
- import { AgentDto, UserDto } from '../entities';
4
- import { LocationMessageDto } from './location.messages';
5
- export interface LocationMessagesDto {
2
+ import { LocationConfig, LocationEnvironment, LocationType } from '@little-samo/samo-ai-sdk/models';
3
+ export interface LocationPublicDto {
6
4
  id: LocationId;
7
5
  name: string;
8
- users: UserDto[];
9
- agents: AgentDto[];
10
- messages: LocationMessageDto[];
11
- messageCursor?: string;
12
- }
13
- export interface LocationBasicDto {
14
- id: LocationId;
15
- name: string;
16
- platform: string;
17
- type: string;
18
- config: LocationConfig;
6
+ type: LocationType;
7
+ environment: LocationEnvironment;
19
8
  createdAt: Date;
20
9
  updatedAt: Date;
21
10
  }
11
+ export interface LocationPrivateDto extends LocationPublicDto {
12
+ config: LocationConfig;
13
+ }
@@ -1,6 +1,6 @@
1
- import { UserId } from '@little-samo/samo-ai';
2
- import { UserDto } from '../entities';
3
- import { LocationMessageDto } from './location.messages';
1
+ import { LocationId, UserId } from '@little-samo/samo-ai';
2
+ import { UserPublicDto } from '../entities';
3
+ import { LocationMessageDto } from './location.message';
4
4
  export declare const LocationEventType: {
5
5
  readonly AgentExecution: "AgentExecution";
6
6
  readonly UserJoin: "UserJoin";
@@ -10,7 +10,8 @@ export declare const LocationEventType: {
10
10
  };
11
11
  export type LocationEventType = (typeof LocationEventType)[keyof typeof LocationEventType];
12
12
  export interface LocationEventDtoBase {
13
- locationId: number;
13
+ locationId: LocationId;
14
+ userIds?: UserId[];
14
15
  type: LocationEventType;
15
16
  }
16
17
  export interface LocationRenderingUpdatedEventDto extends LocationEventDtoBase {
@@ -23,7 +24,7 @@ export interface LocationAgentExecutionEventDto extends LocationEventDtoBase {
23
24
  }
24
25
  export interface LocationUserJoinEventDto extends LocationEventDtoBase {
25
26
  type: typeof LocationEventType.UserJoin;
26
- user: UserDto;
27
+ user: UserPublicDto;
27
28
  }
28
29
  export interface LocationUserLeaveEventDto extends LocationEventDtoBase {
29
30
  type: typeof LocationEventType.UserLeave;
@@ -0,0 +1,13 @@
1
+ import { EntityId, EntityType } from '@little-samo/samo-ai';
2
+ export interface LocationMessageDto {
3
+ entityType: EntityType;
4
+ entityId: EntityId;
5
+ name: string;
6
+ expression?: string;
7
+ message?: string;
8
+ action?: string;
9
+ emotion?: string;
10
+ image?: string;
11
+ createdAt: Date;
12
+ updatedAt: Date;
13
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=location.message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.message.js","sourceRoot":"","sources":["../../../src/dto/locations/location.message.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { EntityId, EntityType } from '@little-samo/samo-ai';
1
+ import { EntityId, EntityType, LocationMessage } from '@little-samo/samo-ai';
2
2
  export interface LocationMessageDto {
3
3
  entityType: EntityType;
4
4
  entityId: EntityId;
@@ -11,3 +11,4 @@ export interface LocationMessageDto {
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
13
  }
14
+ export declare function convertLocationMessageToDto(message: LocationMessage): LocationMessageDto;
@@ -1,3 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.convertLocationMessageToDto = convertLocationMessageToDto;
4
+ function convertLocationMessageToDto(message) {
5
+ return {
6
+ entityType: message.entityType,
7
+ entityId: message.entityId,
8
+ name: message.name,
9
+ expression: message.expression,
10
+ message: message.message,
11
+ action: message.action,
12
+ emotion: message.emotion,
13
+ image: message.image,
14
+ createdAt: message.createdAt,
15
+ updatedAt: message.updatedAt,
16
+ };
17
+ }
3
18
  //# sourceMappingURL=location.messages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.messages.js","sourceRoot":"","sources":["../../../src/dto/locations/location.messages.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"location.messages.js","sourceRoot":"","sources":["../../../src/dto/locations/location.messages.ts"],"names":[],"mappings":";;AAeA,kEAeC;AAfD,SAAgB,2BAA2B,CACzC,OAAwB;IAExB,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;AACJ,CAAC"}
@@ -1,27 +1,76 @@
1
1
  import { z } from 'zod';
2
- import { LocationBasicDto } from './location';
3
- import { LocationMessageDto } from './location.messages';
2
+ import { LocationPrivateDto, LocationPublicDto } from './location';
3
+ import { LocationMessageDto } from './location.message';
4
4
  import { LocationPresetDto } from './location.preset';
5
- export declare const LocationsPaginationQuerySchema: z.ZodObject<{
6
- page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7
- limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
5
+ export declare const UserLocationsQuerySchema: z.ZodObject<{
6
+ cursor: z.ZodOptional<z.ZodString>;
7
+ limit: z.ZodDefault<z.ZodNumber>;
8
8
  }, "strip", z.ZodTypeAny, {
9
- page: number;
10
9
  limit: number;
10
+ cursor?: string | undefined;
11
11
  }, {
12
- page?: number | undefined;
13
12
  limit?: number | undefined;
13
+ cursor?: string | undefined;
14
14
  }>;
15
- export type LocationsPaginationQueryDto = z.infer<typeof LocationsPaginationQuerySchema>;
16
- export interface LocationsPaginatedResponseDto {
17
- data: LocationBasicDto[];
15
+ export type UserLocationsQueryDto = z.infer<typeof UserLocationsQuerySchema>;
16
+ export interface UserLocationItemDto {
17
+ location: LocationPrivateDto;
18
+ lastMessage: LocationMessageDto | null;
19
+ unreadCount: number;
20
+ }
21
+ export interface UserLocationsResponseDto {
22
+ data: UserLocationItemDto[];
18
23
  meta: {
19
24
  total: number;
20
- page: number;
21
- limit: number;
22
- totalPages: number;
25
+ nextCursor?: string;
23
26
  };
24
27
  }
28
+ export declare const GetLocationParamsSchema: z.ZodObject<{
29
+ locationId: z.ZodEffects<z.ZodString, bigint, string>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ locationId: bigint;
32
+ }, {
33
+ locationId: string;
34
+ }>;
35
+ export type GetLocationParamsDto = z.infer<typeof GetLocationParamsSchema>;
36
+ export interface GetLocationResponseDto {
37
+ location: LocationPublicDto | LocationPrivateDto;
38
+ }
39
+ export declare const MarkLocationAsReadParamsSchema: z.ZodObject<{
40
+ locationId: z.ZodEffects<z.ZodString, bigint, string>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ locationId: bigint;
43
+ }, {
44
+ locationId: string;
45
+ }>;
46
+ export type MarkLocationAsReadParamsDto = z.infer<typeof MarkLocationAsReadParamsSchema>;
47
+ export declare const LocationUnreadCountParamsSchema: z.ZodObject<{
48
+ locationId: z.ZodEffects<z.ZodString, bigint, string>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ locationId: bigint;
51
+ }, {
52
+ locationId: string;
53
+ }>;
54
+ export type LocationUnreadCountParamsDto = z.infer<typeof LocationUnreadCountParamsSchema>;
55
+ export interface LocationUnreadCountResponseDto {
56
+ unreadCount: number;
57
+ }
58
+ export declare const LocationsUnreadCountQuerySchema: z.ZodObject<{
59
+ locationIds: z.ZodEffects<z.ZodEffects<z.ZodString, bigint[], string>, bigint[], string>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ locationIds: bigint[];
62
+ }, {
63
+ locationIds: string;
64
+ }>;
65
+ export type LocationsUnreadCountQueryDto = z.infer<typeof LocationsUnreadCountQuerySchema>;
66
+ export interface LocationUnreadCountItemDto {
67
+ locationId: bigint;
68
+ unreadCount: number;
69
+ lastMessage: LocationMessageDto | null;
70
+ }
71
+ export interface LocationsUnreadCountResponseDto {
72
+ data: LocationUnreadCountItemDto[];
73
+ }
25
74
  export interface LocationMessagesResponseDto {
26
75
  messages: LocationMessageDto[];
27
76
  cursor?: string;
@@ -55,7 +104,7 @@ export declare const CreateLocationFromPresetSchema: z.ZodObject<{
55
104
  }>;
56
105
  export type CreateLocationFromPresetDto = z.infer<typeof CreateLocationFromPresetSchema>;
57
106
  export interface CreateLocationFromPresetResponseDto {
58
- location: LocationBasicDto;
107
+ location: LocationPrivateDto;
59
108
  }
60
109
  export declare const LocationUpdateConfigSchema: z.ZodObject<{
61
110
  locationId: z.ZodBigInt;
@@ -104,13 +153,13 @@ export declare const LocationUpdateConfigSchema: z.ZodObject<{
104
153
  }, "strip", z.ZodTypeAny, {
105
154
  name?: string | undefined;
106
155
  description?: string | undefined;
156
+ thumbnail?: string | undefined;
157
+ environment?: "CHAT" | "WEB_BROWSER" | undefined;
107
158
  core?: {
108
159
  name: "round_robin" | "update_forever" | "update_once";
109
160
  sequential?: boolean | undefined;
110
161
  } | undefined;
111
162
  rules?: string[] | undefined;
112
- thumbnail?: string | undefined;
113
- environment?: "CHAT" | "WEB_BROWSER" | undefined;
114
163
  canvases?: {
115
164
  name: string;
116
165
  description: string;
@@ -124,13 +173,13 @@ export declare const LocationUpdateConfigSchema: z.ZodObject<{
124
173
  }, {
125
174
  name?: string | undefined;
126
175
  description?: string | undefined;
176
+ thumbnail?: string | undefined;
177
+ environment?: "CHAT" | "WEB_BROWSER" | undefined;
127
178
  core?: {
128
179
  name: "round_robin" | "update_forever" | "update_once";
129
180
  sequential?: boolean | undefined;
130
181
  } | undefined;
131
182
  rules?: string[] | undefined;
132
- thumbnail?: string | undefined;
133
- environment?: "CHAT" | "WEB_BROWSER" | undefined;
134
183
  canvases?: {
135
184
  name: string;
136
185
  description: string;
@@ -146,13 +195,13 @@ export declare const LocationUpdateConfigSchema: z.ZodObject<{
146
195
  config: {
147
196
  name?: string | undefined;
148
197
  description?: string | undefined;
198
+ thumbnail?: string | undefined;
199
+ environment?: "CHAT" | "WEB_BROWSER" | undefined;
149
200
  core?: {
150
201
  name: "round_robin" | "update_forever" | "update_once";
151
202
  sequential?: boolean | undefined;
152
203
  } | undefined;
153
204
  rules?: string[] | undefined;
154
- thumbnail?: string | undefined;
155
- environment?: "CHAT" | "WEB_BROWSER" | undefined;
156
205
  canvases?: {
157
206
  name: string;
158
207
  description: string;
@@ -169,13 +218,13 @@ export declare const LocationUpdateConfigSchema: z.ZodObject<{
169
218
  config: {
170
219
  name?: string | undefined;
171
220
  description?: string | undefined;
221
+ thumbnail?: string | undefined;
222
+ environment?: "CHAT" | "WEB_BROWSER" | undefined;
172
223
  core?: {
173
224
  name: "round_robin" | "update_forever" | "update_once";
174
225
  sequential?: boolean | undefined;
175
226
  } | undefined;
176
227
  rules?: string[] | undefined;
177
- thumbnail?: string | undefined;
178
- environment?: "CHAT" | "WEB_BROWSER" | undefined;
179
228
  canvases?: {
180
229
  name: string;
181
230
  description: string;
@@ -190,25 +239,36 @@ export declare const LocationUpdateConfigSchema: z.ZodObject<{
190
239
  locationId: bigint;
191
240
  }>;
192
241
  export type LocationUpdateConfigDto = z.infer<typeof LocationUpdateConfigSchema>;
193
- export declare const GetAgentHelperLocationSchema: z.ZodObject<{
242
+ export declare const GetAgentHelperLocationQuerySchema: z.ZodObject<{
194
243
  agentId: z.ZodBigInt;
195
244
  }, "strip", z.ZodTypeAny, {
196
245
  agentId: bigint;
197
246
  }, {
198
247
  agentId: bigint;
199
248
  }>;
200
- export type GetAgentHelperLocationDto = z.infer<typeof GetAgentHelperLocationSchema>;
249
+ export type GetAgentHelperLocationDto = z.infer<typeof GetAgentHelperLocationQuerySchema>;
201
250
  export interface GetAgentHelperLocationResponseDto {
202
- location: LocationBasicDto;
251
+ location: LocationPrivateDto;
203
252
  }
204
- export declare const GetLocationHelperLocationSchema: z.ZodObject<{
253
+ export declare const GetLocationHelperLocationQuerySchema: z.ZodObject<{
205
254
  locationId: z.ZodBigInt;
206
255
  }, "strip", z.ZodTypeAny, {
207
256
  locationId: bigint;
208
257
  }, {
209
258
  locationId: bigint;
210
259
  }>;
211
- export type GetLocationHelperLocationDto = z.infer<typeof GetLocationHelperLocationSchema>;
260
+ export type GetLocationHelperLocationDto = z.infer<typeof GetLocationHelperLocationQuerySchema>;
212
261
  export interface GetLocationHelperLocationResponseDto {
213
- location: LocationBasicDto;
262
+ location: LocationPrivateDto;
263
+ }
264
+ export declare const GetAgentDmLocationQuerySchema: z.ZodObject<{
265
+ agentId: z.ZodBigInt;
266
+ }, "strip", z.ZodTypeAny, {
267
+ agentId: bigint;
268
+ }, {
269
+ agentId: bigint;
270
+ }>;
271
+ export type GetAgentDmLocationDto = z.infer<typeof GetAgentDmLocationQuerySchema>;
272
+ export interface GetAgentDmLocationResponseDto {
273
+ location: LocationPrivateDto;
214
274
  }
@@ -1,27 +1,52 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetLocationHelperLocationSchema = exports.GetAgentHelperLocationSchema = exports.LocationUpdateConfigSchema = exports.CreateLocationFromPresetSchema = exports.LocationPresetsPaginationQuerySchema = exports.LocationsPaginationQuerySchema = void 0;
3
+ exports.GetAgentDmLocationQuerySchema = exports.GetLocationHelperLocationQuerySchema = exports.GetAgentHelperLocationQuerySchema = exports.LocationUpdateConfigSchema = exports.CreateLocationFromPresetSchema = exports.LocationPresetsPaginationQuerySchema = exports.LocationsUnreadCountQuerySchema = exports.LocationUnreadCountParamsSchema = exports.MarkLocationAsReadParamsSchema = exports.GetLocationParamsSchema = exports.UserLocationsQuerySchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const location_config_1 = require("../../models/locations/location.config");
6
- exports.LocationsPaginationQuerySchema = zod_1.z.object({
7
- page: zod_1.z.coerce.number().int().min(1).optional().default(1),
8
- limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(10),
6
+ exports.UserLocationsQuerySchema = zod_1.z.object({
7
+ cursor: zod_1.z.string().optional().describe('Pagination cursor for next page'),
8
+ limit: zod_1.z.coerce
9
+ .number()
10
+ .min(1)
11
+ .max(10)
12
+ .default(10)
13
+ .describe('Number of locations to return'),
14
+ });
15
+ exports.GetLocationParamsSchema = zod_1.z.object({
16
+ locationId: zod_1.z.string().transform((val) => BigInt(val)),
17
+ });
18
+ exports.MarkLocationAsReadParamsSchema = zod_1.z.object({
19
+ locationId: zod_1.z.string().transform((val) => BigInt(val)),
20
+ });
21
+ exports.LocationUnreadCountParamsSchema = zod_1.z.object({
22
+ locationId: zod_1.z.string().transform((val) => BigInt(val)),
23
+ });
24
+ exports.LocationsUnreadCountQuerySchema = zod_1.z.object({
25
+ locationIds: zod_1.z
26
+ .string()
27
+ .transform((val) => val.split(',').map((id) => BigInt(id.trim())))
28
+ .refine((arr) => arr.length > 0 && arr.length <= 10, {
29
+ message: 'locationIds must contain 1-10 location IDs',
30
+ }),
9
31
  });
10
32
  exports.LocationPresetsPaginationQuerySchema = zod_1.z.object({
11
33
  page: zod_1.z.coerce.number().int().min(1).optional().default(1),
12
34
  limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(20),
13
35
  });
14
36
  exports.CreateLocationFromPresetSchema = zod_1.z.object({
15
- presetId: zod_1.z.bigint(),
37
+ presetId: zod_1.z.coerce.bigint(),
16
38
  });
17
39
  exports.LocationUpdateConfigSchema = zod_1.z.object({
18
- locationId: zod_1.z.bigint(),
19
- config: location_config_1.LocationConfigSchema.partial(),
40
+ locationId: zod_1.z.coerce.bigint().describe('ID of the location to update'),
41
+ config: location_config_1.LocationConfigSchema.partial().describe('Only the specific configuration fields that need to be updated (name, environment, core, description, etc.)'),
42
+ });
43
+ exports.GetAgentHelperLocationQuerySchema = zod_1.z.object({
44
+ agentId: zod_1.z.coerce.bigint(),
20
45
  });
21
- exports.GetAgentHelperLocationSchema = zod_1.z.object({
22
- agentId: zod_1.z.bigint(),
46
+ exports.GetLocationHelperLocationQuerySchema = zod_1.z.object({
47
+ locationId: zod_1.z.coerce.bigint(),
23
48
  });
24
- exports.GetLocationHelperLocationSchema = zod_1.z.object({
25
- locationId: zod_1.z.bigint(),
49
+ exports.GetAgentDmLocationQuerySchema = zod_1.z.object({
50
+ agentId: zod_1.z.coerce.bigint(),
26
51
  });
27
52
  //# sourceMappingURL=location.requests.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.requests.js","sourceRoot":"","sources":["../../../src/dto/locations/location.requests.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEx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AAG,OAAC,CAAC,MAAM,CAAC;IAC3D,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC9B,CAAC,CAAC;AAUU,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC"}
@@ -69,12 +69,12 @@ export declare const LocationConfigSchema: z.ZodObject<{
69
69
  }, "strip", z.ZodTypeAny, {
70
70
  name: string;
71
71
  description: string;
72
+ environment: "CHAT" | "WEB_BROWSER";
72
73
  core: {
73
74
  name: "round_robin" | "update_forever" | "update_once";
74
75
  sequential?: boolean | undefined;
75
76
  };
76
77
  rules: string[];
77
- environment: "CHAT" | "WEB_BROWSER";
78
78
  canvases: {
79
79
  name: string;
80
80
  description: string;
@@ -89,12 +89,12 @@ export declare const LocationConfigSchema: z.ZodObject<{
89
89
  }, {
90
90
  name: string;
91
91
  description: string;
92
+ environment: "CHAT" | "WEB_BROWSER";
92
93
  core: {
93
94
  name: "round_robin" | "update_forever" | "update_once";
94
95
  sequential?: boolean | undefined;
95
96
  };
96
97
  rules: string[];
97
- environment: "CHAT" | "WEB_BROWSER";
98
98
  canvases: {
99
99
  name: string;
100
100
  description: string;
@@ -108,4 +108,3 @@ export declare const LocationConfigSchema: z.ZodObject<{
108
108
  thumbnail?: string | undefined;
109
109
  }>;
110
110
  export type LocationConfig = z.infer<typeof LocationConfigSchema>;
111
- export declare const DEFAULT_LOCATION_CONFIG: LocationConfig;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_LOCATION_CONFIG = exports.LocationConfigSchema = exports.LocationConfigCanvasSchema = exports.LocationConfigCoreSchema = exports.LocationEnvironmentSchema = void 0;
3
+ exports.LocationConfigSchema = exports.LocationConfigCanvasSchema = exports.LocationConfigCoreSchema = exports.LocationEnvironmentSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const location_constants_1 = require("./location.constants");
6
6
  exports.LocationEnvironmentSchema = zod_1.z.union([
@@ -55,21 +55,4 @@ exports.LocationConfigSchema = zod_1.z.object({
55
55
  .max(4)
56
56
  .describe('Private agent canvases for individual agent use, separate per location context'),
57
57
  });
58
- exports.DEFAULT_LOCATION_CONFIG = {
59
- name: 'Empty Location',
60
- environment: location_constants_1.LocationEnvironment.CHAT,
61
- core: {
62
- name: 'round_robin',
63
- },
64
- description: '',
65
- rules: [],
66
- canvases: [],
67
- agentCanvases: [
68
- {
69
- name: 'plan',
70
- description: 'Your private workspace for strategic thinking and task management. **Use this canvas CONSISTENTLY for any task requiring multiple steps, long-term tracking, or persistent information.** Break down complex goals into actionable steps (Plan-Do-Check-Act cycle recommended: 1. Outline steps, 2. Execute first step(s), 3. Check progress/results, 4. Adjust plan). Draft sequences of actions, list required resources, track progress, and refine strategies here before using tools. Keep it updated and organized to ensure effective execution.',
71
- maxLength: 1000,
72
- },
73
- ],
74
- };
75
58
  //# sourceMappingURL=location.config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.config.js","sourceRoot":"","sources":["../../../src/models/locations/location.config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,6DAA2D;AAE9C,QAAA,yBAAyB,GAAG,OAAC,CAAC,KAAK,CAAC;IAC/C,OAAC;SACE,OAAO,CAAC,wCAAmB,CAAC,IAAI,CAAC;SACjC,QAAQ,CACP,oEAAoE,CACrE;IACH,OAAC;SACE,OAAO,CAAC,wCAAmB,CAAC,WAAW,CAAC;SACxC,QAAQ,CACP,qEAAqE,CACtE;CACJ,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC;QACZ,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QACrE,OAAC;aACE,OAAO,CAAC,gBAAgB,CAAC;aACzB,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P,iFAAiF,CAClF;IAEH,QAAQ,EAAE,OAAC;SACR,KAAK,CAAC,kCAA0B,CAAC;SACjC,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,iFAAiF,CAClF;IACH,aAAa,EAAE,OAAC;SACb,KAAK,CAAC,kCAA0B,CAAC;SACjC,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,gFAAgF,CACjF;CACJ,CAAC,CAAC;AAIU,QAAA,uBAAuB,GAAmB;IACrD,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,wCAAmB,CAAC,IAAI;IAErC,IAAI,EAAE;QACJ,IAAI,EAAE,aAAa;KACpB;IACD,WAAW,EAAE,EAAE;IAEf,KAAK,EAAE,EAAE;IAET,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE;QACb;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EACT,yhBAAyhB;YAC3hB,SAAS,EAAE,IAAI;SAChB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"location.config.js","sourceRoot":"","sources":["../../../src/models/locations/location.config.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,6DAA2D;AAE9C,QAAA,yBAAyB,GAAG,OAAC,CAAC,KAAK,CAAC;IAC/C,OAAC;SACE,OAAO,CAAC,wCAAmB,CAAC,IAAI,CAAC;SACjC,QAAQ,CACP,oEAAoE,CACrE;IACH,OAAC;SACE,OAAO,CAAC,wCAAmB,CAAC,WAAW,CAAC;SACxC,QAAQ,CACP,qEAAqE,CACtE;CACJ,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC;QACZ,OAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,kCAAkC,CAAC;QACrE,OAAC;aACE,OAAO,CAAC,gBAAgB,CAAC;aACzB,QAAQ,CAAC,6CAA6C,CAAC;QAC1D,OAAC,CAAC,OAAO,CAAC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,kCAA0B,CAAC;SACjC,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,iFAAiF,CAClF;IACH,aAAa,EAAE,OAAC;SACb,KAAK,CAAC,kCAA0B,CAAC;SACjC,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,gFAAgF,CACjF;CACJ,CAAC,CAAC"}
@@ -1,7 +1,15 @@
1
+ export declare const LocationType: {
2
+ readonly PRIVATE: "PRIVATE";
3
+ readonly GROUP: "GROUP";
4
+ readonly PUBLIC: "PUBLIC";
5
+ readonly SYSTEM: "SYSTEM";
6
+ };
7
+ export type LocationType = (typeof LocationType)[keyof typeof LocationType];
1
8
  export declare const LocationEnvironment: {
2
9
  readonly CHAT: "CHAT";
3
10
  readonly AGENT_HELPER: "AGENT_HELPER";
4
11
  readonly LOCATION_HELPER: "LOCATION_HELPER";
12
+ readonly AGENT_DM: "AGENT_DM";
5
13
  readonly WEB_BROWSER: "WEB_BROWSER";
6
14
  readonly VIDEO_GAME: "VIDEO_GAME";
7
15
  };
@@ -1,10 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LocationEnvironment = void 0;
3
+ exports.LocationEnvironment = exports.LocationType = void 0;
4
+ exports.LocationType = {
5
+ PRIVATE: 'PRIVATE',
6
+ GROUP: 'GROUP',
7
+ PUBLIC: 'PUBLIC',
8
+ SYSTEM: 'SYSTEM',
9
+ };
4
10
  exports.LocationEnvironment = {
5
11
  CHAT: 'CHAT',
6
12
  AGENT_HELPER: 'AGENT_HELPER',
7
13
  LOCATION_HELPER: 'LOCATION_HELPER',
14
+ AGENT_DM: 'AGENT_DM',
8
15
  WEB_BROWSER: 'WEB_BROWSER',
9
16
  VIDEO_GAME: 'VIDEO_GAME',
10
17
  };
@@ -1 +1 @@
1
- {"version":3,"file":"location.constants.js","sourceRoot":"","sources":["../../../src/models/locations/location.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;CAChB,CAAC"}
1
+ {"version":3,"file":"location.constants.js","sourceRoot":"","sources":["../../../src/models/locations/location.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIE,QAAA,mBAAmB,GAAG;IACjC,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;IAClC,QAAQ,EAAE,UAAU;IACpB,WAAW,EAAE,aAAa;IAC1B,UAAU,EAAE,YAAY;CAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@little-samo/samo-ai-sdk",
3
- "version": "0.1.0-rv2",
3
+ "version": "0.1.0-rv4",
4
4
  "description": "SamoAI SDK",
5
5
  "license": "MIT",
6
6
  "repository": {