@fastpaca/cria 1.4.0 → 1.6.0
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 +37 -27
- package/dist/dsl/builder.d.ts +275 -0
- package/dist/dsl/builder.d.ts.map +1 -0
- package/dist/dsl/builder.js +569 -0
- package/dist/dsl/builder.js.map +1 -0
- package/dist/dsl/index.d.ts +78 -0
- package/dist/dsl/index.d.ts.map +1 -0
- package/dist/dsl/index.js +92 -0
- package/dist/dsl/index.js.map +1 -0
- package/dist/dsl/strategies.d.ts +29 -0
- package/dist/dsl/strategies.d.ts.map +1 -0
- package/dist/dsl/strategies.js +62 -0
- package/dist/dsl/strategies.js.map +1 -0
- package/dist/dsl/summary.d.ts +51 -0
- package/dist/dsl/summary.d.ts.map +1 -0
- package/dist/dsl/summary.js +56 -0
- package/dist/dsl/summary.js.map +1 -0
- package/dist/dsl/templating.d.ts +31 -0
- package/dist/dsl/templating.d.ts.map +1 -0
- package/dist/dsl/templating.js +83 -0
- package/dist/dsl/templating.js.map +1 -0
- package/dist/{components → dsl}/vector-search.d.ts +11 -34
- package/dist/dsl/vector-search.d.ts.map +1 -0
- package/dist/{components → dsl}/vector-search.js +12 -34
- package/dist/dsl/vector-search.js.map +1 -0
- package/dist/eval/index.d.ts +16 -2
- package/dist/eval/index.d.ts.map +1 -1
- package/dist/eval/judge.d.ts +7 -5
- package/dist/eval/judge.d.ts.map +1 -1
- package/dist/eval/judge.js +18 -5
- package/dist/eval/judge.js.map +1 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/instrumentation/otel.js +5 -14
- package/dist/instrumentation/otel.js.map +1 -1
- package/dist/memory/chroma/index.js +4 -4
- package/dist/protocols/chat-completions.d.ts +38 -0
- package/dist/protocols/chat-completions.d.ts.map +1 -0
- package/dist/protocols/chat-completions.js +94 -0
- package/dist/protocols/chat-completions.js.map +1 -0
- package/dist/protocols/responses.d.ts +80 -0
- package/dist/protocols/responses.d.ts.map +1 -0
- package/dist/protocols/responses.js +148 -0
- package/dist/protocols/responses.js.map +1 -0
- package/dist/provider.d.ts +94 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +60 -0
- package/dist/provider.js.map +1 -0
- package/dist/providers/ai-sdk.d.ts +44 -0
- package/dist/providers/ai-sdk.d.ts.map +1 -0
- package/dist/providers/ai-sdk.js +144 -0
- package/dist/providers/ai-sdk.js.map +1 -0
- package/dist/providers/anthropic.d.ts +48 -0
- package/dist/providers/anthropic.d.ts.map +1 -0
- package/dist/providers/anthropic.js +279 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/openai.d.ts +64 -0
- package/dist/providers/openai.d.ts.map +1 -0
- package/dist/providers/openai.js +411 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/render.d.ts +25 -22
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +194 -63
- package/dist/render.js.map +1 -1
- package/dist/testing/plaintext.d.ts +29 -0
- package/dist/testing/plaintext.d.ts.map +1 -0
- package/dist/testing/plaintext.js +106 -0
- package/dist/testing/plaintext.js.map +1 -0
- package/dist/types.d.ts +186 -174
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +22 -104
- package/dist/types.js.map +1 -1
- package/package.json +25 -49
- package/dist/components/index.d.ts +0 -147
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/index.js +0 -181
- package/dist/components/index.js.map +0 -1
- package/dist/components/summary.d.ts +0 -89
- package/dist/components/summary.d.ts.map +0 -1
- package/dist/components/summary.js +0 -118
- package/dist/components/summary.js.map +0 -1
- package/dist/components/vector-search.d.ts.map +0 -1
- package/dist/components/vector-search.js.map +0 -1
- package/dist/dsl.d.ts +0 -233
- package/dist/dsl.d.ts.map +0 -1
- package/dist/dsl.js +0 -428
- package/dist/dsl.js.map +0 -1
- package/dist/integrations/ai-sdk.d.ts +0 -22
- package/dist/integrations/ai-sdk.d.ts.map +0 -1
- package/dist/integrations/ai-sdk.js +0 -172
- package/dist/integrations/ai-sdk.js.map +0 -1
- package/dist/integrations/anthropic.d.ts +0 -50
- package/dist/integrations/anthropic.d.ts.map +0 -1
- package/dist/integrations/anthropic.js +0 -220
- package/dist/integrations/anthropic.js.map +0 -1
- package/dist/integrations/openai.d.ts +0 -48
- package/dist/integrations/openai.d.ts.map +0 -1
- package/dist/integrations/openai.js +0 -265
- package/dist/integrations/openai.js.map +0 -1
- package/dist/jsx/index.d.ts +0 -6
- package/dist/jsx/index.d.ts.map +0 -1
- package/dist/jsx/index.js +0 -7
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/jsx-dev-runtime.d.ts +0 -2
- package/dist/jsx/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-dev-runtime.js +0 -3
- package/dist/jsx/jsx-dev-runtime.js.map +0 -1
- package/dist/jsx/jsx-runtime.d.ts +0 -40
- package/dist/jsx/jsx-runtime.d.ts.map +0 -1
- package/dist/jsx/jsx-runtime.js +0 -40
- package/dist/jsx/jsx-runtime.js.map +0 -1
- package/dist/renderers/markdown.d.ts +0 -3
- package/dist/renderers/markdown.d.ts.map +0 -1
- package/dist/renderers/markdown.js +0 -43
- package/dist/renderers/markdown.js.map +0 -1
- package/dist/renderers/shared.d.ts +0 -82
- package/dist/renderers/shared.d.ts.map +0 -1
- package/dist/renderers/shared.js +0 -156
- package/dist/renderers/shared.js.map +0 -1
- package/dist/snapshot.d.ts +0 -47
- package/dist/snapshot.d.ts.map +0 -1
- package/dist/snapshot.js +0 -144
- package/dist/snapshot.js.map +0 -1
- package/dist/tokenizers.d.ts +0 -14
- package/dist/tokenizers.d.ts.map +0 -1
- package/dist/tokenizers.js +0 -45
- package/dist/tokenizers.js.map +0 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,231 +1,237 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
2
|
+
* Prompt pipeline mental model (authoritative + opinionated):
|
|
4
3
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Fluent DSL
|
|
5
|
+
* |
|
|
6
|
+
* v
|
|
7
|
+
* PromptTree (scopes + message leaves)
|
|
8
|
+
* |
|
|
9
|
+
* v
|
|
10
|
+
* PromptLayout (flat, role-shaped messages)
|
|
11
|
+
* |
|
|
12
|
+
* v
|
|
13
|
+
* RenderOut (provider payloads)
|
|
14
|
+
*
|
|
15
|
+
* Why this shape?
|
|
16
|
+
* - Scopes exist for compaction/strategy. They are structural only.
|
|
17
|
+
* - Messages are semantic boundaries. They are leaf nodes and only hold parts.
|
|
18
|
+
* - Parts are the smallest typed units (text/reasoning/tool-call/tool-result).
|
|
19
|
+
*
|
|
20
|
+
* PromptLayout intentionally normalizes message shapes so codecs do NOT
|
|
21
|
+
* re-interpret parts or re-check invariants. Some providers (AI SDK, Anthropic)
|
|
22
|
+
* require a parts array, so codecs re-expand assistant/tool data back into
|
|
23
|
+
* parts. That is a translation step for provider compatibility, not a loop in
|
|
24
|
+
* the core model.
|
|
25
|
+
*/
|
|
26
|
+
import type { ModelProvider } from "./provider";
|
|
27
|
+
/**
|
|
28
|
+
* Message role used by semantic `kind: "message"` nodes.
|
|
29
|
+
*
|
|
30
|
+
* This is intentionally compatible with common LLM SDKs
|
|
31
|
+
* (system/developer/user/assistant/tool).
|
|
7
32
|
*/
|
|
8
|
-
export
|
|
9
|
-
export type PromptRole = z.infer<typeof PromptRoleSchema>;
|
|
33
|
+
export type PromptRole = "system" | "developer" | "user" | "assistant" | "tool";
|
|
10
34
|
/**
|
|
11
|
-
*
|
|
35
|
+
* Provider-specific tool IO contract.
|
|
12
36
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* ChatCompletionMessageParam[]).
|
|
37
|
+
* Each provider pins the concrete types used for tool-call inputs and
|
|
38
|
+
* tool-result outputs. Those types flow through the prompt tree and layout so
|
|
39
|
+
* codecs can translate without defensive serialization later.
|
|
17
40
|
*/
|
|
18
|
-
export interface
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Tokenizer for this provider's model.
|
|
23
|
-
*
|
|
24
|
-
* Used for budget fitting when the caller doesn't pass a tokenizer directly.
|
|
25
|
-
* Providers should supply an estimate that matches the chosen model; callers
|
|
26
|
-
* can still override via render options.
|
|
27
|
-
*/
|
|
28
|
-
tokenizer?: Tokenizer;
|
|
29
|
-
/** Renderer that produces provider-specific prompt input. */
|
|
30
|
-
renderer: PromptRenderer<TRendered>;
|
|
31
|
-
/** Generate a text completion from rendered prompt input. */
|
|
32
|
-
completion(rendered: TRendered): MaybePromise<string>;
|
|
33
|
-
/**
|
|
34
|
-
* Generate a structured object validated against the schema.
|
|
35
|
-
*
|
|
36
|
-
* Implementations should use native structured output when available
|
|
37
|
-
* (e.g., AI SDK's generateObject, OpenAI's json_schema response_format),
|
|
38
|
-
* falling back to completion + JSON.parse + schema.parse internally.
|
|
39
|
-
*/
|
|
40
|
-
object<T>(rendered: TRendered, schema: z.ZodType<T>): MaybePromise<T>;
|
|
41
|
+
export interface ProviderToolIO {
|
|
42
|
+
callInput: unknown;
|
|
43
|
+
resultOutput: unknown;
|
|
41
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Tool IO for an unbound prompt.
|
|
47
|
+
*
|
|
48
|
+
* If a prompt has no provider, tool IO is "never" so tool parts cannot be
|
|
49
|
+
* constructed until a provider supplies the IO contract. This avoids runtime
|
|
50
|
+
* checks by pushing the constraint into the type system.
|
|
51
|
+
*/
|
|
52
|
+
interface UnboundToolIO {
|
|
53
|
+
callInput: never;
|
|
54
|
+
resultOutput: never;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the tool IO contract for a given provider type.
|
|
58
|
+
*
|
|
59
|
+
* This is the bridge between a provider binding and the rest of the DSL:
|
|
60
|
+
* it extracts the provider's tool IO types so parts/messages/layouts carry
|
|
61
|
+
* the correct shapes end-to-end.
|
|
62
|
+
*/
|
|
63
|
+
export type ToolIOForProvider<P> = P extends ModelProvider<unknown, infer TToolIO> ? TToolIO : UnboundToolIO;
|
|
64
|
+
type ToolCallInput<TToolIO extends ProviderToolIO> = TToolIO["callInput"];
|
|
65
|
+
type ToolResultOutput<TToolIO extends ProviderToolIO> = TToolIO["resultOutput"];
|
|
42
66
|
/**
|
|
43
67
|
* Context that can be provided through the component tree.
|
|
44
68
|
*
|
|
45
|
-
* Provider scopes inject context
|
|
46
|
-
* rendering and strategy execution.
|
|
69
|
+
* Provider scopes inject context so children inherit the same provider binding
|
|
70
|
+
* and tool IO contract during rendering and strategy execution.
|
|
47
71
|
*/
|
|
48
72
|
export interface CriaContext {
|
|
49
73
|
/** Model provider for AI-powered operations */
|
|
50
|
-
provider?: ModelProvider<unknown> | undefined;
|
|
74
|
+
provider?: ModelProvider<unknown, ProviderToolIO> | undefined;
|
|
51
75
|
}
|
|
52
76
|
export type MaybePromise<T> = T | Promise<T>;
|
|
53
77
|
/**
|
|
54
|
-
*
|
|
55
|
-
* Cria doesn't bundle a tokenizer. You provide one.
|
|
78
|
+
* Content parts that appear as leaf nodes in message nodes.
|
|
56
79
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* import { encoding_for_model } from "tiktoken";
|
|
60
|
-
*
|
|
61
|
-
* const enc = encoding_for_model("gpt-4");
|
|
62
|
-
* const tokenizer: Tokenizer = (text) => enc.encode(text).length;
|
|
63
|
-
* ```
|
|
80
|
+
* Tool parts directly embed provider-native input/output shapes, so a bound
|
|
81
|
+
* provider determines their types without runtime validation.
|
|
64
82
|
*/
|
|
65
|
-
export
|
|
66
|
-
|
|
67
|
-
kind: z.ZodOptional<z.ZodUndefined>;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
kind?: undefined;
|
|
70
|
-
}, {
|
|
71
|
-
kind?: undefined;
|
|
72
|
-
}>, z.ZodObject<{
|
|
73
|
-
kind: z.ZodLiteral<"message">;
|
|
74
|
-
role: z.ZodString;
|
|
75
|
-
}, "strip", z.ZodTypeAny, {
|
|
76
|
-
kind: "message";
|
|
77
|
-
role: string;
|
|
78
|
-
}, {
|
|
79
|
-
kind: "message";
|
|
80
|
-
role: string;
|
|
81
|
-
}>, z.ZodObject<{
|
|
82
|
-
kind: z.ZodLiteral<"tool-call">;
|
|
83
|
-
toolCallId: z.ZodString;
|
|
84
|
-
toolName: z.ZodString;
|
|
85
|
-
input: z.ZodUnknown;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
kind: "tool-call";
|
|
83
|
+
export interface ToolCallPart<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
84
|
+
type: "tool-call";
|
|
88
85
|
toolCallId: string;
|
|
89
86
|
toolName: string;
|
|
90
|
-
input
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
toolName: string;
|
|
95
|
-
input?: unknown;
|
|
96
|
-
}>, z.ZodObject<{
|
|
97
|
-
kind: z.ZodLiteral<"tool-result">;
|
|
98
|
-
toolCallId: z.ZodString;
|
|
99
|
-
toolName: z.ZodString;
|
|
100
|
-
output: z.ZodUnknown;
|
|
101
|
-
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
kind: "tool-result";
|
|
103
|
-
toolCallId: string;
|
|
104
|
-
toolName: string;
|
|
105
|
-
output?: unknown;
|
|
106
|
-
}, {
|
|
107
|
-
kind: "tool-result";
|
|
87
|
+
input: ToolCallInput<TToolIO>;
|
|
88
|
+
}
|
|
89
|
+
export interface ToolResultPart<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
90
|
+
type: "tool-result";
|
|
108
91
|
toolCallId: string;
|
|
109
92
|
toolName: string;
|
|
110
|
-
output
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
93
|
+
output: ToolResultOutput<TToolIO>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The smallest typed units used inside messages.
|
|
97
|
+
*
|
|
98
|
+
* Keeping tool IO typed at the part level forces every higher-level structure
|
|
99
|
+
* (messages/layout/tree) to stay provider-consistent.
|
|
100
|
+
*/
|
|
101
|
+
export type PromptPart<TToolIO extends ProviderToolIO = ProviderToolIO> = {
|
|
102
|
+
type: "text";
|
|
116
103
|
text: string;
|
|
117
|
-
}
|
|
118
|
-
|
|
104
|
+
} | {
|
|
105
|
+
type: "reasoning";
|
|
119
106
|
text: string;
|
|
120
|
-
}>
|
|
121
|
-
|
|
122
|
-
export type
|
|
123
|
-
|
|
107
|
+
} | ToolCallPart<TToolIO> | ToolResultPart<TToolIO>;
|
|
108
|
+
/** Convenience type for reasoning parts in a typed prompt. */
|
|
109
|
+
export type ReasoningPart<TToolIO extends ProviderToolIO = ProviderToolIO> = Extract<PromptPart<TToolIO>, {
|
|
110
|
+
type: "reasoning";
|
|
111
|
+
}>;
|
|
112
|
+
/** Convenience type for text parts in a typed prompt. */
|
|
113
|
+
export type TextPart<TToolIO extends ProviderToolIO = ProviderToolIO> = Extract<PromptPart<TToolIO>, {
|
|
114
|
+
type: "text";
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* Structural scope node in the prompt tree.
|
|
118
|
+
*
|
|
119
|
+
* Scopes group messages for composition and compaction while keeping the tool
|
|
120
|
+
* IO types consistent across all descendants.
|
|
121
|
+
*/
|
|
122
|
+
export interface PromptScope<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
123
|
+
kind: "scope";
|
|
124
124
|
priority: number;
|
|
125
125
|
strategy?: Strategy | undefined;
|
|
126
126
|
id?: string | undefined;
|
|
127
127
|
context?: CriaContext | undefined;
|
|
128
|
-
children:
|
|
128
|
+
children: readonly PromptNode<TToolIO>[];
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
/**
|
|
131
|
+
* Message boundary node in the prompt tree.
|
|
132
|
+
*
|
|
133
|
+
* A message node is role-shaped and contains parts that already carry the
|
|
134
|
+
* provider-bound tool IO types.
|
|
135
|
+
*/
|
|
136
|
+
export interface PromptMessageNode<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
133
137
|
kind: "message";
|
|
134
138
|
role: PromptRole;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
toolName: string;
|
|
139
|
-
input: unknown;
|
|
140
|
-
}) | (PromptElementBase & {
|
|
141
|
-
kind: "tool-result";
|
|
142
|
-
toolCallId: string;
|
|
143
|
-
toolName: string;
|
|
144
|
-
output: unknown;
|
|
145
|
-
}) | (PromptElementBase & {
|
|
146
|
-
kind: "reasoning";
|
|
147
|
-
text: string;
|
|
148
|
-
});
|
|
149
|
-
export type PromptChild = string | PromptElement;
|
|
150
|
-
export type PromptChildren = PromptChild[];
|
|
151
|
-
export declare const PromptElementSchema: z.ZodType<PromptElement>;
|
|
152
|
-
export declare const PromptChildSchema: z.ZodType<PromptChild>;
|
|
153
|
-
export declare const PromptChildrenSchema: z.ZodType<PromptChildren>;
|
|
139
|
+
id?: string | undefined;
|
|
140
|
+
children: readonly PromptPart<TToolIO>[];
|
|
141
|
+
}
|
|
154
142
|
/**
|
|
155
|
-
*
|
|
143
|
+
* Nodes in the prompt tree.
|
|
156
144
|
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
145
|
+
* Scopes provide structure and strategy boundaries. Message nodes are the
|
|
146
|
+
* semantic leaves that carry typed parts. The generic parameter ensures tool
|
|
147
|
+
* IO types stay consistent across the entire tree.
|
|
148
|
+
*/
|
|
149
|
+
export type PromptNode<TToolIO extends ProviderToolIO = ProviderToolIO> = PromptScope<TToolIO> | PromptMessageNode<TToolIO>;
|
|
150
|
+
/**
|
|
151
|
+
* Root prompt tree type.
|
|
160
152
|
*
|
|
161
|
-
*
|
|
153
|
+
* The root is always a scope so strategies can operate at the top level while
|
|
154
|
+
* preserving the provider-bound tool IO types for all descendants.
|
|
162
155
|
*/
|
|
163
|
-
export
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
* strategies summarized content during fitting).
|
|
183
|
-
*/
|
|
184
|
-
render: (element: PromptElement) => MaybePromise<TOutput>;
|
|
185
|
-
/**
|
|
186
|
-
* The “empty” value for this renderer.
|
|
187
|
-
*
|
|
188
|
-
* Used when the budget is <= 0, or when strategies remove the entire tree.
|
|
189
|
-
*/
|
|
190
|
-
empty: () => TOutput;
|
|
156
|
+
export type PromptTree<TToolIO extends ProviderToolIO = ProviderToolIO> = PromptScope<TToolIO>;
|
|
157
|
+
/** Shorthand for scope children with a shared tool IO contract. */
|
|
158
|
+
export type ScopeChildren<TToolIO extends ProviderToolIO = ProviderToolIO> = readonly PromptNode<TToolIO>[];
|
|
159
|
+
/** Shorthand for message children with a shared tool IO contract. */
|
|
160
|
+
export type MessageChildren<TToolIO extends ProviderToolIO = ProviderToolIO> = readonly PromptPart<TToolIO>[];
|
|
161
|
+
/** System messages are plain text and carry no tool information. */
|
|
162
|
+
export interface SystemMessage {
|
|
163
|
+
role: "system";
|
|
164
|
+
text: string;
|
|
165
|
+
}
|
|
166
|
+
/** Developer messages are plain text and carry no tool information. */
|
|
167
|
+
export interface DeveloperMessage {
|
|
168
|
+
role: "developer";
|
|
169
|
+
text: string;
|
|
170
|
+
}
|
|
171
|
+
/** User messages are plain text and carry no tool information. */
|
|
172
|
+
export interface UserMessage {
|
|
173
|
+
role: "user";
|
|
174
|
+
text: string;
|
|
191
175
|
}
|
|
192
176
|
/**
|
|
193
|
-
*
|
|
177
|
+
* Assistant messages can include reasoning and tool calls in addition to text.
|
|
178
|
+
* Tool call inputs are typed by the provider binding.
|
|
179
|
+
*/
|
|
180
|
+
export interface AssistantMessage<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
181
|
+
role: "assistant";
|
|
182
|
+
text: string;
|
|
183
|
+
reasoning?: string | undefined;
|
|
184
|
+
toolCalls?: readonly ToolCallPart<TToolIO>[] | undefined;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Tool messages represent a single tool result with provider-typed output.
|
|
188
|
+
*/
|
|
189
|
+
export interface ToolMessage<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
190
|
+
role: "tool";
|
|
191
|
+
toolCallId: string;
|
|
192
|
+
toolName: string;
|
|
193
|
+
output: ToolResultOutput<TToolIO>;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* PromptLayout is a list of fully-shaped messages. The union is deliberate:
|
|
197
|
+
* - Assistant messages can include reasoning/toolCalls.
|
|
198
|
+
* - Tool messages are singular tool results with call metadata.
|
|
199
|
+
* - System/User messages are text-only.
|
|
200
|
+
* This keeps invalid combinations out of the layout by construction.
|
|
201
|
+
*
|
|
202
|
+
* The layout is the normalized form that codecs consume. It is produced by
|
|
203
|
+
* flattening the prompt tree and should not require further validation.
|
|
204
|
+
*/
|
|
205
|
+
export type PromptMessage<TToolIO extends ProviderToolIO = ProviderToolIO> = SystemMessage | DeveloperMessage | UserMessage | AssistantMessage<TToolIO> | ToolMessage<TToolIO>;
|
|
206
|
+
/** Flat, role-shaped message list used by codecs and token counting. */
|
|
207
|
+
export type PromptLayout<TToolIO extends ProviderToolIO = ProviderToolIO> = readonly PromptMessage<TToolIO>[];
|
|
208
|
+
/**
|
|
209
|
+
* Result of applying a strategy to a scope.
|
|
194
210
|
*
|
|
195
|
-
*
|
|
211
|
+
* Returning null means "drop this scope entirely".
|
|
196
212
|
*/
|
|
197
|
-
export type
|
|
198
|
-
[key: string]: JsonValue;
|
|
199
|
-
};
|
|
200
|
-
export declare const JsonValueSchema: z.ZodType<JsonValue>;
|
|
201
|
-
export type StrategyResult = PromptElement | null;
|
|
213
|
+
export type StrategyResult<TToolIO extends ProviderToolIO = ProviderToolIO> = PromptScope<TToolIO> | null;
|
|
202
214
|
/**
|
|
203
215
|
* Context passed to strategy functions during the fit loop.
|
|
204
216
|
*
|
|
205
|
-
* @property target - The specific
|
|
206
|
-
* @property budget - The total token budget we're trying to fit within
|
|
207
|
-
* @property tokenizer - Function to count tokens in a string
|
|
208
|
-
* @property tokenString - Renderer-provided projection used for token counting
|
|
217
|
+
* @property target - The specific scope to reduce
|
|
209
218
|
* @property totalTokens - Current total token count for the prompt
|
|
210
219
|
* @property iteration - Which iteration of the fit loop (for debugging)
|
|
211
220
|
* @property context - Inherited context from ancestor provider components
|
|
212
221
|
*/
|
|
213
|
-
export interface StrategyInput {
|
|
214
|
-
target:
|
|
215
|
-
budget: number;
|
|
216
|
-
tokenizer: Tokenizer;
|
|
217
|
-
tokenString: (element: PromptElement) => string;
|
|
222
|
+
export interface StrategyInput<TToolIO extends ProviderToolIO = ProviderToolIO> {
|
|
223
|
+
target: PromptScope<TToolIO>;
|
|
218
224
|
totalTokens: number;
|
|
219
225
|
iteration: number;
|
|
220
226
|
/** Context inherited from ancestor provider components */
|
|
221
227
|
context: CriaContext;
|
|
222
228
|
}
|
|
223
229
|
/**
|
|
224
|
-
* A Strategy function that rewrites a
|
|
230
|
+
* A Strategy function that rewrites a scope subtree when the prompt is over budget.
|
|
225
231
|
*
|
|
226
232
|
* Strategies are applied during fitting, starting from the least important
|
|
227
233
|
* priority (highest number). Strategies run **bottom-up** (post-order) so nested
|
|
228
|
-
*
|
|
234
|
+
* scopes get a chance to shrink before their parents.
|
|
229
235
|
*
|
|
230
236
|
* Strategies must be:
|
|
231
237
|
* - **Pure**: don't mutate the input element
|
|
@@ -234,11 +240,16 @@ export interface StrategyInput {
|
|
|
234
240
|
*
|
|
235
241
|
* Strategies have full ownership of their subtree: they can replace the element
|
|
236
242
|
* and/or rewrite any children.
|
|
243
|
+
*
|
|
244
|
+
* The generic parameter ensures strategies preserve the tool IO contract
|
|
245
|
+
* instead of re-shaping it.
|
|
237
246
|
*/
|
|
238
|
-
export type Strategy = (input: StrategyInput) => MaybePromise<StrategyResult
|
|
247
|
+
export type Strategy = <TToolIO extends ProviderToolIO>(input: StrategyInput<TToolIO>) => MaybePromise<StrategyResult<TToolIO>>;
|
|
239
248
|
/**
|
|
240
249
|
* Error thrown when the prompt cannot be fit within the budget.
|
|
241
250
|
*
|
|
251
|
+
* This is a standard error that should be caught and handled by the caller.
|
|
252
|
+
*
|
|
242
253
|
* This happens when:
|
|
243
254
|
* - No strategies remain but still over budget
|
|
244
255
|
* - Strategies made no progress (possible infinite loop)
|
|
@@ -261,4 +272,5 @@ export declare class FitError extends Error {
|
|
|
261
272
|
totalTokens: number;
|
|
262
273
|
});
|
|
263
274
|
}
|
|
275
|
+
export {};
|
|
264
276
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;GAMG;AACH,UAAU,aAAa;IACrB,SAAS,EAAE,KAAK,CAAC;IACjB,YAAY,EAAE,KAAK,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAC7B,CAAC,SAAS,aAAa,CAAC,O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
|
-
*
|
|
4
|
+
* Fluent DSL
|
|
5
|
+
* |
|
|
6
|
+
* v
|
|
7
|
+
* PromptTree (scopes + message leaves)
|
|
8
|
+
* |
|
|
9
|
+
* v
|
|
10
|
+
* PromptLayout (flat, role-shaped messages)
|
|
11
|
+
* |
|
|
12
|
+
* v
|
|
13
|
+
* RenderOut (provider payloads)
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
|
|
18
|
-
const PromptKindNoneSchema = z.object({ kind: z.undefined().optional() });
|
|
19
|
-
const PromptKindMessageSchema = z.object({
|
|
20
|
-
kind: z.literal("message"),
|
|
21
|
-
role: PromptRoleSchema,
|
|
22
|
-
});
|
|
23
|
-
const PromptKindToolCallSchema = z.object({
|
|
24
|
-
kind: z.literal("tool-call"),
|
|
25
|
-
toolCallId: z.string(),
|
|
26
|
-
toolName: z.string(),
|
|
27
|
-
input: z.unknown(),
|
|
28
|
-
});
|
|
29
|
-
const PromptKindToolResultSchema = z.object({
|
|
30
|
-
kind: z.literal("tool-result"),
|
|
31
|
-
toolCallId: z.string(),
|
|
32
|
-
toolName: z.string(),
|
|
33
|
-
output: z.unknown(),
|
|
34
|
-
});
|
|
35
|
-
const PromptKindReasoningSchema = z.object({
|
|
36
|
-
kind: z.literal("reasoning"),
|
|
37
|
-
text: z.string(),
|
|
38
|
-
});
|
|
39
|
-
export const PromptKindSchema = z.union([
|
|
40
|
-
PromptKindNoneSchema,
|
|
41
|
-
PromptKindMessageSchema,
|
|
42
|
-
PromptKindToolCallSchema,
|
|
43
|
-
PromptKindToolResultSchema,
|
|
44
|
-
PromptKindReasoningSchema,
|
|
45
|
-
]);
|
|
46
|
-
/**
|
|
47
|
-
* The core IR node type. All Cria components return a `PromptElement`.
|
|
15
|
+
* Why this shape?
|
|
16
|
+
* - Scopes exist for compaction/strategy. They are structural only.
|
|
17
|
+
* - Messages are semantic boundaries. They are leaf nodes and only hold parts.
|
|
18
|
+
* - Parts are the smallest typed units (text/reasoning/tool-call/tool-result).
|
|
48
19
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* structured targets without parsing strings.
|
|
55
|
-
*
|
|
56
|
-
* `PromptElementSchema` is the single source of truth for validation and type inference.
|
|
20
|
+
* PromptLayout intentionally normalizes message shapes so codecs do NOT
|
|
21
|
+
* re-interpret parts or re-check invariants. Some providers (AI SDK, Anthropic)
|
|
22
|
+
* require a parts array, so codecs re-expand assistant/tool data back into
|
|
23
|
+
* parts. That is a translation step for provider compatibility, not a loop in
|
|
24
|
+
* the core model.
|
|
57
25
|
*/
|
|
58
|
-
const strategyValidator = (value) => typeof value === "function";
|
|
59
|
-
const PromptBaseSchema = z
|
|
60
|
-
.object({
|
|
61
|
-
priority: z.number(),
|
|
62
|
-
strategy: z.custom(strategyValidator).optional(),
|
|
63
|
-
id: z.string().optional(),
|
|
64
|
-
context: z.custom().optional(),
|
|
65
|
-
})
|
|
66
|
-
.strict();
|
|
67
|
-
export const PromptElementSchema = z.lazy(() => z.union([
|
|
68
|
-
PromptBaseSchema.extend({
|
|
69
|
-
kind: z.undefined().optional(),
|
|
70
|
-
children: z.array(z.union([z.string(), z.lazy(() => PromptElementSchema)])),
|
|
71
|
-
}),
|
|
72
|
-
PromptBaseSchema.extend({
|
|
73
|
-
kind: z.literal("message"),
|
|
74
|
-
role: PromptRoleSchema,
|
|
75
|
-
children: z.array(z.union([z.string(), z.lazy(() => PromptElementSchema)])),
|
|
76
|
-
}),
|
|
77
|
-
PromptBaseSchema.extend({
|
|
78
|
-
kind: z.literal("tool-call"),
|
|
79
|
-
toolCallId: z.string(),
|
|
80
|
-
toolName: z.string(),
|
|
81
|
-
input: z.unknown(),
|
|
82
|
-
children: z.array(z.union([z.string(), z.lazy(() => PromptElementSchema)])),
|
|
83
|
-
}),
|
|
84
|
-
PromptBaseSchema.extend({
|
|
85
|
-
kind: z.literal("tool-result"),
|
|
86
|
-
toolCallId: z.string(),
|
|
87
|
-
toolName: z.string(),
|
|
88
|
-
output: z.unknown(),
|
|
89
|
-
children: z.array(z.union([z.string(), z.lazy(() => PromptElementSchema)])),
|
|
90
|
-
}),
|
|
91
|
-
PromptBaseSchema.extend({
|
|
92
|
-
kind: z.literal("reasoning"),
|
|
93
|
-
text: z.string(),
|
|
94
|
-
children: z.array(z.union([z.string(), z.lazy(() => PromptElementSchema)])),
|
|
95
|
-
}),
|
|
96
|
-
]));
|
|
97
|
-
export const PromptChildSchema = z.union([
|
|
98
|
-
z.string(),
|
|
99
|
-
z.lazy(() => PromptElementSchema),
|
|
100
|
-
]);
|
|
101
|
-
export const PromptChildrenSchema = z.array(PromptChildSchema);
|
|
102
|
-
export const JsonValueSchema = z.lazy(() => z.union([
|
|
103
|
-
z.null(),
|
|
104
|
-
z.string(),
|
|
105
|
-
z.number(),
|
|
106
|
-
z.boolean(),
|
|
107
|
-
z.array(JsonValueSchema),
|
|
108
|
-
z.record(JsonValueSchema),
|
|
109
|
-
]));
|
|
110
26
|
/**
|
|
111
27
|
* Error thrown when the prompt cannot be fit within the budget.
|
|
112
28
|
*
|
|
29
|
+
* This is a standard error that should be caught and handled by the caller.
|
|
30
|
+
*
|
|
113
31
|
* This happens when:
|
|
114
32
|
* - No strategies remain but still over budget
|
|
115
33
|
* - Strategies made no progress (possible infinite loop)
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAkRH;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,YAAY,CAAS;IACrB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,MAAM,CAAS;IACf,WAAW,CAAS;IAEpB,YAAY,MAMX;QACC,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;QAC1E,KAAK,CACH,sBAAsB,WAAW,0BAA0B,MAAM,OAAO,YAAY,gBAAgB,QAAQ,eAAe,SAAS,GAAG,CACxI,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACjC,CAAC;CACF"}
|