@tinyweb_dev/agent-framework-tool 0.3.0 → 0.4.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/builtins.cjs +108 -0
- package/dist/builtins.cjs.map +1 -1
- package/dist/builtins.d.ts +6 -0
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +108 -0
- package/dist/builtins.js.map +1 -1
- package/dist/index.cjs +134 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +132 -24
- package/dist/index.js.map +1 -1
- package/dist/todo/update_todo_list.d.ts +44 -0
- package/dist/todo/update_todo_list.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `update_todo_list` — replace the entire agent todo checklist.
|
|
3
|
+
*
|
|
4
|
+
* Adapted from Roo Code:
|
|
5
|
+
* - tool desc: `roo-code-extension/src/core/prompts/tools/native-tools/update_todo_list.ts`
|
|
6
|
+
* - parser: `roo-code-extension/src/core/tools/UpdateTodoListTool.ts` (`parseMarkdownChecklist`)
|
|
7
|
+
* - UI shape: `webview-ui/src/components/chat/TodoListDisplay.tsx`
|
|
8
|
+
*
|
|
9
|
+
* Framework scope: pure parse + structured return. No task session / approval
|
|
10
|
+
* UI here — consumers persist `todos` from the tool result (or tool-call input)
|
|
11
|
+
* the same way they already handle other structured tool payloads.
|
|
12
|
+
*/
|
|
13
|
+
import { Schema } from "effect";
|
|
14
|
+
export type TodoStatus = "pending" | "in_progress" | "completed";
|
|
15
|
+
export type TodoItem = {
|
|
16
|
+
readonly id: string;
|
|
17
|
+
readonly content: string;
|
|
18
|
+
readonly status: TodoStatus;
|
|
19
|
+
};
|
|
20
|
+
export type UpdateTodoListConfig = {
|
|
21
|
+
readonly name?: string;
|
|
22
|
+
readonly description?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Parse a markdown checklist into structured todo items.
|
|
26
|
+
* Supports optional leading `- `, and boxes: `[ ]` pending, `[x]` completed, `[-]`/`[~]` in progress.
|
|
27
|
+
*/
|
|
28
|
+
export declare const parseMarkdownChecklist: (md: string) => TodoItem[];
|
|
29
|
+
export declare const todoListToMarkdown: (todos: ReadonlyArray<TodoItem>) => string;
|
|
30
|
+
export declare const updateTodoList: (config?: UpdateTodoListConfig) => import("@tinyweb_dev/agent-framework-llm").ExecutableTool<Schema.Struct<{
|
|
31
|
+
readonly todos: Schema.String;
|
|
32
|
+
}>, Schema.Struct<{
|
|
33
|
+
readonly ok: Schema.Boolean;
|
|
34
|
+
readonly message: Schema.String;
|
|
35
|
+
readonly todos: Schema.$Array<Schema.Struct<{
|
|
36
|
+
readonly id: Schema.String;
|
|
37
|
+
readonly content: Schema.String;
|
|
38
|
+
readonly status: Schema.Union<readonly [Schema.Literal<"pending">, Schema.Literal<"in_progress">, Schema.Literal<"completed">]>;
|
|
39
|
+
}>>;
|
|
40
|
+
readonly completed_count: Schema.Number;
|
|
41
|
+
readonly total_count: Schema.Number;
|
|
42
|
+
readonly markdown: Schema.String;
|
|
43
|
+
}>>;
|
|
44
|
+
//# sourceMappingURL=update_todo_list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update_todo_list.d.ts","sourceRoot":"","sources":["../../src/todo/update_todo_list.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,CAAA;AAEhE,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AA4DD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,IAAI,MAAM,KAAG,QAAQ,EAwB3D,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAG,MAQrD,CAAA;AAEf,eAAO,MAAM,cAAc,GAAI,SAAQ,oBAAyB;;;;;;;;;;;;;GA6B5D,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@tinyweb_dev/agent-framework-tool",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
@@ -119,9 +119,9 @@
|
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"cheerio": "1.0.0",
|
|
121
121
|
"effect": "4.0.0-beta.59",
|
|
122
|
-
"@tinyweb_dev/agent-framework-core": "0.
|
|
123
|
-
"@tinyweb_dev/agent-framework-llm": "0.
|
|
124
|
-
"@tinyweb_dev/agent-framework-agent": "0.
|
|
122
|
+
"@tinyweb_dev/agent-framework-core": "0.4.0",
|
|
123
|
+
"@tinyweb_dev/agent-framework-llm": "0.4.0",
|
|
124
|
+
"@tinyweb_dev/agent-framework-agent": "0.4.0"
|
|
125
125
|
},
|
|
126
126
|
"main": "./dist/index.cjs",
|
|
127
127
|
"module": "./dist/index.js",
|