@task-mcp/shared 1.0.22 → 1.0.24
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/algorithms/critical-path.d.ts +47 -0
- package/dist/algorithms/critical-path.d.ts.map +1 -0
- package/dist/algorithms/critical-path.js +340 -0
- package/dist/algorithms/critical-path.js.map +1 -0
- package/dist/algorithms/critical-path.test.d.ts +2 -0
- package/dist/algorithms/critical-path.test.d.ts.map +1 -0
- package/dist/algorithms/critical-path.test.js +184 -0
- package/dist/algorithms/critical-path.test.js.map +1 -0
- package/dist/algorithms/dependency-integrity.d.ts +81 -0
- package/dist/algorithms/dependency-integrity.d.ts.map +1 -0
- package/dist/algorithms/dependency-integrity.js +209 -0
- package/dist/algorithms/dependency-integrity.js.map +1 -0
- package/dist/algorithms/dependency-integrity.test.d.ts +2 -0
- package/dist/algorithms/dependency-integrity.test.d.ts.map +1 -0
- package/dist/algorithms/dependency-integrity.test.js +296 -0
- package/dist/algorithms/dependency-integrity.test.js.map +1 -0
- package/dist/algorithms/index.d.ts +5 -0
- package/dist/algorithms/index.d.ts.map +1 -0
- package/dist/algorithms/index.js +5 -0
- package/dist/algorithms/index.js.map +1 -0
- package/dist/algorithms/tech-analysis.d.ts +106 -0
- package/dist/algorithms/tech-analysis.d.ts.map +1 -0
- package/dist/algorithms/tech-analysis.js +351 -0
- package/dist/algorithms/tech-analysis.js.map +1 -0
- package/dist/algorithms/tech-analysis.test.d.ts +2 -0
- package/dist/algorithms/tech-analysis.test.d.ts.map +1 -0
- package/dist/algorithms/tech-analysis.test.js +330 -0
- package/dist/algorithms/tech-analysis.test.js.map +1 -0
- package/dist/algorithms/topological-sort.d.ts +58 -0
- package/dist/algorithms/topological-sort.d.ts.map +1 -0
- package/dist/algorithms/topological-sort.js +201 -0
- package/dist/algorithms/topological-sort.js.map +1 -0
- package/dist/algorithms/topological-sort.test.d.ts +2 -0
- package/dist/algorithms/topological-sort.test.d.ts.map +1 -0
- package/dist/algorithms/topological-sort.test.js +154 -0
- package/dist/algorithms/topological-sort.test.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/inbox.d.ts +55 -0
- package/dist/schemas/inbox.d.ts.map +1 -0
- package/dist/schemas/inbox.js +25 -0
- package/dist/schemas/inbox.js.map +1 -0
- package/dist/schemas/index.d.ts +7 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +17 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/llm-guide.d.ts +147 -0
- package/dist/schemas/llm-guide.d.ts.map +1 -0
- package/dist/schemas/llm-guide.js +72 -0
- package/dist/schemas/llm-guide.js.map +1 -0
- package/dist/schemas/project.d.ts +177 -0
- package/dist/schemas/project.d.ts.map +1 -0
- package/dist/schemas/project.js +56 -0
- package/dist/schemas/project.js.map +1 -0
- package/dist/schemas/response-format.d.ts +148 -0
- package/dist/schemas/response-format.d.ts.map +1 -0
- package/dist/schemas/response-format.js +18 -0
- package/dist/schemas/response-format.js.map +1 -0
- package/dist/schemas/response-schema.d.ts +307 -0
- package/dist/schemas/response-schema.d.ts.map +1 -0
- package/dist/schemas/response-schema.js +78 -0
- package/dist/schemas/response-schema.js.map +1 -0
- package/dist/schemas/response-schema.test.d.ts +2 -0
- package/dist/schemas/response-schema.test.d.ts.map +1 -0
- package/dist/schemas/response-schema.test.js +256 -0
- package/dist/schemas/response-schema.test.js.map +1 -0
- package/dist/schemas/state.d.ts +17 -0
- package/dist/schemas/state.d.ts.map +1 -0
- package/dist/schemas/state.js +17 -0
- package/dist/schemas/state.js.map +1 -0
- package/dist/schemas/task.d.ts +881 -0
- package/dist/schemas/task.d.ts.map +1 -0
- package/dist/schemas/task.js +177 -0
- package/dist/schemas/task.js.map +1 -0
- package/dist/schemas/view.d.ts +143 -0
- package/dist/schemas/view.d.ts.map +1 -0
- package/dist/schemas/view.js +48 -0
- package/dist/schemas/view.js.map +1 -0
- package/dist/utils/dashboard-renderer.d.ts +93 -0
- package/dist/utils/dashboard-renderer.d.ts.map +1 -0
- package/dist/utils/dashboard-renderer.js +416 -0
- package/dist/utils/dashboard-renderer.js.map +1 -0
- package/dist/utils/dashboard-renderer.test.d.ts +2 -0
- package/dist/utils/dashboard-renderer.test.d.ts.map +1 -0
- package/dist/utils/dashboard-renderer.test.js +772 -0
- package/dist/utils/dashboard-renderer.test.js.map +1 -0
- package/dist/utils/date.d.ts +94 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +323 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/date.test.d.ts +2 -0
- package/dist/utils/date.test.d.ts.map +1 -0
- package/dist/utils/date.test.js +276 -0
- package/dist/utils/date.test.js.map +1 -0
- package/dist/utils/hierarchy.d.ts +102 -0
- package/dist/utils/hierarchy.d.ts.map +1 -0
- package/dist/utils/hierarchy.js +236 -0
- package/dist/utils/hierarchy.js.map +1 -0
- package/dist/utils/hierarchy.test.d.ts +2 -0
- package/dist/utils/hierarchy.test.d.ts.map +1 -0
- package/dist/utils/hierarchy.test.js +423 -0
- package/dist/utils/hierarchy.test.js.map +1 -0
- package/dist/utils/id.d.ts +60 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/dist/utils/id.js +118 -0
- package/dist/utils/id.js.map +1 -0
- package/dist/utils/id.test.d.ts +2 -0
- package/dist/utils/id.test.d.ts.map +1 -0
- package/dist/utils/id.test.js +193 -0
- package/dist/utils/id.test.js.map +1 -0
- package/dist/utils/index.d.ts +12 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +34 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/natural-language.d.ts +111 -0
- package/dist/utils/natural-language.d.ts.map +1 -0
- package/dist/utils/natural-language.js +297 -0
- package/dist/utils/natural-language.js.map +1 -0
- package/dist/utils/natural-language.test.d.ts +2 -0
- package/dist/utils/natural-language.test.d.ts.map +1 -0
- package/dist/utils/natural-language.test.js +197 -0
- package/dist/utils/natural-language.test.js.map +1 -0
- package/dist/utils/priority-queue.d.ts +17 -0
- package/dist/utils/priority-queue.d.ts.map +1 -0
- package/dist/utils/priority-queue.js +62 -0
- package/dist/utils/priority-queue.js.map +1 -0
- package/dist/utils/priority-queue.test.d.ts +2 -0
- package/dist/utils/priority-queue.test.d.ts.map +1 -0
- package/dist/utils/priority-queue.test.js +82 -0
- package/dist/utils/priority-queue.test.js.map +1 -0
- package/dist/utils/projection.d.ts +65 -0
- package/dist/utils/projection.d.ts.map +1 -0
- package/dist/utils/projection.js +180 -0
- package/dist/utils/projection.js.map +1 -0
- package/dist/utils/projection.test.d.ts +2 -0
- package/dist/utils/projection.test.d.ts.map +1 -0
- package/dist/utils/projection.test.js +341 -0
- package/dist/utils/projection.test.js.map +1 -0
- package/dist/utils/terminal-ui.d.ts +208 -0
- package/dist/utils/terminal-ui.d.ts.map +1 -0
- package/dist/utils/terminal-ui.js +614 -0
- package/dist/utils/terminal-ui.js.map +1 -0
- package/dist/utils/terminal-ui.test.d.ts +2 -0
- package/dist/utils/terminal-ui.test.d.ts.map +1 -0
- package/dist/utils/terminal-ui.test.js +683 -0
- package/dist/utils/terminal-ui.test.js.map +1 -0
- package/dist/utils/workspace.d.ts +102 -0
- package/dist/utils/workspace.d.ts.map +1 -0
- package/dist/utils/workspace.js +183 -0
- package/dist/utils/workspace.js.map +1 -0
- package/dist/utils/workspace.test.d.ts +2 -0
- package/dist/utils/workspace.test.d.ts.map +1 -0
- package/dist/utils/workspace.test.js +97 -0
- package/dist/utils/workspace.test.js.map +1 -0
- package/package.json +5 -1
- package/src/algorithms/critical-path.test.ts +227 -0
- package/src/algorithms/critical-path.ts +14 -34
- package/src/algorithms/dependency-integrity.test.ts +335 -0
- package/src/algorithms/dependency-integrity.ts +4 -13
- package/src/algorithms/tech-analysis.test.ts +405 -0
- package/src/algorithms/tech-analysis.ts +27 -27
- package/src/algorithms/topological-sort.test.ts +182 -0
- package/src/algorithms/topological-sort.ts +6 -10
- package/src/schemas/index.ts +2 -13
- package/src/schemas/response-format.ts +6 -6
- package/src/schemas/response-schema.test.ts +314 -0
- package/src/schemas/response-schema.ts +25 -20
- package/src/schemas/task.ts +4 -22
- package/src/utils/dashboard-renderer.test.ts +976 -0
- package/src/utils/dashboard-renderer.ts +27 -59
- package/src/utils/date.test.ts +329 -0
- package/src/utils/date.ts +2 -10
- package/src/utils/hierarchy.test.ts +488 -0
- package/src/utils/hierarchy.ts +4 -5
- package/src/utils/id.test.ts +235 -0
- package/src/utils/index.ts +7 -1
- package/src/utils/natural-language.test.ts +234 -0
- package/src/utils/priority-queue.test.ts +103 -0
- package/src/utils/projection.test.ts +430 -0
- package/src/utils/terminal-ui.test.ts +831 -0
- package/src/utils/terminal-ui.ts +53 -54
- package/src/utils/workspace.test.ts +125 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { describe, test, expect } from "bun:test";
|
|
2
|
+
import { priorityToNumber, topologicalSort, wouldCreateCycle, findDependents, findDependencies, } from "./topological-sort.js";
|
|
3
|
+
// Helper to create mock tasks
|
|
4
|
+
function createTask(id, priority = "medium", deps = []) {
|
|
5
|
+
return {
|
|
6
|
+
id,
|
|
7
|
+
title: `Task ${id}`,
|
|
8
|
+
status: "pending",
|
|
9
|
+
priority: priority,
|
|
10
|
+
workspace: "test-workspace",
|
|
11
|
+
createdAt: new Date().toISOString(),
|
|
12
|
+
updatedAt: new Date().toISOString(),
|
|
13
|
+
dependencies: deps.map((depId) => ({ taskId: depId, type: "blocked_by" })),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
describe("priorityToNumber", () => {
|
|
17
|
+
test("converts critical to 4", () => {
|
|
18
|
+
expect(priorityToNumber("critical")).toBe(4);
|
|
19
|
+
});
|
|
20
|
+
test("converts high to 3", () => {
|
|
21
|
+
expect(priorityToNumber("high")).toBe(3);
|
|
22
|
+
});
|
|
23
|
+
test("converts medium to 2", () => {
|
|
24
|
+
expect(priorityToNumber("medium")).toBe(2);
|
|
25
|
+
});
|
|
26
|
+
test("converts low to 1", () => {
|
|
27
|
+
expect(priorityToNumber("low")).toBe(1);
|
|
28
|
+
});
|
|
29
|
+
test("defaults to 2 for unknown priority", () => {
|
|
30
|
+
expect(priorityToNumber("unknown")).toBe(2);
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
describe("topologicalSort", () => {
|
|
34
|
+
test("returns empty array for empty input", () => {
|
|
35
|
+
const result = topologicalSort([]);
|
|
36
|
+
expect(result).toEqual([]);
|
|
37
|
+
});
|
|
38
|
+
test("returns single task unchanged", () => {
|
|
39
|
+
const tasks = [createTask("A")];
|
|
40
|
+
const result = topologicalSort(tasks);
|
|
41
|
+
expect(result.length).toBe(1);
|
|
42
|
+
expect(result[0].id).toBe("A");
|
|
43
|
+
});
|
|
44
|
+
test("sorts by dependency order", () => {
|
|
45
|
+
// B depends on A, so A should come first
|
|
46
|
+
const tasks = [createTask("B", "high", ["A"]), createTask("A", "low")];
|
|
47
|
+
const result = topologicalSort(tasks);
|
|
48
|
+
expect(result[0].id).toBe("A");
|
|
49
|
+
expect(result[1].id).toBe("B");
|
|
50
|
+
});
|
|
51
|
+
test("respects priority when no dependencies", () => {
|
|
52
|
+
const tasks = [createTask("A", "low"), createTask("B", "critical"), createTask("C", "high")];
|
|
53
|
+
const result = topologicalSort(tasks);
|
|
54
|
+
expect(result[0].id).toBe("B"); // critical first
|
|
55
|
+
expect(result[1].id).toBe("C"); // then high
|
|
56
|
+
expect(result[2].id).toBe("A"); // then low
|
|
57
|
+
});
|
|
58
|
+
test("handles chain of dependencies", () => {
|
|
59
|
+
// C -> B -> A (C depends on B, B depends on A)
|
|
60
|
+
const tasks = [
|
|
61
|
+
createTask("C", "critical", ["B"]),
|
|
62
|
+
createTask("B", "high", ["A"]),
|
|
63
|
+
createTask("A", "low"),
|
|
64
|
+
];
|
|
65
|
+
const result = topologicalSort(tasks);
|
|
66
|
+
expect(result.map((t) => t.id)).toEqual(["A", "B", "C"]);
|
|
67
|
+
});
|
|
68
|
+
test("throws on circular dependency", () => {
|
|
69
|
+
// A -> B -> A
|
|
70
|
+
const tasks = [createTask("A", "medium", ["B"]), createTask("B", "medium", ["A"])];
|
|
71
|
+
expect(() => topologicalSort(tasks)).toThrow(/Circular dependency/);
|
|
72
|
+
});
|
|
73
|
+
test("handles diamond dependency", () => {
|
|
74
|
+
// D depends on B and C, both depend on A
|
|
75
|
+
const tasks = [
|
|
76
|
+
createTask("D", "medium", ["B", "C"]),
|
|
77
|
+
createTask("B", "high", ["A"]),
|
|
78
|
+
createTask("C", "low", ["A"]),
|
|
79
|
+
createTask("A", "medium"),
|
|
80
|
+
];
|
|
81
|
+
const result = topologicalSort(tasks);
|
|
82
|
+
// A must come first, D must come last
|
|
83
|
+
expect(result[0].id).toBe("A");
|
|
84
|
+
expect(result[3].id).toBe("D");
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
describe("wouldCreateCycle", () => {
|
|
88
|
+
test("returns false for valid dependency", () => {
|
|
89
|
+
const tasks = [createTask("A"), createTask("B")];
|
|
90
|
+
// Adding B blocked_by A should not create cycle
|
|
91
|
+
expect(wouldCreateCycle(tasks, "B", "A")).toBe(false);
|
|
92
|
+
});
|
|
93
|
+
test("returns true for direct cycle", () => {
|
|
94
|
+
const tasks = [createTask("A", "medium", ["B"]), createTask("B")];
|
|
95
|
+
// B is already blocking A, so A blocking B would create cycle
|
|
96
|
+
expect(wouldCreateCycle(tasks, "B", "A")).toBe(true);
|
|
97
|
+
});
|
|
98
|
+
test("returns true for indirect cycle", () => {
|
|
99
|
+
const tasks = [
|
|
100
|
+
createTask("A", "medium", ["B"]),
|
|
101
|
+
createTask("B", "medium", ["C"]),
|
|
102
|
+
createTask("C"),
|
|
103
|
+
];
|
|
104
|
+
// A <- B <- C, adding C <- A would create cycle
|
|
105
|
+
expect(wouldCreateCycle(tasks, "C", "A")).toBe(true);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
describe("findDependents", () => {
|
|
109
|
+
test("returns empty for task with no dependents", () => {
|
|
110
|
+
const tasks = [createTask("A"), createTask("B")];
|
|
111
|
+
const result = findDependents(tasks, "A");
|
|
112
|
+
expect(result).toEqual([]);
|
|
113
|
+
});
|
|
114
|
+
test("finds direct dependents", () => {
|
|
115
|
+
const tasks = [
|
|
116
|
+
createTask("A"),
|
|
117
|
+
createTask("B", "medium", ["A"]),
|
|
118
|
+
createTask("C", "medium", ["A"]),
|
|
119
|
+
];
|
|
120
|
+
const result = findDependents(tasks, "A");
|
|
121
|
+
expect(result.map((t) => t.id).sort()).toEqual(["B", "C"]);
|
|
122
|
+
});
|
|
123
|
+
test("finds transitive dependents", () => {
|
|
124
|
+
const tasks = [
|
|
125
|
+
createTask("A"),
|
|
126
|
+
createTask("B", "medium", ["A"]),
|
|
127
|
+
createTask("C", "medium", ["B"]),
|
|
128
|
+
];
|
|
129
|
+
const result = findDependents(tasks, "A");
|
|
130
|
+
expect(result.map((t) => t.id).sort()).toEqual(["B", "C"]);
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
describe("findDependencies", () => {
|
|
134
|
+
test("returns empty for task with no dependencies", () => {
|
|
135
|
+
const tasks = [createTask("A"), createTask("B")];
|
|
136
|
+
const result = findDependencies(tasks, "A");
|
|
137
|
+
expect(result).toEqual([]);
|
|
138
|
+
});
|
|
139
|
+
test("finds direct dependencies", () => {
|
|
140
|
+
const tasks = [createTask("A"), createTask("B"), createTask("C", "medium", ["A", "B"])];
|
|
141
|
+
const result = findDependencies(tasks, "C");
|
|
142
|
+
expect(result.map((t) => t.id).sort()).toEqual(["A", "B"]);
|
|
143
|
+
});
|
|
144
|
+
test("finds transitive dependencies", () => {
|
|
145
|
+
const tasks = [
|
|
146
|
+
createTask("A"),
|
|
147
|
+
createTask("B", "medium", ["A"]),
|
|
148
|
+
createTask("C", "medium", ["B"]),
|
|
149
|
+
];
|
|
150
|
+
const result = findDependencies(tasks, "C");
|
|
151
|
+
expect(result.map((t) => t.id).sort()).toEqual(["A", "B"]);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=topological-sort.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"topological-sort.test.js","sourceRoot":"","sources":["../../src/algorithms/topological-sort.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,8BAA8B;AAC9B,SAAS,UAAU,CAAC,EAAU,EAAE,WAAmB,QAAQ,EAAE,OAAiB,EAAE;IAC9E,OAAO;QACL,EAAE;QACF,KAAK,EAAE,QAAQ,EAAE,EAAE;QACnB,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,QAA4B;QACtC,SAAS,EAAE,gBAAgB;QAC3B,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,YAAqB,EAAE,CAAC,CAAC;KACpF,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAClC,MAAM,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,oBAAoB,EAAE,GAAG,EAAE;QAC9B,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,C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CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AAGnC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,cAAc,oBAAoB,CAAC;AAEnC,aAAa;AACb,cAAc,uBAAuB,CAAC;AAEtC,YAAY;AACZ,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const InboxStatus: z.ZodEnum<["pending", "promoted", "discarded"]>;
|
|
3
|
+
export type InboxStatus = z.infer<typeof InboxStatus>;
|
|
4
|
+
export declare const InboxItem: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
content: z.ZodString;
|
|
7
|
+
capturedAt: z.ZodString;
|
|
8
|
+
source: z.ZodOptional<z.ZodString>;
|
|
9
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10
|
+
promotedToTaskId: z.ZodOptional<z.ZodString>;
|
|
11
|
+
status: z.ZodEnum<["pending", "promoted", "discarded"]>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
status: "pending" | "promoted" | "discarded";
|
|
14
|
+
id: string;
|
|
15
|
+
content: string;
|
|
16
|
+
capturedAt: string;
|
|
17
|
+
tags?: string[] | undefined;
|
|
18
|
+
source?: string | undefined;
|
|
19
|
+
promotedToTaskId?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
status: "pending" | "promoted" | "discarded";
|
|
22
|
+
id: string;
|
|
23
|
+
content: string;
|
|
24
|
+
capturedAt: string;
|
|
25
|
+
tags?: string[] | undefined;
|
|
26
|
+
source?: string | undefined;
|
|
27
|
+
promotedToTaskId?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export type InboxItem = z.infer<typeof InboxItem>;
|
|
30
|
+
export declare const InboxCreateInput: z.ZodObject<{
|
|
31
|
+
content: z.ZodString;
|
|
32
|
+
source: z.ZodOptional<z.ZodString>;
|
|
33
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
content: string;
|
|
36
|
+
tags?: string[] | undefined;
|
|
37
|
+
source?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
content: string;
|
|
40
|
+
tags?: string[] | undefined;
|
|
41
|
+
source?: string | undefined;
|
|
42
|
+
}>;
|
|
43
|
+
export type InboxCreateInput = z.infer<typeof InboxCreateInput>;
|
|
44
|
+
export declare const InboxUpdateInput: z.ZodObject<{
|
|
45
|
+
content: z.ZodOptional<z.ZodString>;
|
|
46
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
tags?: string[] | undefined;
|
|
49
|
+
content?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
tags?: string[] | undefined;
|
|
52
|
+
content?: string | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export type InboxUpdateInput = z.infer<typeof InboxUpdateInput>;
|
|
55
|
+
//# sourceMappingURL=inbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.d.ts","sourceRoot":"","sources":["../../src/schemas/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,WAAW,iDAA+C,CAAC;AACxE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAGtD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;EAQpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAGlD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAGhE,eAAO,MAAM,gBAAgB;;;;;;;;;EAG3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
// Inbox item status
|
|
3
|
+
export const InboxStatus = z.enum(["pending", "promoted", "discarded"]);
|
|
4
|
+
// Inbox item schema - lightweight idea/memo capture
|
|
5
|
+
export const InboxItem = z.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
content: z.string(), // The memo/idea content
|
|
8
|
+
capturedAt: z.string(), // ISO timestamp
|
|
9
|
+
source: z.string().optional(), // Origin: 'cli', 'mcp', 'api', etc.
|
|
10
|
+
tags: z.array(z.string()).optional(), // Simple tags for organization
|
|
11
|
+
promotedToTaskId: z.string().optional(), // Task ID if promoted
|
|
12
|
+
status: InboxStatus,
|
|
13
|
+
});
|
|
14
|
+
// Inbox item creation input (minimal)
|
|
15
|
+
export const InboxCreateInput = z.object({
|
|
16
|
+
content: z.string(),
|
|
17
|
+
source: z.string().optional(),
|
|
18
|
+
tags: z.array(z.string()).optional(),
|
|
19
|
+
});
|
|
20
|
+
// Inbox item update input
|
|
21
|
+
export const InboxUpdateInput = z.object({
|
|
22
|
+
content: z.string().optional(),
|
|
23
|
+
tags: z.array(z.string()).optional(),
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=inbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbox.js","sourceRoot":"","sources":["../../src/schemas/inbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAoB;AACpB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAGxE,oDAAoD;AACpD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,wBAAwB;IAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,gBAAgB;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,oCAAoC;IACnE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,+BAA+B;IACrE,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,sBAAsB;IAC/D,MAAM,EAAE,WAAW;CACpB,CAAC,CAAC;AAGH,sCAAsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAGH,0BAA0B;AAC1B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { Priority, TaskStatus, DependencyType, Dependency, TimeEstimate, Recurrence, ComplexityFactor, ComplexityAnalysis, TechArea, RiskLevel, TechStackAnalysis, Task, TaskCreateInput, TaskUpdateInput, } from "./task.js";
|
|
2
|
+
export { SmartViewFilter, SortField, SortOrder, SmartView, BuiltInView } from "./view.js";
|
|
3
|
+
export { InboxStatus, InboxItem, InboxCreateInput, InboxUpdateInput } from "./inbox.js";
|
|
4
|
+
export { ResponseFormat, DEFAULT_LIMIT, MAX_LIMIT, type PaginatedResponse, type TaskSummary, type TaskPreview, type WorkspaceSummary, type WorkspacePreview, type InboxSummary, type InboxPreview, type CriticalPathSummary, type BottleneckSummary, type DashboardProgress, type DashboardPriorityBreakdown, type DashboardDependencyMetrics, type DashboardNextTask, type DashboardCriticalPath, type DashboardStatusBreakdown, type DashboardSubtaskProgress, type DashboardDependencyStats, type DashboardConcise, type DashboardStandard, } from "./response-format.js";
|
|
5
|
+
export { ResponseType, ResponsePriority, ResponseOption, QuestionResponse, SuggestionResponse, ConfirmationResponse, AgentResponse, GenerateResponseInput, } from "./response-schema.js";
|
|
6
|
+
export { State, DEFAULT_STATE } from "./state.js";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,UAAU,EAEV,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,iBAAiB,EAEjB,IAAI,EACJ,eAAe,EACf,eAAe,GAChB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG1F,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGxF,OAAO,EACL,cAAc,EACd,aAAa,EACb,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Task schemas
|
|
2
|
+
export { Priority, TaskStatus, DependencyType, Dependency, TimeEstimate, Recurrence,
|
|
3
|
+
// Analysis schemas
|
|
4
|
+
ComplexityFactor, ComplexityAnalysis, TechArea, RiskLevel, TechStackAnalysis,
|
|
5
|
+
// Core schemas
|
|
6
|
+
Task, TaskCreateInput, TaskUpdateInput, } from "./task.js";
|
|
7
|
+
// View schemas
|
|
8
|
+
export { SmartViewFilter, SortField, SortOrder, SmartView, BuiltInView } from "./view.js";
|
|
9
|
+
// Inbox schemas
|
|
10
|
+
export { InboxStatus, InboxItem, InboxCreateInput, InboxUpdateInput } from "./inbox.js";
|
|
11
|
+
// Response format schemas (token optimization)
|
|
12
|
+
export { ResponseFormat, DEFAULT_LIMIT, MAX_LIMIT, } from "./response-format.js";
|
|
13
|
+
// Response schema (agent interaction)
|
|
14
|
+
export { ResponseType, ResponsePriority, ResponseOption, QuestionResponse, SuggestionResponse, ConfirmationResponse, AgentResponse, GenerateResponseInput, } from "./response-schema.js";
|
|
15
|
+
// State schema (git branch, active tag)
|
|
16
|
+
export { State, DEFAULT_STATE } from "./state.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EACL,QAAQ,EACR,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,UAAU;AACV,mBAAmB;AACnB,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,iBAAiB;AACjB,eAAe;AACf,IAAI,EACJ,eAAe,EACf,eAAe,GAChB,MAAM,WAAW,CAAC;AAEnB,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE1F,gBAAgB;AAChB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAExF,+CAA+C;AAC/C,OAAO,EACL,cAAc,EACd,aAAa,EACb,SAAS,GAqBV,MAAM,sBAAsB,CAAC;AAE9B,sCAAsC;AACtC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,wCAAwC;AACxC,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Guide Schema
|
|
3
|
+
*
|
|
4
|
+
* Provides structured guidance in tool responses to help LLMs
|
|
5
|
+
* understand next actions and usage patterns.
|
|
6
|
+
*
|
|
7
|
+
* Industry standard pattern: Every tool response is an opportunity
|
|
8
|
+
* to guide the model toward better behavior.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
/**
|
|
12
|
+
* Suggested next action for the LLM
|
|
13
|
+
*/
|
|
14
|
+
export declare const NextAction: z.ZodObject<{
|
|
15
|
+
/** Tool name to use next */
|
|
16
|
+
tool: z.ZodString;
|
|
17
|
+
/** Condition when this action is appropriate */
|
|
18
|
+
when: z.ZodString;
|
|
19
|
+
/** Example arguments (optional) */
|
|
20
|
+
exampleArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
tool: string;
|
|
23
|
+
when: string;
|
|
24
|
+
exampleArgs?: Record<string, unknown> | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
tool: string;
|
|
27
|
+
when: string;
|
|
28
|
+
exampleArgs?: Record<string, unknown> | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export type NextAction = z.infer<typeof NextAction>;
|
|
31
|
+
/**
|
|
32
|
+
* Suggestion types for different scenarios
|
|
33
|
+
*/
|
|
34
|
+
export declare const SuggestionType: z.ZodEnum<["pattern", "optimization", "warning"]>;
|
|
35
|
+
export type SuggestionType = z.infer<typeof SuggestionType>;
|
|
36
|
+
/**
|
|
37
|
+
* A suggestion for the LLM
|
|
38
|
+
*/
|
|
39
|
+
export declare const Suggestion: z.ZodObject<{
|
|
40
|
+
/** Type of suggestion */
|
|
41
|
+
type: z.ZodEnum<["pattern", "optimization", "warning"]>;
|
|
42
|
+
/** Human-readable message */
|
|
43
|
+
message: z.ZodString;
|
|
44
|
+
/** Related tool (optional) */
|
|
45
|
+
relatedTool: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
message: string;
|
|
48
|
+
type: "pattern" | "optimization" | "warning";
|
|
49
|
+
relatedTool?: string | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
message: string;
|
|
52
|
+
type: "pattern" | "optimization" | "warning";
|
|
53
|
+
relatedTool?: string | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export type Suggestion = z.infer<typeof Suggestion>;
|
|
56
|
+
/**
|
|
57
|
+
* LLM Guide block - included in tool responses
|
|
58
|
+
*
|
|
59
|
+
* Token efficiency strategy:
|
|
60
|
+
* - concise format: warnings only
|
|
61
|
+
* - standard format: nextActions only
|
|
62
|
+
* - detailed format: full guide
|
|
63
|
+
*/
|
|
64
|
+
export declare const LLMGuide: z.ZodObject<{
|
|
65
|
+
/** Suggested next actions */
|
|
66
|
+
nextActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
+
/** Tool name to use next */
|
|
68
|
+
tool: z.ZodString;
|
|
69
|
+
/** Condition when this action is appropriate */
|
|
70
|
+
when: z.ZodString;
|
|
71
|
+
/** Example arguments (optional) */
|
|
72
|
+
exampleArgs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
tool: string;
|
|
75
|
+
when: string;
|
|
76
|
+
exampleArgs?: Record<string, unknown> | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
tool: string;
|
|
79
|
+
when: string;
|
|
80
|
+
exampleArgs?: Record<string, unknown> | undefined;
|
|
81
|
+
}>, "many">>;
|
|
82
|
+
/** Suggestions for improvement */
|
|
83
|
+
suggestions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
+
/** Type of suggestion */
|
|
85
|
+
type: z.ZodEnum<["pattern", "optimization", "warning"]>;
|
|
86
|
+
/** Human-readable message */
|
|
87
|
+
message: z.ZodString;
|
|
88
|
+
/** Related tool (optional) */
|
|
89
|
+
relatedTool: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
message: string;
|
|
92
|
+
type: "pattern" | "optimization" | "warning";
|
|
93
|
+
relatedTool?: string | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
message: string;
|
|
96
|
+
type: "pattern" | "optimization" | "warning";
|
|
97
|
+
relatedTool?: string | undefined;
|
|
98
|
+
}>, "many">>;
|
|
99
|
+
/** Detected usage pattern (e.g., "flat_structure", "complex_task") */
|
|
100
|
+
patternDetected: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
nextActions?: {
|
|
103
|
+
tool: string;
|
|
104
|
+
when: string;
|
|
105
|
+
exampleArgs?: Record<string, unknown> | undefined;
|
|
106
|
+
}[] | undefined;
|
|
107
|
+
suggestions?: {
|
|
108
|
+
message: string;
|
|
109
|
+
type: "pattern" | "optimization" | "warning";
|
|
110
|
+
relatedTool?: string | undefined;
|
|
111
|
+
}[] | undefined;
|
|
112
|
+
patternDetected?: string | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
nextActions?: {
|
|
115
|
+
tool: string;
|
|
116
|
+
when: string;
|
|
117
|
+
exampleArgs?: Record<string, unknown> | undefined;
|
|
118
|
+
}[] | undefined;
|
|
119
|
+
suggestions?: {
|
|
120
|
+
message: string;
|
|
121
|
+
type: "pattern" | "optimization" | "warning";
|
|
122
|
+
relatedTool?: string | undefined;
|
|
123
|
+
}[] | undefined;
|
|
124
|
+
patternDetected?: string | undefined;
|
|
125
|
+
}>;
|
|
126
|
+
export type LLMGuide = z.infer<typeof LLMGuide>;
|
|
127
|
+
/**
|
|
128
|
+
* Common pattern names for consistency
|
|
129
|
+
*/
|
|
130
|
+
export declare const GuidePatterns: {
|
|
131
|
+
/** All tasks created without hierarchy */
|
|
132
|
+
readonly FLAT_STRUCTURE: "flat_structure";
|
|
133
|
+
/** No dependencies defined */
|
|
134
|
+
readonly NO_DEPENDENCIES: "no_dependencies";
|
|
135
|
+
/** Task title is complex (long, contains "and") */
|
|
136
|
+
readonly COMPLEX_TASK: "complex_task";
|
|
137
|
+
/** Task title is too vague */
|
|
138
|
+
readonly VAGUE_TASK: "vague_task";
|
|
139
|
+
/** Too many tasks for today */
|
|
140
|
+
readonly OVERLOADED: "overloaded";
|
|
141
|
+
/** Task completed successfully */
|
|
142
|
+
readonly TASK_COMPLETED: "task_completed";
|
|
143
|
+
/** Task promoted from inbox */
|
|
144
|
+
readonly PROMOTED_FROM_INBOX: "promoted_from_inbox";
|
|
145
|
+
};
|
|
146
|
+
export type GuidePattern = (typeof GuidePatterns)[keyof typeof GuidePatterns];
|
|
147
|
+
//# sourceMappingURL=llm-guide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-guide.d.ts","sourceRoot":"","sources":["../../src/schemas/llm-guide.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB,4BAA4B;;IAE5B,gDAAgD;;IAEhD,mCAAmC;;;;;;;;;;EAEnC,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,cAAc,mDAAiD,CAAC;AAC7E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,UAAU;IACrB,yBAAyB;;IAEzB,6BAA6B;;IAE7B,8BAA8B;;;;;;;;;;EAE9B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ;IACnB,6BAA6B;;QArC7B,4BAA4B;;QAE5B,gDAAgD;;QAEhD,mCAAmC;;;;;;;;;;;IAmCnC,kCAAkC;;QApBlC,yBAAyB;;QAEzB,6BAA6B;;QAE7B,8BAA8B;;;;;;;;;;;IAkB9B,sEAAsE;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtE,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,aAAa;IACxB,0CAA0C;;IAE1C,8BAA8B;;IAE9B,mDAAmD;;IAEnD,8BAA8B;;IAE9B,+BAA+B;;IAE/B,kCAAkC;;IAElC,+BAA+B;;CAEvB,CAAC;AACX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLM Guide Schema
|
|
3
|
+
*
|
|
4
|
+
* Provides structured guidance in tool responses to help LLMs
|
|
5
|
+
* understand next actions and usage patterns.
|
|
6
|
+
*
|
|
7
|
+
* Industry standard pattern: Every tool response is an opportunity
|
|
8
|
+
* to guide the model toward better behavior.
|
|
9
|
+
*/
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
/**
|
|
12
|
+
* Suggested next action for the LLM
|
|
13
|
+
*/
|
|
14
|
+
export const NextAction = z.object({
|
|
15
|
+
/** Tool name to use next */
|
|
16
|
+
tool: z.string(),
|
|
17
|
+
/** Condition when this action is appropriate */
|
|
18
|
+
when: z.string(),
|
|
19
|
+
/** Example arguments (optional) */
|
|
20
|
+
exampleArgs: z.record(z.unknown()).optional(),
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Suggestion types for different scenarios
|
|
24
|
+
*/
|
|
25
|
+
export const SuggestionType = z.enum(["pattern", "optimization", "warning"]);
|
|
26
|
+
/**
|
|
27
|
+
* A suggestion for the LLM
|
|
28
|
+
*/
|
|
29
|
+
export const Suggestion = z.object({
|
|
30
|
+
/** Type of suggestion */
|
|
31
|
+
type: SuggestionType,
|
|
32
|
+
/** Human-readable message */
|
|
33
|
+
message: z.string(),
|
|
34
|
+
/** Related tool (optional) */
|
|
35
|
+
relatedTool: z.string().optional(),
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* LLM Guide block - included in tool responses
|
|
39
|
+
*
|
|
40
|
+
* Token efficiency strategy:
|
|
41
|
+
* - concise format: warnings only
|
|
42
|
+
* - standard format: nextActions only
|
|
43
|
+
* - detailed format: full guide
|
|
44
|
+
*/
|
|
45
|
+
export const LLMGuide = z.object({
|
|
46
|
+
/** Suggested next actions */
|
|
47
|
+
nextActions: z.array(NextAction).optional(),
|
|
48
|
+
/** Suggestions for improvement */
|
|
49
|
+
suggestions: z.array(Suggestion).optional(),
|
|
50
|
+
/** Detected usage pattern (e.g., "flat_structure", "complex_task") */
|
|
51
|
+
patternDetected: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
/**
|
|
54
|
+
* Common pattern names for consistency
|
|
55
|
+
*/
|
|
56
|
+
export const GuidePatterns = {
|
|
57
|
+
/** All tasks created without hierarchy */
|
|
58
|
+
FLAT_STRUCTURE: "flat_structure",
|
|
59
|
+
/** No dependencies defined */
|
|
60
|
+
NO_DEPENDENCIES: "no_dependencies",
|
|
61
|
+
/** Task title is complex (long, contains "and") */
|
|
62
|
+
COMPLEX_TASK: "complex_task",
|
|
63
|
+
/** Task title is too vague */
|
|
64
|
+
VAGUE_TASK: "vague_task",
|
|
65
|
+
/** Too many tasks for today */
|
|
66
|
+
OVERLOADED: "overloaded",
|
|
67
|
+
/** Task completed successfully */
|
|
68
|
+
TASK_COMPLETED: "task_completed",
|
|
69
|
+
/** Task promoted from inbox */
|
|
70
|
+
PROMOTED_FROM_INBOX: "promoted_from_inbox",
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=llm-guide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llm-guide.js","sourceRoot":"","sources":["../../src/schemas/llm-guide.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,4BAA4B;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,gDAAgD;IAChD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,mCAAmC;IACnC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC9C,CAAC,CAAC;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC;AAG7E;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,yBAAyB;IACzB,IAAI,EAAE,cAAc;IACpB,6BAA6B;IAC7B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,8BAA8B;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,6BAA6B;IAC7B,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IAC3C,kCAAkC;IAClC,WAAW,EAAE,CAAC,CAA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