ycodium-acp-executor 0.2.5971 → 0.2.6027
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.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface ExecutorPlanStep {
|
|
2
|
+
readonly step: string;
|
|
3
|
+
readonly status: "pending" | "inProgress" | "completed";
|
|
4
|
+
}
|
|
5
|
+
/** A native todo write replaces the whole list. An empty list clears it; incomplete data is not a clear. */
|
|
6
|
+
export declare function planFromTodos(todos: unknown): ExecutorPlanStep[] | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** A native todo write replaces the whole list. An empty list clears it; incomplete data is not a clear. */
|
|
2
|
+
export function planFromTodos(todos) {
|
|
3
|
+
if (!Array.isArray(todos))
|
|
4
|
+
return undefined;
|
|
5
|
+
const plan = [];
|
|
6
|
+
for (const todo of todos) {
|
|
7
|
+
if (typeof todo !== "object" ||
|
|
8
|
+
todo === null ||
|
|
9
|
+
typeof todo.content !== "string" ||
|
|
10
|
+
!todo.content.trim())
|
|
11
|
+
return undefined;
|
|
12
|
+
if (todo.status === "cancelled")
|
|
13
|
+
continue;
|
|
14
|
+
if (todo.status !== "pending" && todo.status !== "in_progress" && todo.status !== "completed")
|
|
15
|
+
return undefined;
|
|
16
|
+
plan.push({
|
|
17
|
+
step: todo.content.trim(),
|
|
18
|
+
status: todo.status === "in_progress" ? "inProgress" : todo.status,
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return plan;
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ExecutorPlanStep {
|
|
2
|
+
readonly step: string;
|
|
3
|
+
readonly status: "pending" | "inProgress" | "completed";
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/** A native todo write replaces the whole list. An empty list clears it; incomplete data is not a clear. */
|
|
7
|
+
export function planFromTodos(todos: unknown): ExecutorPlanStep[] | undefined {
|
|
8
|
+
if (!Array.isArray(todos)) return undefined;
|
|
9
|
+
const plan: ExecutorPlanStep[] = [];
|
|
10
|
+
for (const todo of todos) {
|
|
11
|
+
if (
|
|
12
|
+
typeof todo !== "object" ||
|
|
13
|
+
todo === null ||
|
|
14
|
+
typeof todo.content !== "string" ||
|
|
15
|
+
!todo.content.trim()
|
|
16
|
+
)
|
|
17
|
+
return undefined;
|
|
18
|
+
if (todo.status === "cancelled") continue;
|
|
19
|
+
if (todo.status !== "pending" && todo.status !== "in_progress" && todo.status !== "completed")
|
|
20
|
+
return undefined;
|
|
21
|
+
plan.push({
|
|
22
|
+
step: todo.content.trim(),
|
|
23
|
+
status: todo.status === "in_progress" ? "inProgress" : todo.status,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return plan;
|
|
27
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ycodium-acp-executor",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6027",
|
|
4
4
|
"description": "Agent Client Protocol client and executor state machine for Ycodium agent plugins. Speaks ACP over stdio and emits Ycodium executor events.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acp",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@types/node": "24.12.4",
|
|
31
31
|
"typescript": "~6.0.3",
|
|
32
32
|
"vite-plus": "0.2.2",
|
|
33
|
-
"ycodium-
|
|
33
|
+
"@ycodium-ai/plugin-api": "0.2.6027",
|
|
34
34
|
"ycodium-executor-testing": "0.0.0",
|
|
35
|
-
"ycodium-
|
|
36
|
-
"
|
|
35
|
+
"ycodium-executor-common": "0.0.0",
|
|
36
|
+
"ycodium-jsonl-stream": "0.0.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@ycodium-ai/plugin-api": "*"
|