@lite-agent/sdk 0.1.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/dist/index.d.ts +78 -0
- package/dist/index.js +354 -0
- package/package.json +52 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ModelProvider, Tool, Middleware, Sandbox, PermissionPolicy, ApprovalHandler, InputHandler, Agent, Message, AgentEvent, RunResult, ToolContext } from '@lite-agent/core';
|
|
2
|
+
export * from '@lite-agent/core';
|
|
3
|
+
import { ZodType } from 'zod';
|
|
4
|
+
|
|
5
|
+
interface CreateLiteAgentConfig {
|
|
6
|
+
model: ModelProvider;
|
|
7
|
+
modelName?: string;
|
|
8
|
+
workdir: string;
|
|
9
|
+
skillsDir?: string;
|
|
10
|
+
tools?: Tool[];
|
|
11
|
+
system?: string;
|
|
12
|
+
allowedTools?: string[];
|
|
13
|
+
disallowedTools?: string[];
|
|
14
|
+
maxTurns?: number;
|
|
15
|
+
maxTokens?: number;
|
|
16
|
+
use?: Middleware[];
|
|
17
|
+
sandbox?: Sandbox;
|
|
18
|
+
permission?: PermissionPolicy;
|
|
19
|
+
onApproval?: ApprovalHandler;
|
|
20
|
+
onAskUser?: InputHandler;
|
|
21
|
+
}
|
|
22
|
+
declare function createLiteAgent(cfg: CreateLiteAgentConfig): Agent;
|
|
23
|
+
|
|
24
|
+
interface QueryOptions {
|
|
25
|
+
prompt: string | Message[];
|
|
26
|
+
model: ModelProvider;
|
|
27
|
+
modelName?: string;
|
|
28
|
+
cwd?: string;
|
|
29
|
+
systemPrompt?: string;
|
|
30
|
+
skillsDir?: string;
|
|
31
|
+
tools?: Tool[];
|
|
32
|
+
allowedTools?: string[];
|
|
33
|
+
disallowedTools?: string[];
|
|
34
|
+
maxTurns?: number;
|
|
35
|
+
maxTokens?: number;
|
|
36
|
+
use?: Middleware[];
|
|
37
|
+
signal?: AbortSignal;
|
|
38
|
+
sessionId?: string;
|
|
39
|
+
sandbox?: Sandbox;
|
|
40
|
+
permission?: PermissionPolicy;
|
|
41
|
+
onApproval?: ApprovalHandler;
|
|
42
|
+
onAskUser?: InputHandler;
|
|
43
|
+
}
|
|
44
|
+
declare function query(opts: QueryOptions): AsyncGenerator<AgentEvent, RunResult>;
|
|
45
|
+
|
|
46
|
+
declare function tool<I>(name: string, description: string, schema: ZodType<I>, handler: (input: I, ctx: ToolContext) => Promise<string> | string): Tool<I>;
|
|
47
|
+
|
|
48
|
+
interface SystemPromptOptions {
|
|
49
|
+
workdir: string;
|
|
50
|
+
modelName?: string;
|
|
51
|
+
skills: string;
|
|
52
|
+
}
|
|
53
|
+
declare function buildSystemPrompt(opts: SystemPromptOptions): string;
|
|
54
|
+
|
|
55
|
+
declare function bashTool(workdir: string): Tool;
|
|
56
|
+
|
|
57
|
+
declare function makeSafePath(workdir: string): (p: string) => string;
|
|
58
|
+
declare function fileTools(workdir: string): Tool[];
|
|
59
|
+
|
|
60
|
+
declare function todoTool(): Tool;
|
|
61
|
+
|
|
62
|
+
declare function askUserTool(): Tool;
|
|
63
|
+
|
|
64
|
+
declare function defaultTools(workdir: string): Tool[];
|
|
65
|
+
|
|
66
|
+
declare class SkillLoader {
|
|
67
|
+
readonly skillsDir: string;
|
|
68
|
+
private skills;
|
|
69
|
+
constructor(skillsDir: string);
|
|
70
|
+
private loadAll;
|
|
71
|
+
private parse;
|
|
72
|
+
getDescriptions(): string;
|
|
73
|
+
getContent(name: string): string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare function loadSkillTool(loader: SkillLoader): Tool;
|
|
77
|
+
|
|
78
|
+
export { type CreateLiteAgentConfig, type QueryOptions, SkillLoader, type SystemPromptOptions, askUserTool, bashTool, buildSystemPrompt, createLiteAgent, defaultTools, fileTools, loadSkillTool, makeSafePath, query, todoTool, tool };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@lite-agent/core";
|
|
3
|
+
|
|
4
|
+
// src/createLiteAgent.ts
|
|
5
|
+
import { createAgent, nativeCodec, permission } from "@lite-agent/core";
|
|
6
|
+
|
|
7
|
+
// src/tools/bash.ts
|
|
8
|
+
import { execSync } from "child_process";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
import { defineTool } from "@lite-agent/core";
|
|
11
|
+
var DANGEROUS = ["rm -rf /", "sudo", "shutdown", "reboot", "> /dev/"];
|
|
12
|
+
function bashTool(workdir) {
|
|
13
|
+
return defineTool({
|
|
14
|
+
name: "bash",
|
|
15
|
+
description: "Run a shell command.",
|
|
16
|
+
schema: z.object({ command: z.string() }),
|
|
17
|
+
execute: async ({ command }, ctx) => {
|
|
18
|
+
if (DANGEROUS.some((d) => command.includes(d)))
|
|
19
|
+
return "Error: Dangerous command blocked";
|
|
20
|
+
const toRun = ctx.sandbox ? await ctx.sandbox.wrap(command, { cwd: workdir }) : command;
|
|
21
|
+
try {
|
|
22
|
+
const out = execSync(toRun, {
|
|
23
|
+
cwd: workdir,
|
|
24
|
+
encoding: "utf8",
|
|
25
|
+
timeout: 12e4,
|
|
26
|
+
maxBuffer: 5e7
|
|
27
|
+
});
|
|
28
|
+
return out.trim() || "(no output)";
|
|
29
|
+
} catch (e) {
|
|
30
|
+
const err = e;
|
|
31
|
+
return `${err.stdout ?? ""}${err.stderr ?? ""}`.trim().slice(0, 5e4) || `Error: ${err.message}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/tools/file.ts
|
|
38
|
+
import { mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
39
|
+
import { dirname, resolve } from "path";
|
|
40
|
+
import { z as z2 } from "zod";
|
|
41
|
+
import { defineTool as defineTool2 } from "@lite-agent/core";
|
|
42
|
+
var MAX_BYTES = 5e4;
|
|
43
|
+
function makeSafePath(workdir) {
|
|
44
|
+
const root = resolve(workdir);
|
|
45
|
+
return (p) => {
|
|
46
|
+
const full = resolve(root, p);
|
|
47
|
+
if (full !== root && !full.startsWith(root + "/")) {
|
|
48
|
+
throw new Error(`Path escapes workspace: ${p}`);
|
|
49
|
+
}
|
|
50
|
+
return full;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function fileTools(workdir) {
|
|
54
|
+
const safePath = makeSafePath(workdir);
|
|
55
|
+
const readFile = defineTool2({
|
|
56
|
+
name: "read_file",
|
|
57
|
+
description: "Read file contents.",
|
|
58
|
+
schema: z2.object({ path: z2.string(), limit: z2.number().int().optional() }),
|
|
59
|
+
execute: ({ path, limit }) => {
|
|
60
|
+
const lines = readFileSync(safePath(path), "utf8").split("\n");
|
|
61
|
+
if (limit && limit < lines.length) {
|
|
62
|
+
return [
|
|
63
|
+
...lines.slice(0, limit),
|
|
64
|
+
`... (${lines.length - limit} more lines)`
|
|
65
|
+
].join("\n").slice(0, MAX_BYTES);
|
|
66
|
+
}
|
|
67
|
+
return lines.join("\n").slice(0, MAX_BYTES);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const writeFile = defineTool2({
|
|
71
|
+
name: "write_file",
|
|
72
|
+
description: "Write content to a file.",
|
|
73
|
+
schema: z2.object({ path: z2.string(), content: z2.string() }),
|
|
74
|
+
execute: ({ path, content }) => {
|
|
75
|
+
const fp = safePath(path);
|
|
76
|
+
mkdirSync(dirname(fp), { recursive: true });
|
|
77
|
+
writeFileSync(fp, content);
|
|
78
|
+
return `Wrote ${content.length} bytes to ${path}`;
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const editFile = defineTool2({
|
|
82
|
+
name: "edit_file",
|
|
83
|
+
description: "Replace exact text in a file.",
|
|
84
|
+
schema: z2.object({
|
|
85
|
+
path: z2.string(),
|
|
86
|
+
old_text: z2.string(),
|
|
87
|
+
new_text: z2.string()
|
|
88
|
+
}),
|
|
89
|
+
execute: ({ path, old_text, new_text }) => {
|
|
90
|
+
const fp = safePath(path);
|
|
91
|
+
const content = readFileSync(fp, "utf8");
|
|
92
|
+
if (!content.includes(old_text))
|
|
93
|
+
return `Error: Text not found in ${path}`;
|
|
94
|
+
writeFileSync(fp, content.replace(old_text, new_text));
|
|
95
|
+
return `Edited ${path}`;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
return [readFile, writeFile, editFile];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/tools/todo.ts
|
|
102
|
+
import { z as z3 } from "zod";
|
|
103
|
+
import { defineTool as defineTool3 } from "@lite-agent/core";
|
|
104
|
+
var MARK = {
|
|
105
|
+
pending: "[ ]",
|
|
106
|
+
in_progress: "[>]",
|
|
107
|
+
completed: "[x]"
|
|
108
|
+
};
|
|
109
|
+
var itemSchema = z3.object({
|
|
110
|
+
id: z3.string(),
|
|
111
|
+
text: z3.string().min(1),
|
|
112
|
+
status: z3.enum(["pending", "in_progress", "completed"])
|
|
113
|
+
});
|
|
114
|
+
var TodoManager = class {
|
|
115
|
+
items = [];
|
|
116
|
+
update(items) {
|
|
117
|
+
if (items.length > 20) throw new Error("Max 20 todos allowed");
|
|
118
|
+
if (items.filter((t) => t.status === "in_progress").length > 1) {
|
|
119
|
+
throw new Error("Only one task can be in_progress at a time");
|
|
120
|
+
}
|
|
121
|
+
this.items = items;
|
|
122
|
+
return this.render();
|
|
123
|
+
}
|
|
124
|
+
render() {
|
|
125
|
+
if (!this.items.length) return "No todos.";
|
|
126
|
+
const lines = this.items.map(
|
|
127
|
+
(t) => `${MARK[t.status]} #${t.id}: ${t.text}`
|
|
128
|
+
);
|
|
129
|
+
const done = this.items.filter((t) => t.status === "completed").length;
|
|
130
|
+
lines.push(`
|
|
131
|
+
(${done}/${this.items.length} completed)`);
|
|
132
|
+
return lines.join("\n");
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
function todoTool() {
|
|
136
|
+
const manager = new TodoManager();
|
|
137
|
+
return defineTool3({
|
|
138
|
+
name: "todo",
|
|
139
|
+
description: "Update the task list. Track progress on multi-step tasks.",
|
|
140
|
+
schema: z3.object({ items: z3.array(itemSchema) }),
|
|
141
|
+
execute: async ({ items }) => manager.update(items)
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// src/tools/askUser.ts
|
|
146
|
+
import { z as z4 } from "zod";
|
|
147
|
+
import { defineTool as defineTool4 } from "@lite-agent/core";
|
|
148
|
+
function renderAnswer(a) {
|
|
149
|
+
if (a.selected && a.selected.length) return a.selected.join(", ");
|
|
150
|
+
if (a.text && a.text.length) return a.text;
|
|
151
|
+
return "(no answer)";
|
|
152
|
+
}
|
|
153
|
+
function askUserTool() {
|
|
154
|
+
return defineTool4({
|
|
155
|
+
name: "ask_user",
|
|
156
|
+
description: "Ask the human a question and wait for their answer. Use for decisions, missing information, or confirmations. Provide `options` for a multiple-choice question (set `multiSelect` to allow several).",
|
|
157
|
+
schema: z4.object({
|
|
158
|
+
question: z4.string().min(1),
|
|
159
|
+
options: z4.array(z4.string()).optional(),
|
|
160
|
+
multiSelect: z4.boolean().optional()
|
|
161
|
+
}),
|
|
162
|
+
execute: async ({ question, options, multiSelect }, ctx) => {
|
|
163
|
+
if (!ctx.input)
|
|
164
|
+
return "Error: ask_user is unavailable (no input handler configured).";
|
|
165
|
+
const q = {
|
|
166
|
+
question,
|
|
167
|
+
...options ? { options } : {},
|
|
168
|
+
...multiSelect ? { multiSelect } : {}
|
|
169
|
+
};
|
|
170
|
+
if (ctx.call)
|
|
171
|
+
ctx.emit({ type: "input_request", call: ctx.call, question: q });
|
|
172
|
+
const answer = await ctx.input.request(q);
|
|
173
|
+
ctx.emit({
|
|
174
|
+
type: "input_resolved",
|
|
175
|
+
id: ctx.call?.id ?? "ask_user",
|
|
176
|
+
answer
|
|
177
|
+
});
|
|
178
|
+
return renderAnswer(answer);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// src/tools/index.ts
|
|
184
|
+
function defaultTools(workdir) {
|
|
185
|
+
return [bashTool(workdir), ...fileTools(workdir), todoTool()];
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// src/skills/loader.ts
|
|
189
|
+
import { existsSync, readdirSync, readFileSync as readFileSync2 } from "fs";
|
|
190
|
+
import { dirname as dirname2, join } from "path";
|
|
191
|
+
var SkillLoader = class {
|
|
192
|
+
skillsDir;
|
|
193
|
+
skills = {};
|
|
194
|
+
constructor(skillsDir) {
|
|
195
|
+
this.skillsDir = skillsDir;
|
|
196
|
+
this.loadAll();
|
|
197
|
+
}
|
|
198
|
+
loadAll() {
|
|
199
|
+
if (!existsSync(this.skillsDir)) return;
|
|
200
|
+
const walk = (dir) => {
|
|
201
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
202
|
+
const p = join(dir, entry.name);
|
|
203
|
+
if (entry.isDirectory()) walk(p);
|
|
204
|
+
else if (entry.name === "SKILL.md") {
|
|
205
|
+
const { meta, body } = this.parse(readFileSync2(p, "utf8"));
|
|
206
|
+
const name = meta.name ?? dirname2(p).split("/").pop() ?? p;
|
|
207
|
+
this.skills[name] = { meta, body, path: p };
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
walk(this.skillsDir);
|
|
212
|
+
}
|
|
213
|
+
parse(text) {
|
|
214
|
+
const m = text.match(/^---\n(.*?)\n---\n(.*)/s);
|
|
215
|
+
if (!m) return { meta: {}, body: text };
|
|
216
|
+
const meta = {};
|
|
217
|
+
for (const line of m[1].trim().split("\n")) {
|
|
218
|
+
const i = line.indexOf(":");
|
|
219
|
+
if (i > 0) meta[line.slice(0, i).trim()] = line.slice(i + 1).trim();
|
|
220
|
+
}
|
|
221
|
+
return { meta, body: m[2].trim() };
|
|
222
|
+
}
|
|
223
|
+
getDescriptions() {
|
|
224
|
+
const names = Object.keys(this.skills);
|
|
225
|
+
if (!names.length) return "(no skills available)";
|
|
226
|
+
return names.map((n) => {
|
|
227
|
+
const s = this.skills[n];
|
|
228
|
+
const tags = s.meta.tags ? ` [${s.meta.tags}]` : "";
|
|
229
|
+
return ` - ${n}: ${s.meta.description ?? "No description"}${tags}`;
|
|
230
|
+
}).join("\n");
|
|
231
|
+
}
|
|
232
|
+
getContent(name) {
|
|
233
|
+
const s = this.skills[name];
|
|
234
|
+
if (!s) return `Error: Unknown skill '${name}'. Available: ${Object.keys(this.skills).join(", ")}`;
|
|
235
|
+
return `<skill name="${name}">
|
|
236
|
+
${s.body}
|
|
237
|
+
</skill>`;
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
// src/skills/loadSkillTool.ts
|
|
242
|
+
import { z as z5 } from "zod";
|
|
243
|
+
import { defineTool as defineTool5 } from "@lite-agent/core";
|
|
244
|
+
function loadSkillTool(loader) {
|
|
245
|
+
return defineTool5({
|
|
246
|
+
name: "load_skill",
|
|
247
|
+
description: "Load a skill's full instructions by name before tackling an unfamiliar task.",
|
|
248
|
+
schema: z5.object({ name: z5.string() }),
|
|
249
|
+
execute: ({ name }) => loader.getContent(name)
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// src/system.ts
|
|
254
|
+
function buildSystemPrompt(opts) {
|
|
255
|
+
const modelLine = opts.modelName ? `Your model is ${opts.modelName}.
|
|
256
|
+
` : "";
|
|
257
|
+
return `You are lite-agent, a coding agent operating in ${opts.workdir}.
|
|
258
|
+
${modelLine}
|
|
259
|
+
## Core Principles
|
|
260
|
+
- Prefer tools over prose.
|
|
261
|
+
- Always work inside ${opts.workdir}; never access paths outside it.
|
|
262
|
+
|
|
263
|
+
## Task Planning
|
|
264
|
+
- For any task with 3+ steps, call the todo tool first to plan, then execute step by step.
|
|
265
|
+
- Mark todos as in_progress before starting each step, and completed when done.
|
|
266
|
+
|
|
267
|
+
## Skills
|
|
268
|
+
Use load_skill to access specialized knowledge before tackling unfamiliar topics.
|
|
269
|
+
Available skills:
|
|
270
|
+
${opts.skills}`;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// src/createLiteAgent.ts
|
|
274
|
+
function createLiteAgent(cfg) {
|
|
275
|
+
let tools = [...defaultTools(cfg.workdir)];
|
|
276
|
+
let skills = "(no skills available)";
|
|
277
|
+
if (cfg.skillsDir) {
|
|
278
|
+
const loader = new SkillLoader(cfg.skillsDir);
|
|
279
|
+
tools.push(loadSkillTool(loader));
|
|
280
|
+
skills = loader.getDescriptions();
|
|
281
|
+
}
|
|
282
|
+
if (cfg.tools) tools.push(...cfg.tools);
|
|
283
|
+
if (cfg.onAskUser) tools.push(askUserTool());
|
|
284
|
+
if (cfg.allowedTools)
|
|
285
|
+
tools = tools.filter((t) => cfg.allowedTools.includes(t.name));
|
|
286
|
+
if (cfg.disallowedTools)
|
|
287
|
+
tools = tools.filter((t) => !cfg.disallowedTools.includes(t.name));
|
|
288
|
+
const system = cfg.system ?? buildSystemPrompt({
|
|
289
|
+
workdir: cfg.workdir,
|
|
290
|
+
modelName: cfg.modelName,
|
|
291
|
+
skills
|
|
292
|
+
});
|
|
293
|
+
const use = [
|
|
294
|
+
...cfg.permission ? [permission(cfg.permission, cfg.onApproval)] : [],
|
|
295
|
+
...cfg.use ?? []
|
|
296
|
+
];
|
|
297
|
+
return createAgent({
|
|
298
|
+
model: cfg.model,
|
|
299
|
+
modelName: cfg.modelName,
|
|
300
|
+
codec: nativeCodec(),
|
|
301
|
+
tools,
|
|
302
|
+
use,
|
|
303
|
+
system,
|
|
304
|
+
maxTurns: cfg.maxTurns,
|
|
305
|
+
maxTokens: cfg.maxTokens,
|
|
306
|
+
sandbox: cfg.sandbox,
|
|
307
|
+
input: cfg.onAskUser
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// src/query.ts
|
|
312
|
+
function query(opts) {
|
|
313
|
+
const agent = createLiteAgent({
|
|
314
|
+
model: opts.model,
|
|
315
|
+
modelName: opts.modelName,
|
|
316
|
+
workdir: opts.cwd ?? process.cwd(),
|
|
317
|
+
skillsDir: opts.skillsDir,
|
|
318
|
+
tools: opts.tools,
|
|
319
|
+
system: opts.systemPrompt,
|
|
320
|
+
allowedTools: opts.allowedTools,
|
|
321
|
+
disallowedTools: opts.disallowedTools,
|
|
322
|
+
maxTurns: opts.maxTurns,
|
|
323
|
+
maxTokens: opts.maxTokens,
|
|
324
|
+
use: opts.use,
|
|
325
|
+
sandbox: opts.sandbox,
|
|
326
|
+
permission: opts.permission,
|
|
327
|
+
onApproval: opts.onApproval,
|
|
328
|
+
onAskUser: opts.onAskUser
|
|
329
|
+
});
|
|
330
|
+
return agent.run(opts.prompt, {
|
|
331
|
+
signal: opts.signal,
|
|
332
|
+
sessionId: opts.sessionId
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// src/tool.ts
|
|
337
|
+
import { defineTool as defineTool6 } from "@lite-agent/core";
|
|
338
|
+
function tool(name, description, schema, handler) {
|
|
339
|
+
return defineTool6({ name, description, schema, execute: handler });
|
|
340
|
+
}
|
|
341
|
+
export {
|
|
342
|
+
SkillLoader,
|
|
343
|
+
askUserTool,
|
|
344
|
+
bashTool,
|
|
345
|
+
buildSystemPrompt,
|
|
346
|
+
createLiteAgent,
|
|
347
|
+
defaultTools,
|
|
348
|
+
fileTools,
|
|
349
|
+
loadSkillTool,
|
|
350
|
+
makeSafePath,
|
|
351
|
+
query,
|
|
352
|
+
todoTool,
|
|
353
|
+
tool
|
|
354
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@lite-agent/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Batteries-included agent SDK over @lite-agent/core: tools, skills, system prompt, and query()/createLiteAgent().",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"agent",
|
|
24
|
+
"ai",
|
|
25
|
+
"llm",
|
|
26
|
+
"agent-sdk",
|
|
27
|
+
"tool-use"
|
|
28
|
+
],
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/NelsonYong/lite-agent.git",
|
|
32
|
+
"directory": "packages/sdk"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup src/index.ts --format esm --dts --clean --tsconfig tsconfig.build.json",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"typecheck": "tsc --noEmit"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@lite-agent/core": "workspace:*",
|
|
44
|
+
"zod": "^4.3.6"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^25.5.0",
|
|
48
|
+
"tsup": "^8.3.0",
|
|
49
|
+
"typescript": "^6.0.2",
|
|
50
|
+
"vitest": "^2.1.0"
|
|
51
|
+
}
|
|
52
|
+
}
|