pocket-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 +142 -140
- package/dist/adapters/createLLMEvaluator.js +26 -26
- package/dist/defaults/llmPlanner.js +27 -27
- package/package.json +54 -50
package/README.md
CHANGED
|
@@ -1,140 +1,142 @@
|
|
|
1
|
-
# pocket-agent
|
|
2
|
-
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
**
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
| **
|
|
28
|
-
| **
|
|
29
|
-
| **
|
|
30
|
-
| **
|
|
31
|
-
| **
|
|
32
|
-
| **
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- **
|
|
43
|
-
- **
|
|
44
|
-
- **
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
|
121
|
-
|
|
122
|
-
| [
|
|
123
|
-
| [
|
|
124
|
-
| [
|
|
125
|
-
| [
|
|
126
|
-
| [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- `npm run
|
|
133
|
-
- `npm
|
|
134
|
-
- `npm run
|
|
135
|
-
- `npm run example:
|
|
136
|
-
- `npm run example:
|
|
137
|
-
- `npm run example:
|
|
138
|
-
- `npm run example:
|
|
139
|
-
|
|
140
|
-
|
|
1
|
+
# pocket-agent
|
|
2
|
+
|
|
3
|
+
**[→ GitHub](https://github.com/sam-thewise/pocket-agent)**
|
|
4
|
+
|
|
5
|
+
**Plan-driven agent orchestration for Node.** You plug in a planner, executor, and evaluator (e.g. backed by any LLM); the framework runs the loop-plan → steps → evaluate → retry or replan-so you don’t re-implement it.
|
|
6
|
+
|
|
7
|
+
**Author:** sam_thewise
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
### In a nutshell
|
|
12
|
+
|
|
13
|
+
- **Goal in → plan → steps → evaluate → done.** You give a goal; we get a machine-readable plan, run steps in dependency order, evaluate completion, and retry or replan as needed.
|
|
14
|
+
- **You bring:** planner, executor, evaluator (and optional tools). **We bring:** scheduling, lifecycle events, retries, and structured outputs.
|
|
15
|
+
- **Pocket** = small, drop-in. **Agent** = orchestration that turns your LLM into a plan-first workflow.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### What this does (plain terms)
|
|
20
|
+
|
|
21
|
+
You give a **goal** (e.g. “Summarize this contract” or “How does this codebase work?”). The library turns that into a **plan**: a ordered list of **steps**, each with a clear objective and inputs/outputs. It runs the steps one by one (or in order when steps depend on each other), uses your **model** (LLM) and optional **tools** to do the work, then asks an **evaluator** whether each step is actually done. If not, it retries or replans; when everything’s done, you get a single result with all the step outputs. You don’t wire the loop yourself-you plug in *how* to plan, *how* to run a step, and *how* to judge completion; the **runner** does the rest.
|
|
22
|
+
|
|
23
|
+
**Terms you’ll see:**
|
|
24
|
+
|
|
25
|
+
| Term | Meaning |
|
|
26
|
+
|------|--------|
|
|
27
|
+
| **Runner** | The thing you create with `createAgentRunner` or `createQuickAgent`. It runs the full loop: create plan → run steps → evaluate → retry/replan → return result. |
|
|
28
|
+
| **Plan** | A list of **steps** (each has an id, objective, inputs, outputs, dependencies). The runner executes steps in an order that respects dependencies. |
|
|
29
|
+
| **Planner** | Your code (or a built-in) that, given a goal and context, produces a **plan**. “What steps do we need to achieve this goal?” |
|
|
30
|
+
| **Executor** | Your code (or a built-in) that runs *one* step. It gets the step definition, resolved inputs, and optional **model** and **tools**; it returns the step’s output (or error). “Do this step.” |
|
|
31
|
+
| **Evaluator** | Your code (or a built-in LLM evaluator) that, given a step and its attempt result, says whether the step is **complete**, should **retry**, **replan**, or **failed**. “Is this step actually done?” |
|
|
32
|
+
| **Tools** | Optional functions the executor can call during a step (e.g. read a file, call an API). The plan says which steps are allowed to use which tools. |
|
|
33
|
+
| **Model** | The LLM (OpenAI, Anthropic, Gemini, Ollama, etc.) used by the executor (and often the evaluator). You pass it via a **provider** + API key or a custom adapter. |
|
|
34
|
+
| **Provider** | Shortcut name for a model backend: `"openai"`, `"anthropic"`, `"gemini"`, `"ollama"`, `"lmstudio"`. Setting `provider` lets the library create the model adapter and a default evaluator from env. |
|
|
35
|
+
|
|
36
|
+
Once these mean something, the rest of the doc (quick start, fluent plan, default evaluators, contracts) should fall into place.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- **Explicit plans** - Machine-readable step list before execution
|
|
43
|
+
- **Dependency-ordered execution** - Steps run when their dependencies are satisfied
|
|
44
|
+
- **Lifecycle events** - `run.started`, `plan.created`, `step.started`, `step.completed`, `run.completed`, etc.
|
|
45
|
+
- **Bounded retries** - Evaluator-driven completion with configurable retry policy
|
|
46
|
+
- **Structured outputs** - Per-step and final run outputs
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install pocket-agent
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Examples (quick start)
|
|
55
|
+
|
|
56
|
+
### 1. Super quick start (one call)
|
|
57
|
+
|
|
58
|
+
Set your API key in the environment, then create and run in two lines. Uses a single-step plan and the LLM to answer; no planner or executor code to write.
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import { createQuickAgent } from "pocket-agent";
|
|
62
|
+
|
|
63
|
+
const runner = createQuickAgent({ provider: "openai" });
|
|
64
|
+
const run = await runner.run({ goal: "What is 2+2? Explain in one sentence." });
|
|
65
|
+
|
|
66
|
+
console.log(run.outputs?.answer);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Supported `provider`: `"openai"` | `"anthropic"` | `"gemini"` | `"ollama"` | `"lmstudio"`. Each reads from env (e.g. `OPENAI_API_KEY`, `OPENAI_MODEL`). Optional `modelConfig` and `systemPrompt`. No tools in this mode; for tools and multi-step plans, see the docs below.
|
|
70
|
+
|
|
71
|
+
### 2. Goal-only with LLM-generated steps
|
|
72
|
+
|
|
73
|
+
Give a goal and let the LLM invent the plan (the list of steps). Use `createGoalDrivenAgent` with `useLLMPlanner: true`:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import { createGoalDrivenAgent } from "pocket-agent";
|
|
77
|
+
|
|
78
|
+
const runner = createGoalDrivenAgent({
|
|
79
|
+
provider: "openai",
|
|
80
|
+
useLLMPlanner: true,
|
|
81
|
+
llmPlannerOptions: { maxSteps: 5, planHint: "Use 2–4 clear steps." },
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
const run = await runner.run({
|
|
85
|
+
goal: "Explain what an API is in three short steps: definition, why it matters, one example.",
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
console.log(run.plan.steps); // steps were generated by the LLM
|
|
89
|
+
console.log(run.outputs);
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 3. Custom planner and executor
|
|
93
|
+
|
|
94
|
+
When you want your own plan or execution logic, use `createAgentRunner` with a planner, executor, and evaluator (or `provider` for a default evaluator):
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
import { createAgentRunner } from "pocket-agent";
|
|
98
|
+
|
|
99
|
+
const runner = createAgentRunner({
|
|
100
|
+
provider: "openai",
|
|
101
|
+
planner, // your Planner or use createFixedPlanPlanner(steps)
|
|
102
|
+
executor, // your StepExecutor or use createDefaultExecutor({ model })
|
|
103
|
+
tools: {}, // optional
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const run = await runner.run({
|
|
107
|
+
goal: "Find the latest contract, extract payment terms, and summarize risks.",
|
|
108
|
+
context: { customerId: "abc123" },
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For fluent step definitions and a minimal planner/executor/evaluator, see the docs below.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Documentation
|
|
117
|
+
|
|
118
|
+
More guides (absolute links so they work on npm and GitHub):
|
|
119
|
+
|
|
120
|
+
| Doc | Description |
|
|
121
|
+
|-----|-------------|
|
|
122
|
+
| [Fluent plan and defaults](https://github.com/sam-thewise/pocket-agent/blob/master/docs/fluent-plan-and-defaults.md) | Build plans with `step()` + `createFixedPlanPlanner` and run with `createDefaultExecutor`. |
|
|
123
|
+
| [Custom planner and executor](https://github.com/sam-thewise/pocket-agent/blob/master/docs/custom-planner-executor.md) | Minimal planner, executor, and evaluator (full code). |
|
|
124
|
+
| [Default evaluators and providers](https://github.com/sam-thewise/pocket-agent/blob/master/docs/default-evaluators-and-providers.md) | Provider table, `provider` in `createAgentRunner`, adapters. |
|
|
125
|
+
| [Contracts](https://github.com/sam-thewise/pocket-agent/blob/master/docs/contracts.md) | Planner, StepExecutor, StepEvaluator, Tools. |
|
|
126
|
+
| [Events](https://github.com/sam-thewise/pocket-agent/blob/master/docs/events.md) | Event-driven usage with `runner.start()`. |
|
|
127
|
+
| [API key and local models](https://github.com/sam-thewise/pocket-agent/blob/master/docs/api-key-and-local-models.md) | Cloud (OpenAI), Ollama, LM Studio, tools, project planner. |
|
|
128
|
+
| [Examples](https://github.com/sam-thewise/pocket-agent/blob/master/docs/examples.md) | All runnable scripts (`npm run example:*`). |
|
|
129
|
+
|
|
130
|
+
## Scripts
|
|
131
|
+
|
|
132
|
+
- `npm run build` - compile TypeScript to `dist/`
|
|
133
|
+
- `npm test` - run tests
|
|
134
|
+
- `npm run test:watch` - run tests in watch mode
|
|
135
|
+
- `npm run example:quick-start` - quick-start example
|
|
136
|
+
- `npm run example:fluent-plan` - fluent plan example
|
|
137
|
+
- `npm run example:goal-driven-llm` - goal-only with LLM-generated steps
|
|
138
|
+
- `npm run example:minimal` - minimal planner/executor/evaluator (no API key)
|
|
139
|
+
- `npm run example:openai` - full run with tools (OpenAI or local)
|
|
140
|
+
- `npm run example:planner` - project structure from a description
|
|
141
|
+
|
|
142
|
+
See [Examples](https://github.com/sam-thewise/pocket-agent/blob/master/docs/examples.md) for the full list and what each script does.
|
|
@@ -27,34 +27,34 @@ function buildPrompt(input, options) {
|
|
|
27
27
|
? `\nPrior attempts: ${priorAttempts.length}. Last had status: ${priorAttempts[priorAttempts.length - 1]?.status}.`
|
|
28
28
|
: "";
|
|
29
29
|
const jsonInstruction = options.useJsonBlock
|
|
30
|
-
? `Respond with a single JSON object in a fenced code block (\\\`\\\`\\\`json ... \\\`\\\`\\\`). The JSON must have:
|
|
31
|
-
- "verdict": one of "complete", "retry", "needs_replan", "failed"
|
|
32
|
-
- "reasons": array of short strings explaining your decision
|
|
33
|
-
- "missingCriteria" (optional): array of criteria not yet satisfied
|
|
34
|
-
- "confidence" (optional): number 0-1
|
|
30
|
+
? `Respond with a single JSON object in a fenced code block (\\\`\\\`\\\`json ... \\\`\\\`\\\`). The JSON must have:
|
|
31
|
+
- "verdict": one of "complete", "retry", "needs_replan", "failed"
|
|
32
|
+
- "reasons": array of short strings explaining your decision
|
|
33
|
+
- "missingCriteria" (optional): array of criteria not yet satisfied
|
|
34
|
+
- "confidence" (optional): number 0-1
|
|
35
35
|
- "suggestedAction" (optional): string for retry/replan`
|
|
36
|
-
: `Respond with exactly:
|
|
37
|
-
VERDICT: complete|retry|needs_replan|failed
|
|
38
|
-
REASONS: one or more short lines
|
|
36
|
+
: `Respond with exactly:
|
|
37
|
+
VERDICT: complete|retry|needs_replan|failed
|
|
38
|
+
REASONS: one or more short lines
|
|
39
39
|
Optional lines: MISSING_CRITERIA: ... CONFIDENCE: 0-1 SUGGESTED_ACTION: ...`;
|
|
40
|
-
return `You are evaluating whether a step in a plan-driven agent run is complete.
|
|
41
|
-
|
|
42
|
-
Step:
|
|
43
|
-
- id: ${step.id}
|
|
44
|
-
- name: ${step.name ?? step.id}
|
|
45
|
-
- objective: ${step.objective}
|
|
46
|
-
- expected outputs: ${(step.outputs ?? []).join(", ")}
|
|
47
|
-
|
|
48
|
-
Completion criteria (all should be satisfied for "complete"):
|
|
49
|
-
- ${criteria || "(none specified)"}
|
|
50
|
-
|
|
51
|
-
Attempt result:
|
|
52
|
-
- status: ${attemptResult.status}
|
|
53
|
-
- structuredOutput: ${structuredStr}
|
|
54
|
-
- rawOutput (excerpt): ${rawTruncated}${priorSummary}
|
|
55
|
-
|
|
56
|
-
Is this step complete, should we retry, replan, or mark failed?
|
|
57
|
-
|
|
40
|
+
return `You are evaluating whether a step in a plan-driven agent run is complete.
|
|
41
|
+
|
|
42
|
+
Step:
|
|
43
|
+
- id: ${step.id}
|
|
44
|
+
- name: ${step.name ?? step.id}
|
|
45
|
+
- objective: ${step.objective}
|
|
46
|
+
- expected outputs: ${(step.outputs ?? []).join(", ")}
|
|
47
|
+
|
|
48
|
+
Completion criteria (all should be satisfied for "complete"):
|
|
49
|
+
- ${criteria || "(none specified)"}
|
|
50
|
+
|
|
51
|
+
Attempt result:
|
|
52
|
+
- status: ${attemptResult.status}
|
|
53
|
+
- structuredOutput: ${structuredStr}
|
|
54
|
+
- rawOutput (excerpt): ${rawTruncated}${priorSummary}
|
|
55
|
+
|
|
56
|
+
Is this step complete, should we retry, replan, or mark failed?
|
|
57
|
+
|
|
58
58
|
${jsonInstruction}`;
|
|
59
59
|
}
|
|
60
60
|
function parseResponse(content, stepId, attempt, useJsonBlock) {
|
|
@@ -59,33 +59,33 @@ function buildPlanPrompt(input, options) {
|
|
|
59
59
|
? `Available tools (use only if needed): ${input.availableTools.map((t) => t.name).join(", ")}.`
|
|
60
60
|
: "No tools are available; use only reasoning/transform steps.";
|
|
61
61
|
const constraintStr = constraints.length > 0 ? `Constraints: ${constraints.join("; ")}` : "";
|
|
62
|
-
return `You are a planning assistant. Given a goal and context, output a plan as a single JSON object.
|
|
63
|
-
|
|
64
|
-
Goal: ${goal}
|
|
65
|
-
|
|
66
|
-
Context (key-value): ${JSON.stringify(context)}
|
|
67
|
-
|
|
68
|
-
${constraintStr ? constraintStr + "\n\n" : ""}${toolList}
|
|
69
|
-
|
|
70
|
-
${hint}
|
|
71
|
-
|
|
72
|
-
Respond with ONLY a JSON object in this exact shape (no markdown, no explanation):
|
|
73
|
-
\`\`\`json
|
|
74
|
-
{
|
|
75
|
-
"steps": [
|
|
76
|
-
{
|
|
77
|
-
"id": "unique_snake_case_id",
|
|
78
|
-
"name": "Human-readable step name",
|
|
79
|
-
"objective": "What this step must do",
|
|
80
|
-
"outputs": ["output_key"],
|
|
81
|
-
"dependencies": [],
|
|
82
|
-
"inputsFromContext": ["goal"],
|
|
83
|
-
"inputsFromStep": []
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
}
|
|
87
|
-
\`\`\`
|
|
88
|
-
|
|
62
|
+
return `You are a planning assistant. Given a goal and context, output a plan as a single JSON object.
|
|
63
|
+
|
|
64
|
+
Goal: ${goal}
|
|
65
|
+
|
|
66
|
+
Context (key-value): ${JSON.stringify(context)}
|
|
67
|
+
|
|
68
|
+
${constraintStr ? constraintStr + "\n\n" : ""}${toolList}
|
|
69
|
+
|
|
70
|
+
${hint}
|
|
71
|
+
|
|
72
|
+
Respond with ONLY a JSON object in this exact shape (no markdown, no explanation):
|
|
73
|
+
\`\`\`json
|
|
74
|
+
{
|
|
75
|
+
"steps": [
|
|
76
|
+
{
|
|
77
|
+
"id": "unique_snake_case_id",
|
|
78
|
+
"name": "Human-readable step name",
|
|
79
|
+
"objective": "What this step must do",
|
|
80
|
+
"outputs": ["output_key"],
|
|
81
|
+
"dependencies": [],
|
|
82
|
+
"inputsFromContext": ["goal"],
|
|
83
|
+
"inputsFromStep": []
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
\`\`\`
|
|
88
|
+
|
|
89
89
|
Rules: Step ids must be unique. Later steps can list earlier step ids in "dependencies" and reference their outputs in "inputsFromStep" as { "stepId": "id", "key": "output_key" }. Use "inputsFromContext" for keys from the run context (e.g. "goal"). Output only the JSON block.`;
|
|
90
90
|
}
|
|
91
91
|
/**
|
package/package.json
CHANGED
|
@@ -1,50 +1,54 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "pocket-agent",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Reusable Node.js framework for plan-driven agent execution",
|
|
5
|
-
"author": "sam_thewise",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"example
|
|
20
|
-
"example:
|
|
21
|
-
"example:
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"@
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "pocket-agent",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Reusable Node.js framework for plan-driven agent execution",
|
|
5
|
+
"author": "sam_thewise",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/sam-thewise/pocket-agent"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/sam-thewise/pocket-agent#readme",
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"test": "vitest run",
|
|
17
|
+
"test:watch": "vitest",
|
|
18
|
+
"test:coverage": "vitest run --coverage",
|
|
19
|
+
"example": "tsx examples/run-example.ts",
|
|
20
|
+
"example:openai": "tsx examples/run-with-openai.ts",
|
|
21
|
+
"example:planner": "tsx examples/run-project-planner.ts",
|
|
22
|
+
"example:quick-start": "tsx examples/run-quick-start.ts",
|
|
23
|
+
"example:fluent-plan": "tsx examples/run-fluent-plan.ts",
|
|
24
|
+
"example:goal-driven-llm": "tsx examples/run-goal-driven-llm.ts",
|
|
25
|
+
"example:minimal": "tsx examples/run-minimal.ts",
|
|
26
|
+
"lint": "eslint src --ext .ts"
|
|
27
|
+
},
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": "./dist/index.js",
|
|
31
|
+
"types": "./dist/index.d.ts"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist"
|
|
36
|
+
],
|
|
37
|
+
"optionalDependencies": {
|
|
38
|
+
"@anthropic-ai/sdk": "^0.30.0",
|
|
39
|
+
"@google/genai": "^1.0.0",
|
|
40
|
+
"openai": "^4.52.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@anthropic-ai/sdk": "^0.30.0",
|
|
44
|
+
"@google/genai": "^1.0.0",
|
|
45
|
+
"@types/node": "^20.10.0",
|
|
46
|
+
"openai": "^4.52.0",
|
|
47
|
+
"typescript": "^5.3.0",
|
|
48
|
+
"tsx": "^4.7.0",
|
|
49
|
+
"vitest": "^1.2.0"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=18"
|
|
53
|
+
}
|
|
54
|
+
}
|