at-shared-types 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/ReadMe.md ADDED
@@ -0,0 +1,3 @@
1
+ # at-shared-types
2
+
3
+ [![npm version](https://img.shields.io/npm/v/at-shared-types.svg)](https://www.npmjs.com/package/at-shared-types)
@@ -0,0 +1,6 @@
1
+ import { AIChatMessageDTO, AIChatWithIntentOptionsDTO } from "../engine";
2
+ export interface AIChatWithIntentRequestDTO {
3
+ session_id: string;
4
+ messages: AIChatMessageDTO[];
5
+ options?: AIChatWithIntentOptionsDTO;
6
+ }
@@ -0,0 +1,4 @@
1
+ import { AIChatResponseDTO, AIIntentDTO } from "../engine";
2
+ export interface AIChatWithIntentResponseDTO extends AIChatResponseDTO {
3
+ intents?: AIIntentDTO[];
4
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./chatWithIntentRequestDTO";
2
+ export * from "./chatWithIntentResponseDTO";
@@ -1,86 +1,48 @@
1
- export interface AIGenerateTextOptions {
2
- engineID?: string;
3
- type?: string;
4
- model?: string;
5
- temperature?: number;
6
- maxTokens?: number;
7
- systemPrompt?: string;
8
- }
9
- export interface AIGenerateTextResult {
10
- text: string;
11
- raw?: any;
12
- engineID: string;
13
- }
14
- export type ATChatMessageContent = string | null;
1
+ export type ATChatMessageContentDTO = string | null;
15
2
  /**
16
3
  * Internal representation — can include nulls for assistant messages, etc.
17
4
  */
18
- export type AIChatMessage = {
19
- role: "system";
20
- content: ATChatMessageContent;
21
- } | {
22
- role: "user";
23
- content: ATChatMessageContent;
24
- } | {
25
- role: "assistant";
26
- content: ATChatMessageContent;
27
- };
28
- /**
29
- * Provider-safe variant (no null content, matches what OpenAI expects)
30
- */
31
- export type AIChatInputMessage = {
5
+ export type AIChatMessageDTO = {
32
6
  role: "system";
33
- content: Exclude<ATChatMessageContent, null>;
7
+ content: ATChatMessageContentDTO;
34
8
  } | {
35
9
  role: "user";
36
- content: Exclude<ATChatMessageContent, null>;
10
+ content: ATChatMessageContentDTO;
37
11
  } | {
38
12
  role: "assistant";
39
- content: Exclude<ATChatMessageContent, null>;
13
+ content: ATChatMessageContentDTO;
40
14
  };
41
- export type AIChatOptionsResponseFormat = {
15
+ export type AIChatOptionsResponseFormatDTO = {
42
16
  type: "text";
43
17
  } | {
44
18
  type: "json";
45
19
  jsonSchema?: Record<string, any>;
46
20
  };
47
- export interface AIChatOptions {
21
+ export interface AIChatOptionsDTO {
48
22
  model?: string;
49
23
  temperature?: number;
50
24
  maxTokens?: number;
51
25
  engineID?: string;
52
- responseFormat?: AIChatOptionsResponseFormat;
26
+ responseFormat?: AIChatOptionsResponseFormatDTO;
53
27
  }
54
- export interface AIChatResponse {
55
- message: AIChatMessage;
28
+ export interface AIChatResponseDTO {
29
+ message: AIChatMessageDTO;
56
30
  usage?: {
57
31
  tokens?: number;
58
32
  };
59
33
  raw?: any;
60
34
  debug?: any;
61
35
  }
62
- export interface AIIntent {
36
+ export interface AIIntentDTO {
63
37
  capabilityID: string;
64
38
  params?: object;
65
39
  confidence?: number;
66
40
  reason?: string;
67
41
  }
68
- export interface AICapability {
42
+ export interface AICapabilityDTO {
69
43
  id: string;
70
44
  description: string;
71
45
  }
72
- export interface AIChatWithIntentOptions extends AIChatOptions {
73
- capabilities?: AICapability[];
74
- }
75
- export interface AIChatWithIntentResponse extends AIChatResponse {
76
- intents?: AIIntent[];
77
- }
78
- export interface AIEmbedOptions {
79
- model?: string;
80
- engineID?: string;
81
- }
82
- export interface AIEmbedResponse {
83
- embeddings: number[] | number[][];
84
- model: string;
85
- engineID: string;
46
+ export interface AIChatWithIntentOptionsDTO extends AIChatOptionsDTO {
47
+ capabilities?: AICapabilityDTO[];
86
48
  }
@@ -1 +1,2 @@
1
1
  export * from "./engine";
2
+ export * from "./chat/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "at-shared-types",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "types": "dist/index.d.ts",
5
5
  "files": [
6
6
  "dist"