@mastra/react 1.0.0-beta.24 → 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/CHANGELOG.md +2819 -2
- package/LICENSE.md +15 -0
- package/dist/agent/extractRunIdFromMessages.d.ts +10 -0
- package/dist/agent/extractRunIdFromMessages.d.ts.map +1 -0
- package/dist/agent/hooks.d.ts +91 -0
- package/dist/agent/hooks.d.ts.map +1 -0
- package/dist/agent/signal-data.d.ts +2 -0
- package/dist/agent/signal-data.d.ts.map +1 -0
- package/dist/{src/agent → agent}/types.d.ts +6 -1
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/index.cjs +3743 -63
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3676 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/mastra-db/accumulator.d.ts +48 -0
- package/dist/lib/mastra-db/accumulator.d.ts.map +1 -0
- package/dist/lib/mastra-db/formatCompletionFeedback.d.ts +19 -0
- package/dist/lib/mastra-db/formatCompletionFeedback.d.ts.map +1 -0
- package/dist/lib/mastra-db/fromCoreUserMessage.d.ts +14 -0
- package/dist/lib/mastra-db/fromCoreUserMessage.d.ts.map +1 -0
- package/dist/lib/mastra-db/index.d.ts +6 -0
- package/dist/lib/mastra-db/index.d.ts.map +1 -0
- package/dist/lib/mastra-db/types.d.ts +171 -0
- package/dist/lib/mastra-db/types.d.ts.map +1 -0
- package/dist/lib/use-mutation.d.ts +28 -0
- package/dist/lib/use-mutation.d.ts.map +1 -0
- package/dist/mastra-client-context.d.ts +26 -0
- package/dist/mastra-client-context.d.ts.map +1 -0
- package/dist/mastra-react-provider.d.ts +5 -0
- package/dist/mastra-react-provider.d.ts.map +1 -0
- package/dist/react.css +184 -322
- package/dist/{src/ui → ui}/Code/Code.d.ts +2 -1
- package/dist/ui/Code/Code.d.ts.map +1 -0
- package/dist/ui/Code/highlight.d.ts +4 -0
- package/dist/ui/Code/highlight.d.ts.map +1 -0
- package/dist/ui/Code/index.d.ts +2 -0
- package/dist/ui/Code/index.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Entity/Entity.d.ts +2 -1
- package/dist/ui/Entity/Entity.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Entity/Entry.d.ts +2 -1
- package/dist/ui/Entity/Entry.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Entity/ToolApproval.d.ts +1 -0
- package/dist/ui/Entity/ToolApproval.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Entity/context.d.ts +4 -3
- package/dist/ui/Entity/context.d.ts.map +1 -0
- package/dist/ui/Entity/index.d.ts +5 -0
- package/dist/ui/Entity/index.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Entity/types.d.ts +1 -0
- package/dist/ui/Entity/types.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Icon/Icon.d.ts +2 -1
- package/dist/ui/Icon/Icon.d.ts.map +1 -0
- package/dist/ui/Icon/index.d.ts +2 -0
- package/dist/ui/Icon/index.d.ts.map +1 -0
- package/dist/{src/ui → ui}/IconButton/IconButton.d.ts +2 -1
- package/dist/ui/IconButton/IconButton.d.ts.map +1 -0
- package/dist/ui/IconButton/index.d.ts +2 -0
- package/dist/ui/IconButton/index.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Icons/AgentIcon.d.ts +2 -1
- package/dist/ui/Icons/AgentIcon.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Icons/ToolsIcon.d.ts +2 -1
- package/dist/ui/Icons/ToolsIcon.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Icons/WorkflowIcon.d.ts +2 -1
- package/dist/ui/Icons/WorkflowIcon.d.ts.map +1 -0
- package/dist/ui/Icons/index.d.ts +4 -0
- package/dist/ui/Icons/index.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Message/Message.d.ts +2 -1
- package/dist/ui/Message/Message.d.ts.map +1 -0
- package/dist/ui/Message/index.d.ts +2 -0
- package/dist/ui/Message/index.d.ts.map +1 -0
- package/dist/ui/MessageFactory/MessageFactory.d.ts +22 -0
- package/dist/ui/MessageFactory/MessageFactory.d.ts.map +1 -0
- package/dist/ui/MessageFactory/index.d.ts +3 -0
- package/dist/ui/MessageFactory/index.d.ts.map +1 -0
- package/dist/ui/MessageFactory/types.d.ts +181 -0
- package/dist/ui/MessageFactory/types.d.ts.map +1 -0
- package/dist/{src/ui → ui}/Tooltip/Tooltip.d.ts +2 -1
- package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/ui/Tooltip/index.d.ts +2 -0
- package/dist/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/voice/index.d.ts +5 -0
- package/dist/voice/index.d.ts.map +1 -0
- package/dist/voice/play-stream-with-web-audio.d.ts +2 -0
- package/dist/voice/play-stream-with-web-audio.d.ts.map +1 -0
- package/dist/voice/record-mic-to-file.d.ts +2 -0
- package/dist/voice/record-mic-to-file.d.ts.map +1 -0
- package/dist/voice/use-speech-recognition.d.ts +20 -0
- package/dist/voice/use-speech-recognition.d.ts.map +1 -0
- package/dist/workflows/WorkflowStepFactory/WorkflowStepFactory.d.ts +8 -0
- package/dist/workflows/WorkflowStepFactory/WorkflowStepFactory.d.ts.map +1 -0
- package/dist/workflows/WorkflowStepFactory/index.d.ts +3 -0
- package/dist/workflows/WorkflowStepFactory/index.d.ts.map +1 -0
- package/dist/workflows/WorkflowStepFactory/types.d.ts +72 -0
- package/dist/workflows/WorkflowStepFactory/types.d.ts.map +1 -0
- package/dist/workflows/hooks.d.ts +34 -0
- package/dist/workflows/hooks.d.ts.map +1 -0
- package/dist/workflows/index.d.ts +4 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/types.d.ts +122 -0
- package/dist/workflows/types.d.ts.map +1 -0
- package/dist/workflows/use-stream-workflow.d.ts +39 -0
- package/dist/workflows/use-stream-workflow.d.ts.map +1 -0
- package/package.json +35 -31
- package/dist/chunk-55VPMN3N-BuLK6rn1.js +0 -249
- package/dist/chunk-55VPMN3N-BuLK6rn1.js.map +0 -1
- package/dist/chunk-55VPMN3N-Dhj5NfGj.cjs +0 -251
- package/dist/chunk-55VPMN3N-Dhj5NfGj.cjs.map +0 -1
- package/dist/index-BEw00-Pp.cjs +0 -20642
- package/dist/index-BEw00-Pp.cjs.map +0 -1
- package/dist/index-BaK_Y6TP.cjs +0 -185
- package/dist/index-BaK_Y6TP.cjs.map +0 -1
- package/dist/index-C1OzXW5i.js +0 -180
- package/dist/index-C1OzXW5i.js.map +0 -1
- package/dist/index-CIU9zuI1.js +0 -20559
- package/dist/index-CIU9zuI1.js.map +0 -1
- package/dist/src/agent/hooks.d.ts +0 -63
- package/dist/src/index.d.ts +0 -6
- package/dist/src/lib/ai-sdk/index.d.ts +0 -4
- package/dist/src/lib/ai-sdk/memory/resolveInitialMessages.d.ts +0 -12
- package/dist/src/lib/ai-sdk/memory/resolveInitialMessages.test.d.ts +0 -1
- package/dist/src/lib/ai-sdk/transformers/AISdkNetworkTransformer.d.ts +0 -10
- package/dist/src/lib/ai-sdk/transformers/AISdkNetworkTransformer.test.d.ts +0 -1
- package/dist/src/lib/ai-sdk/transformers/types.d.ts +0 -10
- package/dist/src/lib/ai-sdk/types.d.ts +0 -90
- package/dist/src/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.d.ts +0 -10
- package/dist/src/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.test.d.ts +0 -1
- package/dist/src/lib/ai-sdk/utils/toAssistantUIMessage.d.ts +0 -14
- package/dist/src/lib/ai-sdk/utils/toAssistantUIMessage.test.d.ts +0 -1
- package/dist/src/lib/ai-sdk/utils/toUIMessage.d.ts +0 -17
- package/dist/src/lib/ai-sdk/utils/toUIMessage.test.d.ts +0 -1
- package/dist/src/mastra-client-context.d.ts +0 -10
- package/dist/src/mastra-react-provider.d.ts +0 -4
- package/dist/src/ui/Code/highlight.d.ts +0 -3
- package/dist/src/ui/Code/index.d.ts +0 -1
- package/dist/src/ui/Entity/Entity.stories.d.ts +0 -22
- package/dist/src/ui/Entity/index.d.ts +0 -4
- package/dist/src/ui/Icon/index.d.ts +0 -1
- package/dist/src/ui/IconButton/IconButton.stories.d.ts +0 -12
- package/dist/src/ui/IconButton/index.d.ts +0 -1
- package/dist/src/ui/Icons/index.d.ts +0 -3
- package/dist/src/ui/Message/Message.stories.d.ts +0 -13
- package/dist/src/ui/Message/index.d.ts +0 -1
- package/dist/src/ui/Tooltip/Tooltip.stories.d.ts +0 -12
- package/dist/src/ui/Tooltip/index.d.ts +0 -1
- package/dist/src/ui/index.d.ts +0 -7
- package/dist/token-6GSAFR2W-SPYPLMBM-Bmb7aObX.js +0 -60
- package/dist/token-6GSAFR2W-SPYPLMBM-Bmb7aObX.js.map +0 -1
- package/dist/token-6GSAFR2W-SPYPLMBM-DPP_j841.cjs +0 -64
- package/dist/token-6GSAFR2W-SPYPLMBM-DPP_j841.cjs.map +0 -1
- package/dist/token-util-NEHG7TUY-JRJTGTAB-0WkcL_9T.cjs +0 -11
- package/dist/token-util-NEHG7TUY-JRJTGTAB-0WkcL_9T.cjs.map +0 -1
- package/dist/token-util-NEHG7TUY-JRJTGTAB-BLZ0BA54.js +0 -7
- package/dist/token-util-NEHG7TUY-JRJTGTAB-BLZ0BA54.js.map +0 -1
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ModelSettings } from './types';
|
|
2
|
-
import { UIMessage } from '@ai-sdk/react';
|
|
3
|
-
import { MastraUIMessage } from '../lib/ai-sdk';
|
|
4
|
-
import { CoreUserMessage } from '@mastra/core/llm';
|
|
5
|
-
import { RequestContext } from '@mastra/core/request-context';
|
|
6
|
-
import { ChunkType, NetworkChunkType } from '@mastra/core/stream';
|
|
7
|
-
import { TracingOptions } from '@mastra/core/observability';
|
|
8
|
-
export interface MastraChatProps {
|
|
9
|
-
agentId: string;
|
|
10
|
-
resourceId?: string;
|
|
11
|
-
initializeMessages?: () => MastraUIMessage[];
|
|
12
|
-
}
|
|
13
|
-
interface SharedArgs {
|
|
14
|
-
coreUserMessages: CoreUserMessage[];
|
|
15
|
-
requestContext?: RequestContext;
|
|
16
|
-
threadId?: string;
|
|
17
|
-
modelSettings?: ModelSettings;
|
|
18
|
-
signal?: AbortSignal;
|
|
19
|
-
tracingOptions?: TracingOptions;
|
|
20
|
-
}
|
|
21
|
-
export type SendMessageArgs = {
|
|
22
|
-
message: string;
|
|
23
|
-
coreUserMessages?: CoreUserMessage[];
|
|
24
|
-
} & (({
|
|
25
|
-
mode: 'generate';
|
|
26
|
-
} & Omit<GenerateArgs, 'coreUserMessages'>) | ({
|
|
27
|
-
mode: 'stream';
|
|
28
|
-
} & Omit<StreamArgs, 'coreUserMessages'>) | ({
|
|
29
|
-
mode: 'network';
|
|
30
|
-
} & Omit<NetworkArgs, 'coreUserMessages'>) | ({
|
|
31
|
-
mode?: undefined;
|
|
32
|
-
} & Omit<StreamArgs, 'coreUserMessages'>));
|
|
33
|
-
export type GenerateArgs = SharedArgs & {
|
|
34
|
-
onFinish?: (messages: UIMessage[]) => Promise<void>;
|
|
35
|
-
};
|
|
36
|
-
export type StreamArgs = SharedArgs & {
|
|
37
|
-
onChunk?: (chunk: ChunkType) => Promise<void>;
|
|
38
|
-
};
|
|
39
|
-
export type NetworkArgs = SharedArgs & {
|
|
40
|
-
onNetworkChunk?: (chunk: NetworkChunkType) => Promise<void>;
|
|
41
|
-
};
|
|
42
|
-
export declare const useChat: ({ agentId, resourceId, initializeMessages }: MastraChatProps) => {
|
|
43
|
-
setMessages: import('react').Dispatch<import('react').SetStateAction<MastraUIMessage[]>>;
|
|
44
|
-
sendMessage: ({ mode, ...args }: SendMessageArgs) => Promise<void>;
|
|
45
|
-
isRunning: boolean;
|
|
46
|
-
messages: MastraUIMessage[];
|
|
47
|
-
approveToolCall: (toolCallId: string) => Promise<void>;
|
|
48
|
-
declineToolCall: (toolCallId: string) => Promise<void>;
|
|
49
|
-
cancelRun: () => void;
|
|
50
|
-
toolCallApprovals: {
|
|
51
|
-
[toolCallId: string]: {
|
|
52
|
-
status: "approved" | "declined";
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
approveNetworkToolCall: (toolName: string, runId?: string) => Promise<void>;
|
|
56
|
-
declineNetworkToolCall: (toolName: string, runId?: string) => Promise<void>;
|
|
57
|
-
networkToolCallApprovals: {
|
|
58
|
-
[toolName: string]: {
|
|
59
|
-
status: "approved" | "declined";
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
export {};
|
package/dist/src/index.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { MastraUIMessage } from '../types';
|
|
2
|
-
interface ChildMessage {
|
|
3
|
-
type: 'tool' | 'text';
|
|
4
|
-
toolCallId?: string;
|
|
5
|
-
toolName?: string;
|
|
6
|
-
args?: Record<string, unknown>;
|
|
7
|
-
toolOutput?: Record<string, unknown>;
|
|
8
|
-
content?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const resolveInitialMessages: (messages: MastraUIMessage[]) => MastraUIMessage[];
|
|
11
|
-
export declare const resolveToChildMessages: (messages: MastraUIMessage[]) => ChildMessage[];
|
|
12
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NetworkChunkType } from '@mastra/core/stream';
|
|
2
|
-
import { Transformer, TransformerArgs } from './types';
|
|
3
|
-
import { MastraUIMessage } from '../types';
|
|
4
|
-
export declare class AISdkNetworkTransformer implements Transformer<NetworkChunkType> {
|
|
5
|
-
transform({ chunk, conversation, metadata }: TransformerArgs<NetworkChunkType>): MastraUIMessage[];
|
|
6
|
-
private handleRoutingAgentConversation;
|
|
7
|
-
private handleAgentConversation;
|
|
8
|
-
private handleWorkflowConversation;
|
|
9
|
-
private handleToolConversation;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { NetworkChunkType } from '@mastra/core/stream';
|
|
2
|
-
import { MastraUIMessage, MastraUIMessageMetadata } from '../types';
|
|
3
|
-
export interface TransformerArgs<T> {
|
|
4
|
-
chunk: NetworkChunkType;
|
|
5
|
-
conversation: MastraUIMessage[];
|
|
6
|
-
metadata: MastraUIMessageMetadata;
|
|
7
|
-
}
|
|
8
|
-
export interface Transformer<T> {
|
|
9
|
-
transform: (args: TransformerArgs<T>) => MastraUIMessage[];
|
|
10
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { UIMessage } from '@ai-sdk/react';
|
|
2
|
-
import { CompleteAttachment } from '@assistant-ui/react';
|
|
3
|
-
/**
|
|
4
|
-
* Tripwire metadata included when a processor triggers a tripwire
|
|
5
|
-
*/
|
|
6
|
-
export type TripwireMetadata = {
|
|
7
|
-
/** Whether the agent should retry with feedback */
|
|
8
|
-
retry?: boolean;
|
|
9
|
-
/** Custom metadata from the processor */
|
|
10
|
-
tripwirePayload?: unknown;
|
|
11
|
-
/** ID of the processor that triggered the tripwire */
|
|
12
|
-
processorId?: string;
|
|
13
|
-
};
|
|
14
|
-
export type MastraUIMessageMetadata = {
|
|
15
|
-
status?: 'warning' | 'error' | 'tripwire';
|
|
16
|
-
/** Tripwire-specific metadata when status is 'tripwire' */
|
|
17
|
-
tripwire?: TripwireMetadata;
|
|
18
|
-
} & ({
|
|
19
|
-
mode: 'generate';
|
|
20
|
-
} | {
|
|
21
|
-
mode: 'stream';
|
|
22
|
-
requireApprovalMetadata?: {
|
|
23
|
-
[toolName: string]: {
|
|
24
|
-
toolCallId: string;
|
|
25
|
-
toolName: string;
|
|
26
|
-
args: Record<string, any>;
|
|
27
|
-
runId?: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
suspendedTools?: {
|
|
31
|
-
[toolName: string]: {
|
|
32
|
-
toolCallId: string;
|
|
33
|
-
toolName: string;
|
|
34
|
-
args: Record<string, any>;
|
|
35
|
-
suspendPayload: any;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
} | {
|
|
39
|
-
mode: 'network';
|
|
40
|
-
from?: 'AGENT' | 'WORKFLOW' | 'TOOL';
|
|
41
|
-
selectionReason?: string;
|
|
42
|
-
agentInput?: string | object | Array<object>;
|
|
43
|
-
hasMoreMessages?: boolean;
|
|
44
|
-
completionResult?: {
|
|
45
|
-
passed: boolean;
|
|
46
|
-
};
|
|
47
|
-
requireApprovalMetadata?: {
|
|
48
|
-
[toolName: string]: {
|
|
49
|
-
toolCallId: string;
|
|
50
|
-
toolName: string;
|
|
51
|
-
args: Record<string, any>;
|
|
52
|
-
runId?: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
suspendedTools?: {
|
|
56
|
-
[toolName: string]: {
|
|
57
|
-
toolCallId: string;
|
|
58
|
-
toolName: string;
|
|
59
|
-
args: Record<string, any>;
|
|
60
|
-
suspendPayload: any;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
});
|
|
64
|
-
/**
|
|
65
|
-
* Mastra-extended text part with textId for tracking separate text streams.
|
|
66
|
-
*
|
|
67
|
-
* This follows the same pattern as the existing `state` property which is already
|
|
68
|
-
* added to text parts in the codebase. Both `state` and `textId` are Mastra-specific
|
|
69
|
-
* extensions to the standard AI SDK TextUIPart.
|
|
70
|
-
*/
|
|
71
|
-
export type MastraExtendedTextPart = {
|
|
72
|
-
type: 'text';
|
|
73
|
-
text: string;
|
|
74
|
-
/** Unique identifier for this text stream (from chunk.payload.id) */
|
|
75
|
-
textId?: string;
|
|
76
|
-
/** Streaming state - already exists in codebase for text parts */
|
|
77
|
-
state?: 'streaming' | 'done';
|
|
78
|
-
/** Provider-specific metadata */
|
|
79
|
-
providerMetadata?: any;
|
|
80
|
-
};
|
|
81
|
-
export type MastraUIMessage = UIMessage<MastraUIMessageMetadata, any, any>;
|
|
82
|
-
/**
|
|
83
|
-
* Extended type for MastraUIMessage that may include additional properties
|
|
84
|
-
* from different sources (generate, toUIMessage, toNetworkUIMessage)
|
|
85
|
-
*/
|
|
86
|
-
export type ExtendedMastraUIMessage = MastraUIMessage & {
|
|
87
|
-
createdAt?: Date;
|
|
88
|
-
metadata?: Record<string, unknown>;
|
|
89
|
-
experimental_attachments?: readonly CompleteAttachment[];
|
|
90
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CoreUserMessage } from '@mastra/core/llm';
|
|
2
|
-
import { MastraUIMessage } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Converts a CoreUserMessage to a MastraUIMessage (UIMessage format).
|
|
5
|
-
*
|
|
6
|
-
* Handles all CoreUserMessage content types:
|
|
7
|
-
* - String content → single text part
|
|
8
|
-
* - Array content with text/image/file parts → corresponding UIMessage parts
|
|
9
|
-
*/
|
|
10
|
-
export declare const fromCoreUserMessageToUIMessage: (coreUserMessage: CoreUserMessage) => MastraUIMessage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ThreadMessageLike } from '@assistant-ui/react';
|
|
2
|
-
import { MastraUIMessage } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Converts a Mastra UIMessage (from AI SDK) to a ThreadMessageLike format compatible with @assistant-ui/react.
|
|
5
|
-
*
|
|
6
|
-
* This function handles UIMessages from three sources:
|
|
7
|
-
* - agent.generate: Full output with all message parts
|
|
8
|
-
* - toUIMessage: Streaming chunks accumulated into UIMessages
|
|
9
|
-
* - toNetworkUIMessage: Network execution events accumulated into UIMessages
|
|
10
|
-
*
|
|
11
|
-
* @param message - The MastraUIMessage to convert
|
|
12
|
-
* @returns A ThreadMessageLike compatible with @assistant-ui/react
|
|
13
|
-
*/
|
|
14
|
-
export declare const toAssistantUIMessage: (message: MastraUIMessage) => ThreadMessageLike;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ChunkType } from '@mastra/core/stream';
|
|
2
|
-
import { MastraUIMessage, MastraUIMessageMetadata } from '../types';
|
|
3
|
-
import { WorkflowStreamResult } from '@mastra/core/workflows';
|
|
4
|
-
type StreamChunk = {
|
|
5
|
-
type: string;
|
|
6
|
-
payload: any;
|
|
7
|
-
runId: string;
|
|
8
|
-
from: 'AGENT' | 'WORKFLOW';
|
|
9
|
-
};
|
|
10
|
-
export declare const mapWorkflowStreamChunkToWatchResult: (prev: WorkflowStreamResult<any, any, any, any>, chunk: StreamChunk) => WorkflowStreamResult<any, any, any, any>;
|
|
11
|
-
export interface ToUIMessageArgs {
|
|
12
|
-
chunk: ChunkType;
|
|
13
|
-
conversation: MastraUIMessage[];
|
|
14
|
-
metadata: MastraUIMessageMetadata;
|
|
15
|
-
}
|
|
16
|
-
export declare const toUIMessage: ({ chunk, conversation, metadata }: ToUIMessageArgs) => MastraUIMessage[];
|
|
17
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { MastraClient } from '@mastra/client-js';
|
|
3
|
-
export type MastraClientContextType = MastraClient;
|
|
4
|
-
export interface MastraClientProviderProps {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
baseUrl?: string;
|
|
7
|
-
headers?: Record<string, string>;
|
|
8
|
-
}
|
|
9
|
-
export declare const MastraClientProvider: ({ children, baseUrl, headers }: MastraClientProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare const useMastraClient: () => MastraClient;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { MastraClientProviderProps } from './mastra-client-context';
|
|
2
|
-
type MastraReactProviderProps = MastraClientProviderProps;
|
|
3
|
-
export declare const MastraReactProvider: ({ children, baseUrl, headers }: MastraReactProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Code';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { EntityVariant } from './types';
|
|
3
|
-
interface ComponentProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
additionalClass?: string;
|
|
6
|
-
variant?: EntityVariant;
|
|
7
|
-
requireApproval?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const meta: {
|
|
10
|
-
title: string;
|
|
11
|
-
component: ({ className, additionalClass, variant, requireApproval }: ComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
parameters: {};
|
|
13
|
-
tags: string[];
|
|
14
|
-
argTypes: {};
|
|
15
|
-
args: {};
|
|
16
|
-
};
|
|
17
|
-
export default meta;
|
|
18
|
-
type Story = StoryObj<typeof meta>;
|
|
19
|
-
export declare const Default: Story;
|
|
20
|
-
export declare const OverrideByCustomClass: Story;
|
|
21
|
-
export declare const ExtandedByAdditionalClass: Story;
|
|
22
|
-
export declare const Disabled: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Icon';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {};
|
|
6
|
-
tags: string[];
|
|
7
|
-
argTypes: {};
|
|
8
|
-
args: {};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './IconButton';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {};
|
|
6
|
-
tags: string[];
|
|
7
|
-
argTypes: {};
|
|
8
|
-
args: {};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
13
|
-
export declare const Streaming: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Message';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: () => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {};
|
|
6
|
-
tags: string[];
|
|
7
|
-
argTypes: {};
|
|
8
|
-
args: {};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Tooltip';
|
package/dist/src/ui/index.d.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { r as require_token_util } from './chunk-55VPMN3N-BuLK6rn1.js';
|
|
2
|
-
import { _ as __commonJS, r as require_token_error } from './index-CIU9zuI1.js';
|
|
3
|
-
|
|
4
|
-
// ../_vendored/ai_v5/dist/token-6GSAFR2W.js
|
|
5
|
-
var require_token = __commonJS({
|
|
6
|
-
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __export = (target, all) => {
|
|
12
|
-
for (var name in all)
|
|
13
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
14
|
-
};
|
|
15
|
-
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
-
for (let key of __getOwnPropNames(from))
|
|
18
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
19
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
-
var token_exports = {};
|
|
25
|
-
__export(token_exports, {
|
|
26
|
-
refreshToken: () => refreshToken
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(token_exports);
|
|
29
|
-
var import_token_error = require_token_error();
|
|
30
|
-
var import_token_util = require_token_util();
|
|
31
|
-
async function refreshToken() {
|
|
32
|
-
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
33
|
-
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
34
|
-
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
35
|
-
const authToken = (0, import_token_util.getVercelCliToken)();
|
|
36
|
-
if (!authToken) {
|
|
37
|
-
throw new import_token_error.VercelOidcTokenError(
|
|
38
|
-
"Failed to refresh OIDC token: login to vercel cli"
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
if (!projectId) {
|
|
42
|
-
throw new import_token_error.VercelOidcTokenError(
|
|
43
|
-
"Failed to refresh OIDC token: project id not found"
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
47
|
-
if (!maybeToken) {
|
|
48
|
-
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
49
|
-
}
|
|
50
|
-
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
51
|
-
}
|
|
52
|
-
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
var token6GSAFR2W = require_token();
|
|
58
|
-
|
|
59
|
-
export { token6GSAFR2W as default };
|
|
60
|
-
//# sourceMappingURL=token-6GSAFR2W-SPYPLMBM-Bmb7aObX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-6GSAFR2W-SPYPLMBM-Bmb7aObX.js","sources":["../../../packages/core/dist/token-6GSAFR2W-SPYPLMBM.js"],"sourcesContent":["import { require_token_util } from './chunk-55VPMN3N.js';\nimport { __commonJS, require_token_error } from './chunk-D22XABFZ.js';\n\n// ../_vendored/ai_v5/dist/token-6GSAFR2W.js\nvar require_token = __commonJS({\n \"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js\"(exports, module) {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n var token_exports = {};\n __export(token_exports, {\n refreshToken: () => refreshToken\n });\n module.exports = __toCommonJS(token_exports);\n var import_token_error = require_token_error();\n var import_token_util = require_token_util();\n async function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: login to vercel cli\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: project id not found\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n }\n }\n});\nvar token6GSAFR2W = require_token();\n\nexport { token6GSAFR2W as default };\n//# sourceMappingURL=token-6GSAFR2W-SPYPLMBM.js.map\n//# sourceMappingURL=token-6GSAFR2W-SPYPLMBM.js.map"],"names":[],"mappings":";;;AAGA;AACA,IAAI,aAAa,GAAG,UAAU,CAAC;AAC/B,EAAE,wFAAwF,CAAC,OAAO,EAAE,MAAM,EAAE;AAC5G,IAAI,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc;AACzC,IAAI,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB;AAC1D,IAAI,IAAI,iBAAiB,GAAG,MAAM,CAAC,mBAAmB;AACtD,IAAI,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc;AACtD,IAAI,IAAI,QAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK;AACpC,MAAM,KAAK,IAAI,IAAI,IAAI,GAAG;AAC1B,QAAQ,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AACrE,IAAI,CAAC;AACL,IAAI,IAAI,WAAW,GAAG,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,KAAK;AAClD,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,KAA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,IAAI,iBAAiB,CAAC,iBAAiB,GAAG;AACpE,QAAQ,IAAI,CAAC,SAAS,EAAE;AACxB,UAAU,MAAM,IAAI,kBAAkB,CAAC,oBAAoB;AAC3D,YAAY;AACZ,WAAW;AACX,QAAQ;AACR,QAAQ,IAAI,CAAC,SAAS,EAAE;AACxB,UAAU,MAAM,IAAI,kBAAkB,CAAC,oBAAoB;AAC3D,YAAY;AACZ,WAAW;AACX,QAAQ;AACR,QAAQ,UAAU,GAAG,MAAM,IAAI,iBAAiB,CAAC,kBAAkB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC;AAClG,QAAQ,IAAI,CAAC,UAAU,EAAE;AACzB,UAAU,MAAM,IAAI,kBAAkB,CAAC,oBAAoB,CAAC,8BAA8B,CAAC;AAC3F,QAAQ;AACR,QAAQ,IAAI,iBAAiB,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC;AAC/D,MAAM;AACN,MAAM,OAAO,CAAC,GAAG,CAAC,iBAAiB,GAAG,UAAU,CAAC,KAAK;AACtD,MAAM;AACN,IAAI;AACJ,EAAE;AACF,CAAC,CAAC;AACC,IAAC,aAAa,GAAG,aAAa;;;;"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
|
|
5
|
-
const chunk55VPMN3N = require('./chunk-55VPMN3N-Dhj5NfGj.cjs');
|
|
6
|
-
const index = require('./index-BEw00-Pp.cjs');
|
|
7
|
-
|
|
8
|
-
// ../_vendored/ai_v5/dist/token-6GSAFR2W.js
|
|
9
|
-
var require_token = index.__commonJS({
|
|
10
|
-
"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __export = (target, all) => {
|
|
16
|
-
for (var name in all)
|
|
17
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
-
};
|
|
19
|
-
var __copyProps = (to, from, except, desc) => {
|
|
20
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
21
|
-
for (let key of __getOwnPropNames(from))
|
|
22
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
23
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
24
|
-
}
|
|
25
|
-
return to;
|
|
26
|
-
};
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
var token_exports = {};
|
|
29
|
-
__export(token_exports, {
|
|
30
|
-
refreshToken: () => refreshToken
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(token_exports);
|
|
33
|
-
var import_token_error = index.require_token_error();
|
|
34
|
-
var import_token_util = chunk55VPMN3N.require_token_util();
|
|
35
|
-
async function refreshToken() {
|
|
36
|
-
const { projectId, teamId } = (0, import_token_util.findProjectInfo)();
|
|
37
|
-
let maybeToken = (0, import_token_util.loadToken)(projectId);
|
|
38
|
-
if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {
|
|
39
|
-
const authToken = (0, import_token_util.getVercelCliToken)();
|
|
40
|
-
if (!authToken) {
|
|
41
|
-
throw new import_token_error.VercelOidcTokenError(
|
|
42
|
-
"Failed to refresh OIDC token: login to vercel cli"
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
if (!projectId) {
|
|
46
|
-
throw new import_token_error.VercelOidcTokenError(
|
|
47
|
-
"Failed to refresh OIDC token: project id not found"
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
|
|
51
|
-
if (!maybeToken) {
|
|
52
|
-
throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
|
|
53
|
-
}
|
|
54
|
-
(0, import_token_util.saveToken)(maybeToken, projectId);
|
|
55
|
-
}
|
|
56
|
-
process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
var token6GSAFR2W = require_token();
|
|
62
|
-
|
|
63
|
-
exports.default = token6GSAFR2W;
|
|
64
|
-
//# sourceMappingURL=token-6GSAFR2W-SPYPLMBM-DPP_j841.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-6GSAFR2W-SPYPLMBM-DPP_j841.cjs","sources":["../../../packages/core/dist/token-6GSAFR2W-SPYPLMBM.js"],"sourcesContent":["import { require_token_util } from './chunk-55VPMN3N.js';\nimport { __commonJS, require_token_error } from './chunk-D22XABFZ.js';\n\n// ../_vendored/ai_v5/dist/token-6GSAFR2W.js\nvar require_token = __commonJS({\n \"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/token.js\"(exports, module) {\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n var token_exports = {};\n __export(token_exports, {\n refreshToken: () => refreshToken\n });\n module.exports = __toCommonJS(token_exports);\n var import_token_error = require_token_error();\n var import_token_util = require_token_util();\n async function refreshToken() {\n const { projectId, teamId } = (0, import_token_util.findProjectInfo)();\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token))) {\n const authToken = (0, import_token_util.getVercelCliToken)();\n if (!authToken) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: login to vercel cli\"\n );\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: project id not found\"\n );\n }\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n }\n }\n});\nvar token6GSAFR2W = require_token();\n\nexport { token6GSAFR2W as default };\n//# sourceMappingURL=token-6GSAFR2W-SPYPLMBM.js.map\n//# sourceMappingURL=token-6GSAFR2W-SPYPLMBM.js.map"],"names":["__commonJS","require_token_error","require_token_util"],"mappings":";;;;;;;AAGA;AACA,IAAI,aAAa,GAAGA,gBAAU,CAAC;AAC/B,EAAE,wFAAwF,CAAC,OAAO,EAAE,MAAM,EAAE;AAC5G,IAAI,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc;AACzC,IAAI,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB;AAC1D,IAAI,IAAI,iBAAiB,GAAG,MAAM,CAAC,mBAAmB;AACtD,IAAI,IAAI,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc;AACtD,IAAI,IAAI,QAAQ,GAAG,CAAC,MAAM,EAAE,GAAG,KAAK;AACpC,MAAM,KAAK,IAAI,IAAI,IAAI,GAAG;AAC1B,QAAQ,SAAS,CAAC,MAAM,EAAE,IAAI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util-NEHG7TUY.js
|
|
8
|
-
var tokenUtilNEHG7TUY = chunk55VPMN3N.require_token_util();
|
|
9
|
-
|
|
10
|
-
exports.default = tokenUtilNEHG7TUY;
|
|
11
|
-
//# sourceMappingURL=token-util-NEHG7TUY-JRJTGTAB-0WkcL_9T.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-util-NEHG7TUY-JRJTGTAB-0WkcL_9T.cjs","sources":["../../../packages/core/dist/token-util-NEHG7TUY-JRJTGTAB.js"],"sourcesContent":["import { require_token_util } from './chunk-55VPMN3N.js';\n\n// ../_vendored/ai_v5/dist/token-util-NEHG7TUY.js\nvar tokenUtilNEHG7TUY = require_token_util();\n\nexport { tokenUtilNEHG7TUY as default };\n//# sourceMappingURL=token-util-NEHG7TUY-JRJTGTAB.js.map\n//# sourceMappingURL=token-util-NEHG7TUY-JRJTGTAB.js.map"],"names":["require_token_util"],"mappings":";;;;;;AAEA;AACG,IAAC,iBAAiB,GAAGA,gCAAkB;;;;"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { r as require_token_util } from './chunk-55VPMN3N-BuLK6rn1.js';
|
|
2
|
-
|
|
3
|
-
// ../_vendored/ai_v5/dist/token-util-NEHG7TUY.js
|
|
4
|
-
var tokenUtilNEHG7TUY = require_token_util();
|
|
5
|
-
|
|
6
|
-
export { tokenUtilNEHG7TUY as default };
|
|
7
|
-
//# sourceMappingURL=token-util-NEHG7TUY-JRJTGTAB-BLZ0BA54.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token-util-NEHG7TUY-JRJTGTAB-BLZ0BA54.js","sources":["../../../packages/core/dist/token-util-NEHG7TUY-JRJTGTAB.js"],"sourcesContent":["import { require_token_util } from './chunk-55VPMN3N.js';\n\n// ../_vendored/ai_v5/dist/token-util-NEHG7TUY.js\nvar tokenUtilNEHG7TUY = require_token_util();\n\nexport { tokenUtilNEHG7TUY as default };\n//# sourceMappingURL=token-util-NEHG7TUY-JRJTGTAB.js.map\n//# sourceMappingURL=token-util-NEHG7TUY-JRJTGTAB.js.map"],"names":[],"mappings":";;AAEA;AACG,IAAC,iBAAiB,GAAG,kBAAkB;;;;"}
|