@fastpaca/cria 0.0.1 → 1.0.1
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 +93 -106
- package/dist/ai-sdk/index.d.ts +43 -0
- package/dist/ai-sdk/index.d.ts.map +1 -0
- package/dist/ai-sdk/index.js +303 -0
- package/dist/ai-sdk/index.js.map +1 -0
- package/dist/ai-sdk/index.test.d.ts +2 -0
- package/dist/ai-sdk/index.test.d.ts.map +1 -0
- package/dist/ai-sdk/index.test.js +101 -0
- package/dist/ai-sdk/index.test.js.map +1 -0
- package/dist/anthropic/index.d.ts +74 -0
- package/dist/anthropic/index.d.ts.map +1 -0
- package/dist/anthropic/index.js +238 -0
- package/dist/anthropic/index.js.map +1 -0
- package/dist/anthropic/index.test.d.ts +2 -0
- package/dist/anthropic/index.test.d.ts.map +1 -0
- package/dist/anthropic/index.test.js +115 -0
- package/dist/anthropic/index.test.js.map +1 -0
- package/dist/components/additional.test.d.ts +2 -0
- package/dist/components/additional.test.d.ts.map +1 -0
- package/dist/components/additional.test.js +31 -0
- package/dist/components/additional.test.js.map +1 -0
- package/dist/components/index.d.ts +148 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +184 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/summary.d.ts +91 -0
- package/dist/components/summary.d.ts.map +1 -0
- package/dist/components/summary.js +118 -0
- package/dist/components/summary.js.map +1 -0
- package/dist/components/summary.test.d.ts +2 -0
- package/dist/components/summary.test.d.ts.map +1 -0
- package/dist/components/summary.test.js +101 -0
- package/dist/components/summary.test.js.map +1 -0
- package/dist/components/vector-search.d.ts +70 -0
- package/dist/components/vector-search.d.ts.map +1 -0
- package/dist/components/vector-search.js +110 -0
- package/dist/components/vector-search.js.map +1 -0
- package/dist/components/vector-search.test.d.ts +2 -0
- package/dist/components/vector-search.test.d.ts.map +1 -0
- package/dist/components/vector-search.test.js +113 -0
- package/dist/components/vector-search.test.js.map +1 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/dist/instrumentation/otel.d.ts +19 -0
- package/dist/instrumentation/otel.d.ts.map +1 -0
- package/dist/instrumentation/otel.js +102 -0
- package/dist/instrumentation/otel.js.map +1 -0
- package/dist/instrumentation/otel.test.d.ts +2 -0
- package/dist/instrumentation/otel.test.d.ts.map +1 -0
- package/dist/instrumentation/otel.test.js +116 -0
- package/dist/instrumentation/otel.test.js.map +1 -0
- package/dist/jsx-dev-runtime.d.ts +2 -0
- package/dist/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/jsx-dev-runtime.js +2 -0
- package/dist/jsx-dev-runtime.js.map +1 -0
- package/dist/jsx-runtime.d.ts +30 -8
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx-runtime.js +13 -10
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/memory/chroma/index.d.ts +59 -0
- package/dist/memory/chroma/index.d.ts.map +1 -0
- package/dist/memory/chroma/index.js +172 -0
- package/dist/memory/chroma/index.js.map +1 -0
- package/dist/memory/index.d.ts +4 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +2 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/key-value.d.ts +71 -0
- package/dist/memory/key-value.d.ts.map +1 -0
- package/dist/memory/key-value.js +34 -0
- package/dist/memory/key-value.js.map +1 -0
- package/dist/memory/postgres.d.ts +71 -0
- package/dist/memory/postgres.d.ts.map +1 -0
- package/dist/memory/postgres.js +109 -0
- package/dist/memory/postgres.js.map +1 -0
- package/dist/memory/qdrant/index.d.ts +64 -0
- package/dist/memory/qdrant/index.d.ts.map +1 -0
- package/dist/memory/qdrant/index.js +136 -0
- package/dist/memory/qdrant/index.js.map +1 -0
- package/dist/memory/redis.d.ts +70 -0
- package/dist/memory/redis.d.ts.map +1 -0
- package/dist/memory/redis.js +100 -0
- package/dist/memory/redis.js.map +1 -0
- package/dist/memory/vector.d.ts +53 -0
- package/dist/memory/vector.d.ts.map +1 -0
- package/dist/memory/vector.js +2 -0
- package/dist/memory/vector.js.map +1 -0
- package/dist/openai/index.d.ts +46 -0
- package/dist/openai/index.d.ts.map +1 -0
- package/dist/openai/index.js +260 -0
- package/dist/openai/index.js.map +1 -0
- package/dist/openai/index.test.d.ts +2 -0
- package/dist/openai/index.test.d.ts.map +1 -0
- package/dist/openai/index.test.js +204 -0
- package/dist/openai/index.test.js.map +1 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +2 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/types.d.ts +2 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +2 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/render.d.ts +44 -40
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +162 -148
- package/dist/render.js.map +1 -1
- package/dist/render.test.js +146 -28
- package/dist/render.test.js.map +1 -1
- package/dist/renderers/markdown.d.ts +3 -0
- package/dist/renderers/markdown.d.ts.map +1 -0
- package/dist/renderers/markdown.js +43 -0
- package/dist/renderers/markdown.js.map +1 -0
- package/dist/renderers/shared.d.ts +82 -0
- package/dist/renderers/shared.d.ts.map +1 -0
- package/dist/renderers/shared.js +156 -0
- package/dist/renderers/shared.js.map +1 -0
- package/dist/snapshot.d.ts +47 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +140 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/snapshot.test.d.ts +2 -0
- package/dist/snapshot.test.d.ts.map +1 -0
- package/dist/snapshot.test.js +68 -0
- package/dist/snapshot.test.js.map +1 -0
- package/dist/tokenizers.d.ts +14 -0
- package/dist/tokenizers.d.ts.map +1 -0
- package/dist/tokenizers.js +45 -0
- package/dist/tokenizers.js.map +1 -0
- package/dist/types.d.ts +212 -84
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +109 -0
- package/dist/types.js.map +1 -1
- package/package.json +88 -3
- package/dist/components.d.ts +0 -78
- package/dist/components.d.ts.map +0 -1
- package/dist/components.js +0 -98
- package/dist/components.js.map +0 -1
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAI1B,CAAC;AACJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oCAAoC;IACpC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;CACxE;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACtC;AAGD,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAA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AClB,0DAA0D;IAC1D,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,YAAY,CAAC,cAAc,CAAC,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;gBAEN,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAStE"}
|
package/dist/types.js
CHANGED
|
@@ -1,3 +1,112 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Message role used by semantic `kind: "message"` regions.
|
|
4
|
+
*
|
|
5
|
+
* This is intentionally compatible with common LLM SDKs (system/user/assistant/tool),
|
|
6
|
+
* while still allowing custom roles for bespoke targets.
|
|
7
|
+
*/
|
|
8
|
+
export const PromptRoleSchema = z
|
|
9
|
+
.string()
|
|
10
|
+
.describe('Message role used by semantic `kind: "message"` regions (system/user/assistant/tool/custom).');
|
|
11
|
+
/**
|
|
12
|
+
* Semantic variants for a region node.
|
|
13
|
+
*
|
|
14
|
+
* Cria’s IR is “Regions all the way down” (like a DOM tree). `PromptKindSchema`
|
|
15
|
+
* defines how we recognize prompt parts so renderers can emit structured targets
|
|
16
|
+
* without parsing strings.
|
|
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`.
|
|
48
|
+
*
|
|
49
|
+
* **Everything is a Region** (think: a DOM `<div>`): `priority`, `strategy`, and
|
|
50
|
+
* `children` make up the structural prompt tree.
|
|
51
|
+
*
|
|
52
|
+
* If you attach a semantic `kind` (via `PromptKind`), the node becomes a recognized
|
|
53
|
+
* prompt part (message/tool-call/tool-result/reasoning) and renderers can emit
|
|
54
|
+
* structured targets without parsing strings.
|
|
55
|
+
*
|
|
56
|
+
* `PromptElementSchema` is the single source of truth for validation and type inference.
|
|
57
|
+
*/
|
|
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
|
+
]));
|
|
1
110
|
/**
|
|
2
111
|
* Error thrown when the prompt cannot be fit within the budget.
|
|
3
112
|
*
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mapp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,CAAC;IAC/D,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,mBAAmB,CAAC;CAClC,CAA2B,CAAC;AAE7B,MAAM,CAAC,MAAM,oBAAoB,GAA8B,CAAC,CAAC,KAAK,CACpE,iBAAiB,CACW,CAAC;AAyD/B,MAAM,CAAC,MAAM,eAAe,GAAyB,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/D,CAAC,CAAC,KAAK,CAAC;IACN,CAAC,CAAC,IAAI,EAAE;IACR,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,OAAO,EAAE;IACX,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;IACxB,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC;CAC1B,CAAC,CACH,CAAC;AA2CF;;;;;;;;;;GAUG;AACH,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,YAAY,CAAS;IACrB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAElB,YAAY,YAAoB,EAAE,QAAgB,EAAE,SAAiB;QACnE,KAAK,CACH,sBAAsB,YAAY,mCAAmC,QAAQ,eAAe,SAAS,GAAG,CACzG,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;IAC7B,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastpaca/cria",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Lightweight, fast, and tiny LLM Context & Memory layout renderer to enforce token budgets in long running agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "seb@fastpaca.com",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/fastpaca/cria"
|
|
10
|
+
},
|
|
7
11
|
"type": "module",
|
|
8
12
|
"publishConfig": {
|
|
9
13
|
"access": "public"
|
|
@@ -13,11 +17,80 @@
|
|
|
13
17
|
"types": "./dist/index.d.ts",
|
|
14
18
|
"import": "./dist/index.js"
|
|
15
19
|
},
|
|
20
|
+
"./ai-sdk": {
|
|
21
|
+
"types": "./dist/ai-sdk/index.d.ts",
|
|
22
|
+
"import": "./dist/ai-sdk/index.js"
|
|
23
|
+
},
|
|
16
24
|
"./jsx-runtime": {
|
|
17
25
|
"types": "./dist/jsx-runtime.d.ts",
|
|
18
26
|
"import": "./dist/jsx-runtime.js"
|
|
27
|
+
},
|
|
28
|
+
"./jsx-dev-runtime": {
|
|
29
|
+
"types": "./dist/jsx-dev-runtime.d.ts",
|
|
30
|
+
"import": "./dist/jsx-dev-runtime.js"
|
|
31
|
+
},
|
|
32
|
+
"./openai": {
|
|
33
|
+
"types": "./dist/openai/index.d.ts",
|
|
34
|
+
"import": "./dist/openai/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./anthropic": {
|
|
37
|
+
"types": "./dist/anthropic/index.d.ts",
|
|
38
|
+
"import": "./dist/anthropic/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./memory/redis": {
|
|
41
|
+
"types": "./dist/memory/redis.d.ts",
|
|
42
|
+
"import": "./dist/memory/redis.js"
|
|
43
|
+
},
|
|
44
|
+
"./memory/postgres": {
|
|
45
|
+
"types": "./dist/memory/postgres.d.ts",
|
|
46
|
+
"import": "./dist/memory/postgres.js"
|
|
47
|
+
},
|
|
48
|
+
"./memory/chroma": {
|
|
49
|
+
"types": "./dist/memory/chroma/index.d.ts",
|
|
50
|
+
"import": "./dist/memory/chroma/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./memory/qdrant": {
|
|
53
|
+
"types": "./dist/memory/qdrant/index.d.ts",
|
|
54
|
+
"import": "./dist/memory/qdrant/index.js"
|
|
19
55
|
}
|
|
20
56
|
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@anthropic-ai/sdk": "^0.20.0",
|
|
59
|
+
"@qdrant/js-client-rest": "^1.0.0",
|
|
60
|
+
"ai": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0",
|
|
61
|
+
"chromadb": "^1.0.0 || ^2.0.0",
|
|
62
|
+
"ioredis": "^5.0.0",
|
|
63
|
+
"openai": "^4.0.0",
|
|
64
|
+
"pg": "^8.0.0"
|
|
65
|
+
},
|
|
66
|
+
"peerDependenciesMeta": {
|
|
67
|
+
"@anthropic-ai/sdk": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"@qdrant/js-client-rest": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"ai": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"chromadb": {
|
|
77
|
+
"optional": true
|
|
78
|
+
},
|
|
79
|
+
"ioredis": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
82
|
+
"openai": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"pg": {
|
|
86
|
+
"optional": true
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"js-tiktoken": "^1.0.14",
|
|
91
|
+
"@noble/hashes": "^1.4.0",
|
|
92
|
+
"zod": "^3.25.76"
|
|
93
|
+
},
|
|
21
94
|
"files": [
|
|
22
95
|
"dist"
|
|
23
96
|
],
|
|
@@ -25,15 +98,27 @@
|
|
|
25
98
|
"build": "tsc",
|
|
26
99
|
"check": "ultracite check",
|
|
27
100
|
"fix": "ultracite fix",
|
|
28
|
-
"test": "
|
|
101
|
+
"test": "vitest run",
|
|
102
|
+
"test:watch": "vitest",
|
|
29
103
|
"prepare": "husky"
|
|
30
104
|
},
|
|
31
105
|
"devDependencies": {
|
|
106
|
+
"@anthropic-ai/sdk": "^0.39.0",
|
|
32
107
|
"@biomejs/biome": "^2.3.10",
|
|
108
|
+
"@opentelemetry/api": "^1.9.0",
|
|
109
|
+
"@qdrant/js-client-rest": "^1.13.0",
|
|
33
110
|
"@types/node": "^22.0.0",
|
|
111
|
+
"@types/pg": "^8.16.0",
|
|
112
|
+
"ai": "^6.0.0",
|
|
113
|
+
"chromadb": "^2.0.0",
|
|
34
114
|
"husky": "^9.1.7",
|
|
115
|
+
"ioredis": "^5.8.2",
|
|
116
|
+
"openai": "^4.104.0",
|
|
117
|
+
"pg": "^8.16.3",
|
|
118
|
+
"semantic-release": "^25.0.2",
|
|
35
119
|
"tsx": "^4.21.0",
|
|
36
120
|
"typescript": "^5.7.0",
|
|
37
|
-
"ultracite": "^6.5.0"
|
|
121
|
+
"ultracite": "^6.5.0",
|
|
122
|
+
"vitest": "^3.1.0"
|
|
38
123
|
}
|
|
39
124
|
}
|
package/dist/components.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { PromptChildren, PromptElement, Strategy } from "./types";
|
|
2
|
-
/** Props for the Region component. */
|
|
3
|
-
interface RegionProps {
|
|
4
|
-
/** Lower number = higher importance. Default: 0 (highest priority) */
|
|
5
|
-
priority?: number;
|
|
6
|
-
/** Optional strategy to apply when this region needs to shrink */
|
|
7
|
-
strategy?: Strategy;
|
|
8
|
-
/** Stable identifier for caching/debugging */
|
|
9
|
-
id?: string;
|
|
10
|
-
/** Content of this region */
|
|
11
|
-
children?: PromptChildren;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The fundamental building block of Cria prompts—think of it as `<div>`.
|
|
15
|
-
*
|
|
16
|
-
* Regions define sections of your prompt with a priority level. During fitting,
|
|
17
|
-
* regions with higher priority numbers (less important) are reduced first.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```tsx
|
|
21
|
-
* <Region priority={0}>You are a helpful assistant.</Region>
|
|
22
|
-
* <Region priority={2}>{documents}</Region>
|
|
23
|
-
* <Region priority={1}>{userMessage}</Region>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare function Region({ priority, strategy, id, children, }: RegionProps): PromptElement;
|
|
27
|
-
/** Props for the Truncate component. */
|
|
28
|
-
interface TruncateProps {
|
|
29
|
-
/** Maximum token count for this region's content */
|
|
30
|
-
budget: number;
|
|
31
|
-
/** Which end to truncate from. Default: "start" */
|
|
32
|
-
from?: "start" | "end";
|
|
33
|
-
/** Lower number = higher importance. Default: 0 */
|
|
34
|
-
priority?: number;
|
|
35
|
-
/** Stable identifier for caching/debugging */
|
|
36
|
-
id?: string;
|
|
37
|
-
/** Content to truncate */
|
|
38
|
-
children?: PromptChildren;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* A region that truncates its content to fit within a token budget.
|
|
42
|
-
*
|
|
43
|
-
* When the overall prompt exceeds budget, Truncate regions progressively
|
|
44
|
-
* remove content from the specified direction until they meet their budget.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```tsx
|
|
48
|
-
* <Truncate budget={20000} priority={2}>
|
|
49
|
-
* {conversationHistory}
|
|
50
|
-
* </Truncate>
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
export declare function Truncate({ budget, from, priority, id, children, }: TruncateProps): PromptElement;
|
|
54
|
-
/** Props for the Omit component. */
|
|
55
|
-
interface OmitProps {
|
|
56
|
-
/** Lower number = higher importance. Default: 0 */
|
|
57
|
-
priority?: number;
|
|
58
|
-
/** Stable identifier for caching/debugging */
|
|
59
|
-
id?: string;
|
|
60
|
-
/** Content that may be omitted */
|
|
61
|
-
children?: PromptChildren;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* A region that is entirely removed when the prompt needs to shrink.
|
|
65
|
-
*
|
|
66
|
-
* Use Omit for "nice to have" content that can be dropped entirely if needed.
|
|
67
|
-
* When the prompt exceeds budget, Omit regions are removed (lowest priority first).
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* ```tsx
|
|
71
|
-
* <Omit priority={3}>
|
|
72
|
-
* {optionalExamples}
|
|
73
|
-
* </Omit>
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
export declare function Omit({ priority, id, children, }: OmitProps): PromptElement;
|
|
77
|
-
export {};
|
|
78
|
-
//# sourceMappingURL=components.d.ts.map
|
package/dist/components.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EAEb,QAAQ,EAET,MAAM,SAAS,CAAC;AAEjB,sCAAsC;AACtC,UAAU,WAAW;IACnB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,8CAA8C;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAY,EACZ,QAAQ,EACR,EAAE,EACF,QAAa,GACd,EAAE,WAAW,GAAG,aAAa,CAO7B;AAED,wCAAwC;AACxC,UAAU,aAAa;IACrB,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,IAAc,EACd,QAAY,EACZ,EAAE,EACF,QAAa,GACd,EAAE,aAAa,GAAG,aAAa,CA4C/B;AAED,oCAAoC;AACpC,UAAU,SAAS;IACjB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,EACnB,QAAY,EACZ,EAAE,EACF,QAAa,GACd,EAAE,SAAS,GAAG,aAAa,CAS3B"}
|
package/dist/components.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The fundamental building block of Cria prompts—think of it as `<div>`.
|
|
3
|
-
*
|
|
4
|
-
* Regions define sections of your prompt with a priority level. During fitting,
|
|
5
|
-
* regions with higher priority numbers (less important) are reduced first.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```tsx
|
|
9
|
-
* <Region priority={0}>You are a helpful assistant.</Region>
|
|
10
|
-
* <Region priority={2}>{documents}</Region>
|
|
11
|
-
* <Region priority={1}>{userMessage}</Region>
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export function Region({ priority = 0, strategy, id, children = [], }) {
|
|
15
|
-
return {
|
|
16
|
-
priority,
|
|
17
|
-
children: children,
|
|
18
|
-
...(strategy && { strategy }),
|
|
19
|
-
...(id && { id }),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A region that truncates its content to fit within a token budget.
|
|
24
|
-
*
|
|
25
|
-
* When the overall prompt exceeds budget, Truncate regions progressively
|
|
26
|
-
* remove content from the specified direction until they meet their budget.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* <Truncate budget={20000} priority={2}>
|
|
31
|
-
* {conversationHistory}
|
|
32
|
-
* </Truncate>
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export function Truncate({ budget, from = "start", priority = 0, id, children = [], }) {
|
|
36
|
-
const strategy = (input) => {
|
|
37
|
-
const { target, tokenizer } = input;
|
|
38
|
-
if (target.tokens <= budget) {
|
|
39
|
-
return [target];
|
|
40
|
-
}
|
|
41
|
-
let content = target.content;
|
|
42
|
-
let tokens = target.tokens;
|
|
43
|
-
// TODO(v1): Optimize - this calls tokenizer O(n) times. Consider:
|
|
44
|
-
// - Estimate chars/token ratio, binary search to target
|
|
45
|
-
// - Cache intermediate token counts
|
|
46
|
-
while (tokens > budget && content.length > 0) {
|
|
47
|
-
const charsToRemove = Math.max(1, Math.floor(content.length * 0.1));
|
|
48
|
-
if (from === "start") {
|
|
49
|
-
content = content.slice(charsToRemove);
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
content = content.slice(0, -charsToRemove);
|
|
53
|
-
}
|
|
54
|
-
tokens = tokenizer(content);
|
|
55
|
-
}
|
|
56
|
-
if (content.length === 0) {
|
|
57
|
-
return [];
|
|
58
|
-
}
|
|
59
|
-
return [
|
|
60
|
-
{
|
|
61
|
-
content,
|
|
62
|
-
tokens,
|
|
63
|
-
priority: target.priority,
|
|
64
|
-
regionId: target.regionId,
|
|
65
|
-
index: target.index,
|
|
66
|
-
},
|
|
67
|
-
];
|
|
68
|
-
};
|
|
69
|
-
return {
|
|
70
|
-
priority,
|
|
71
|
-
children: children,
|
|
72
|
-
strategy,
|
|
73
|
-
...(id && { id }),
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* A region that is entirely removed when the prompt needs to shrink.
|
|
78
|
-
*
|
|
79
|
-
* Use Omit for "nice to have" content that can be dropped entirely if needed.
|
|
80
|
-
* When the prompt exceeds budget, Omit regions are removed (lowest priority first).
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```tsx
|
|
84
|
-
* <Omit priority={3}>
|
|
85
|
-
* {optionalExamples}
|
|
86
|
-
* </Omit>
|
|
87
|
-
* ```
|
|
88
|
-
*/
|
|
89
|
-
export function Omit({ priority = 0, id, children = [], }) {
|
|
90
|
-
const strategy = () => [];
|
|
91
|
-
return {
|
|
92
|
-
priority,
|
|
93
|
-
children: children,
|
|
94
|
-
strategy,
|
|
95
|
-
...(id && { id }),
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=components.js.map
|
package/dist/components.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AAoBA;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,GAAG,CAAC,EACZ,QAAQ,EACR,EAAE,EACF,QAAQ,GAAG,EAAE,GACD;IACZ,OAAO;QACL,QAAQ;QACR,QAAQ,EAAE,QAAsC;QAChD,GAAG,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC7B,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;KAClB,CAAC;AACJ,CAAC;AAgBD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,MAAM,EACN,IAAI,GAAG,OAAO,EACd,QAAQ,GAAG,CAAC,EACZ,EAAE,EACF,QAAQ,GAAG,EAAE,GACC;IACd,MAAM,QAAQ,GAAa,CAAC,KAAoB,EAAoB,EAAE;QACpE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;QACpC,IAAI,MAAM,CAAC,MAAM,IAAI,MAAM,EAAE,CAAC;YAC5B,OAAO,CAAC,MAAM,CAAC,CAAC;QAClB,CAAC;QAED,IAAI,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC7B,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAE3B,kEAAkE;QAClE,wDAAwD;QACxD,oCAAoC;QACpC,OAAO,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CA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