@gr33n-ai/jade-sdk-client 0.1.0 → 0.1.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.
@@ -1,145 +0,0 @@
1
- import { ConversationEntry } from '@gr33n-ai/agent-sdk-client';
2
-
3
- /**
4
- * Tool types for Jade SDK.
5
- * Used for parsing tool inputs and results.
6
- */
7
- interface ParsedToolInput {
8
- type: string;
9
- data: Record<string, unknown>;
10
- }
11
- interface ParsedToolResult {
12
- type: string;
13
- data: Record<string, unknown>;
14
- }
15
- interface ToolDefinition {
16
- name: string;
17
- displayName: string;
18
- iconName: string;
19
- iconVariant?: (input: unknown) => string;
20
- category: 'generation' | 'processing' | 'utility' | 'system';
21
- consumesResult: boolean;
22
- consumeExtra?: number;
23
- parseInput: (toolInput: unknown) => ParsedToolInput | null;
24
- parseResult?: (content: string) => ParsedToolResult | null;
25
- }
26
- interface MediaResult {
27
- requestId: string;
28
- urls: string[];
29
- fileType?: string;
30
- metadata?: Record<string, unknown>;
31
- originalSource?: string;
32
- }
33
- interface ToolMediaResult {
34
- requestId: string;
35
- urls: string[];
36
- fileType?: string;
37
- metadata?: Record<string, unknown>;
38
- originalSource?: string;
39
- originalToolUseId?: string;
40
- originalToolName?: string;
41
- prompt?: string;
42
- model?: string;
43
- aspectRatio?: string;
44
- inputMediaUrls?: string[];
45
- lastFrameUrl?: string;
46
- elements?: string[][];
47
- }
48
-
49
- /**
50
- * Parser for gr3.suggestion tags in assistant text.
51
- * Extracts suggestions and returns clean text with suggestion metadata.
52
- */
53
- interface ParsedSuggestion {
54
- text: string;
55
- startIndex: number;
56
- endIndex: number;
57
- }
58
- interface SuggestionParseResult {
59
- cleanText: string;
60
- suggestions: ParsedSuggestion[];
61
- segments: TextSegment[];
62
- }
63
- type TextSegment = {
64
- type: 'text';
65
- content: string;
66
- } | {
67
- type: 'suggestion';
68
- content: string;
69
- };
70
- /**
71
- * Parse text containing gr3.suggestion tags.
72
- * Returns the clean text (with tags removed) and an array of suggestions with their positions.
73
- */
74
- declare function parseSuggestions(text: string): SuggestionParseResult;
75
- /**
76
- * Check if text contains any gr3.suggestion tags.
77
- */
78
- declare function hasSuggestions(text: string): boolean;
79
-
80
- /**
81
- * Type definitions for Jade SDK.
82
- */
83
-
84
- interface ProcessedEntry {
85
- /** The original conversation entry */
86
- entry: ConversationEntry;
87
- /** Original entry type category */
88
- originalType: 'tool_call' | 'tool_result' | 'assistant_text' | 'user_text' | 'compact' | 'error';
89
- /** Display type for UI rendering */
90
- displayType: string;
91
- /** Icon name for this entry (e.g., 'Image', 'Video', 'Bot') */
92
- iconName: string;
93
- /** Additional data for dynamic icon selection */
94
- iconData?: unknown;
95
- /** Display title (for mcp__jade__ tools) */
96
- title?: string;
97
- /** Parsed data for rendering */
98
- data: Record<string, unknown>;
99
- /** ISO 8601 timestamp */
100
- timestamp: string;
101
- /** Tool definition if this is a tool call */
102
- toolDefinition?: ToolDefinition;
103
- /** Parsed input if this is a tool call */
104
- parsedInput?: ParsedToolInput;
105
- /** Parsed result if tool consumed its result */
106
- parsedResult?: ParsedToolResult;
107
- /** The consumed result entry (if tool consumed it) */
108
- consumedResult?: ConversationEntry;
109
- /** Media URLs extracted from the result */
110
- mediaUrls?: string[];
111
- /** Parsed suggestions from gr3.suggestion tags */
112
- suggestions?: ParsedSuggestion[];
113
- /** Text segments for rendering (alternating text and suggestions) */
114
- textSegments?: TextSegment[];
115
- }
116
- interface ProcessingOptions {
117
- /** Skip Skill context injection entries (default: true) */
118
- skipSkillContext?: boolean;
119
- /** Pair tool calls with their results (default: true) */
120
- pairToolResults?: boolean;
121
- /** Extract media URLs from results (default: true) */
122
- extractMedia?: boolean;
123
- }
124
- interface MediaInfo {
125
- /** Media URL */
126
- url: string;
127
- /** Media type */
128
- type: 'image' | 'video' | 'audio';
129
- /** ISO 8601 timestamp */
130
- timestamp: string;
131
- /** Tool name that generated this media */
132
- toolName?: string;
133
- /** Tool use ID */
134
- toolUseId?: string;
135
- /** Prompt used to generate this media */
136
- prompt?: string;
137
- /** Model used for generation */
138
- model?: string;
139
- /** Aspect ratio */
140
- aspectRatio?: string;
141
- /** Input media URLs used for generation */
142
- inputMediaUrls?: string[];
143
- }
144
-
145
- export { type MediaInfo as M, type ProcessingOptions as P, type SuggestionParseResult as S, type ToolDefinition as T, type ProcessedEntry as a, type ToolMediaResult as b, type ParsedToolResult as c, type ParsedToolInput as d, type ParsedSuggestion as e, type TextSegment as f, type MediaResult as g, hasSuggestions as h, parseSuggestions as p };
@@ -1,145 +0,0 @@
1
- import { ConversationEntry } from '@gr33n-ai/agent-sdk-client';
2
-
3
- /**
4
- * Tool types for Jade SDK.
5
- * Used for parsing tool inputs and results.
6
- */
7
- interface ParsedToolInput {
8
- type: string;
9
- data: Record<string, unknown>;
10
- }
11
- interface ParsedToolResult {
12
- type: string;
13
- data: Record<string, unknown>;
14
- }
15
- interface ToolDefinition {
16
- name: string;
17
- displayName: string;
18
- iconName: string;
19
- iconVariant?: (input: unknown) => string;
20
- category: 'generation' | 'processing' | 'utility' | 'system';
21
- consumesResult: boolean;
22
- consumeExtra?: number;
23
- parseInput: (toolInput: unknown) => ParsedToolInput | null;
24
- parseResult?: (content: string) => ParsedToolResult | null;
25
- }
26
- interface MediaResult {
27
- requestId: string;
28
- urls: string[];
29
- fileType?: string;
30
- metadata?: Record<string, unknown>;
31
- originalSource?: string;
32
- }
33
- interface ToolMediaResult {
34
- requestId: string;
35
- urls: string[];
36
- fileType?: string;
37
- metadata?: Record<string, unknown>;
38
- originalSource?: string;
39
- originalToolUseId?: string;
40
- originalToolName?: string;
41
- prompt?: string;
42
- model?: string;
43
- aspectRatio?: string;
44
- inputMediaUrls?: string[];
45
- lastFrameUrl?: string;
46
- elements?: string[][];
47
- }
48
-
49
- /**
50
- * Parser for gr3.suggestion tags in assistant text.
51
- * Extracts suggestions and returns clean text with suggestion metadata.
52
- */
53
- interface ParsedSuggestion {
54
- text: string;
55
- startIndex: number;
56
- endIndex: number;
57
- }
58
- interface SuggestionParseResult {
59
- cleanText: string;
60
- suggestions: ParsedSuggestion[];
61
- segments: TextSegment[];
62
- }
63
- type TextSegment = {
64
- type: 'text';
65
- content: string;
66
- } | {
67
- type: 'suggestion';
68
- content: string;
69
- };
70
- /**
71
- * Parse text containing gr3.suggestion tags.
72
- * Returns the clean text (with tags removed) and an array of suggestions with their positions.
73
- */
74
- declare function parseSuggestions(text: string): SuggestionParseResult;
75
- /**
76
- * Check if text contains any gr3.suggestion tags.
77
- */
78
- declare function hasSuggestions(text: string): boolean;
79
-
80
- /**
81
- * Type definitions for Jade SDK.
82
- */
83
-
84
- interface ProcessedEntry {
85
- /** The original conversation entry */
86
- entry: ConversationEntry;
87
- /** Original entry type category */
88
- originalType: 'tool_call' | 'tool_result' | 'assistant_text' | 'user_text' | 'compact' | 'error';
89
- /** Display type for UI rendering */
90
- displayType: string;
91
- /** Icon name for this entry (e.g., 'Image', 'Video', 'Bot') */
92
- iconName: string;
93
- /** Additional data for dynamic icon selection */
94
- iconData?: unknown;
95
- /** Display title (for mcp__jade__ tools) */
96
- title?: string;
97
- /** Parsed data for rendering */
98
- data: Record<string, unknown>;
99
- /** ISO 8601 timestamp */
100
- timestamp: string;
101
- /** Tool definition if this is a tool call */
102
- toolDefinition?: ToolDefinition;
103
- /** Parsed input if this is a tool call */
104
- parsedInput?: ParsedToolInput;
105
- /** Parsed result if tool consumed its result */
106
- parsedResult?: ParsedToolResult;
107
- /** The consumed result entry (if tool consumed it) */
108
- consumedResult?: ConversationEntry;
109
- /** Media URLs extracted from the result */
110
- mediaUrls?: string[];
111
- /** Parsed suggestions from gr3.suggestion tags */
112
- suggestions?: ParsedSuggestion[];
113
- /** Text segments for rendering (alternating text and suggestions) */
114
- textSegments?: TextSegment[];
115
- }
116
- interface ProcessingOptions {
117
- /** Skip Skill context injection entries (default: true) */
118
- skipSkillContext?: boolean;
119
- /** Pair tool calls with their results (default: true) */
120
- pairToolResults?: boolean;
121
- /** Extract media URLs from results (default: true) */
122
- extractMedia?: boolean;
123
- }
124
- interface MediaInfo {
125
- /** Media URL */
126
- url: string;
127
- /** Media type */
128
- type: 'image' | 'video' | 'audio';
129
- /** ISO 8601 timestamp */
130
- timestamp: string;
131
- /** Tool name that generated this media */
132
- toolName?: string;
133
- /** Tool use ID */
134
- toolUseId?: string;
135
- /** Prompt used to generate this media */
136
- prompt?: string;
137
- /** Model used for generation */
138
- model?: string;
139
- /** Aspect ratio */
140
- aspectRatio?: string;
141
- /** Input media URLs used for generation */
142
- inputMediaUrls?: string[];
143
- }
144
-
145
- export { type MediaInfo as M, type ProcessingOptions as P, type SuggestionParseResult as S, type ToolDefinition as T, type ProcessedEntry as a, type ToolMediaResult as b, type ParsedToolResult as c, type ParsedToolInput as d, type ParsedSuggestion as e, type TextSegment as f, type MediaResult as g, hasSuggestions as h, parseSuggestions as p };