@triplef/agent 0.1.0 → 0.1.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 ADDED
@@ -0,0 +1,40 @@
1
+ <div align="center">
2
+
3
+ # @triplef/agent
4
+
5
+ The tripleF (3F) agent domain — structured-output schemas, prompt builders, and model tools shared across the apps.
6
+
7
+ `This library is **ESM-only** and does not support CommonJS.`
8
+ `Your project must use ES modules.`
9
+
10
+ </div>
11
+
12
+ <br>
13
+
14
+ <!-- DEPBADGE:START -->
15
+ <!-- DEPBADGE:END -->
16
+
17
+ ## Subpath exports
18
+
19
+ - `@triplef/agent/schemas` — Zod schemas and `z.infer` types for intent classification, response templates, and memory extraction/consolidation/profile, plus URL-trust and Zod-shape helpers (`formatZodShape`, `deriveSchemaKeys`) and the `LexiconSelectInput`/`LexiconSelectResult` retrieval-selection contract.
20
+ - `@triplef/agent/prompts` — harness and memory prompt builders, the snippet system, and `buildStructuredPrompt` (renders a schema's JSON shape into a prompt template).
21
+ - `@triplef/agent/tools` — search/tool factories (Serper, Bright Data, YouTube, web-fetch, image-variants, memory) with a decoupled `ToolDependencies` contract.
22
+
23
+ ## Usage
24
+
25
+ ```ts
26
+ import { intentSchema } from '@triplef/agent/schemas';
27
+ import { buildStructuredPrompt } from '@triplef/agent/prompts';
28
+ import { createSerperWebSearch } from '@triplef/agent/tools';
29
+ ```
30
+
31
+ `ai` and `zod` are peer dependencies; `ai` is optional (only the `/tools` subpath needs it).
32
+
33
+ <br>
34
+
35
+ <div align="center">
36
+
37
+ [E-MAIL](mailto:eugen.hildt@gmail.com) &nbsp;—&nbsp; [WIKI](https://github.com/ehildt/tripleF/wiki) &nbsp;—&nbsp; [ISSUES](https://github.com/ehildt/tripleF/issues) &nbsp;—&nbsp; [DONATE](https://github.com/sponsors/ehildt)
38
+
39
+ </div>
40
+ <br>
@@ -1,5 +1,5 @@
1
- import { T as TemplateName, F as FormatZodShapeOptions } from '../intent.schema-BbIiFHUW.js';
2
- export { D as DEFAULT_VARIANT_ID } from '../intent.schema-BbIiFHUW.js';
1
+ import { T as TemplateName, F as FormatZodShapeOptions } from '../intent.schema-BFsi1OVf.js';
2
+ export { D as DEFAULT_VARIANT_ID } from '../intent.schema-BFsi1OVf.js';
3
3
  import * as zod from 'zod';
4
4
  import { z, ZodTypeAny, ZodType } from 'zod';
5
5
  import * as zod_v4_core from 'zod/v4/core';
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export { D as DEFAULT_VARIANT_ID, F as FormatZodShapeOptions, I as IntentResult, a as IntentSchema, T as TemplateName, f as formatZodShape } from '../intent.schema-BbIiFHUW.js';
2
+ export { D as DEFAULT_VARIANT_ID, F as FormatZodShapeOptions, I as IntentResult, a as IntentSchema, T as TemplateName, f as formatZodShape } from '../intent.schema-BFsi1OVf.js';
3
3
 
4
4
  declare const BLOCKED_IMAGE_HOSTS: Set<string>;
5
5
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triplef/agent",
3
3
  "description": "tripleF (3F) agent domain — structured-output schemas, prompt builders, and model tools shared across the apps.",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "packageManager": "pnpm@11.24.0",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -45,7 +45,7 @@
45
45
  "format": "prettier --write .",
46
46
  "lint": "eslint ./src",
47
47
  "lint-staged": "npx lint-staged --allow-empty",
48
- "ncu:update": "npx npm-check-updates -u --format group",
48
+ "ncu:update": "npx npm-check-updates -u --format group --dep prod,dev,optional,packageManager,peer",
49
49
  "ncu:interactive": "npx npm-check-updates -u --interactive --format group",
50
50
  "ncu:validate": "npx npm-check-updates -e 2 --packageFile=./package.json",
51
51
  "test": "vitest run",
@@ -60,7 +60,7 @@
60
60
  "turndown": "^7.2.4"
61
61
  },
62
62
  "peerDependencies": {
63
- "ai": "^7.0.79",
63
+ "ai": "^7.0.83",
64
64
  "zod": "^4.4.3"
65
65
  },
66
66
  "peerDependenciesMeta": {
@@ -10,7 +10,6 @@ declare const TEMPLATES: readonly ["article", "news", "describe", "compare", "oc
10
10
  type TemplateName = (typeof TEMPLATES)[number];
11
11
  declare const IntentSchema: z.ZodObject<{
12
12
  template: z.ZodEnum<{
13
- text: "text";
14
13
  article: "article";
15
14
  news: "news";
16
15
  describe: "describe";
@@ -25,6 +24,7 @@ declare const IntentSchema: z.ZodObject<{
25
24
  stockmarketitem: "stockmarketitem";
26
25
  stockmarketlist: "stockmarketlist";
27
26
  merge: "merge";
27
+ text: "text";
28
28
  }>;
29
29
  prompt: z.ZodDefault<z.ZodString>;
30
30
  tools: z.ZodArray<z.ZodEnum<{