hanseol-dev 4.4.0-dev.0 → 4.4.0-dev.3
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/agents/index.d.ts +1 -2
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +0 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/planner/index.d.ts +0 -4
- package/dist/agents/planner/index.d.ts.map +1 -1
- package/dist/agents/planner/index.js +18 -12
- package/dist/agents/planner/index.js.map +1 -1
- package/dist/cli.js +7 -0
- package/dist/cli.js.map +1 -1
- package/dist/constants.d.ts +3 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/core/auth/auth-gate.d.ts.map +1 -1
- package/dist/core/auth/auth-gate.js +2 -0
- package/dist/core/auth/auth-gate.js.map +1 -1
- package/dist/core/background-sync.d.ts +35 -0
- package/dist/core/background-sync.d.ts.map +1 -0
- package/dist/core/background-sync.js +221 -0
- package/dist/core/background-sync.js.map +1 -0
- package/dist/core/compact/compact-manager.d.ts.map +1 -1
- package/dist/core/compact/compact-manager.js +2 -0
- package/dist/core/compact/compact-manager.js.map +1 -1
- package/dist/core/llm/llm-client.d.ts +1 -0
- package/dist/core/llm/llm-client.d.ts.map +1 -1
- package/dist/core/llm/llm-client.js +210 -21
- package/dist/core/llm/llm-client.js.map +1 -1
- package/dist/core/session/session-manager.d.ts +0 -1
- package/dist/core/session/session-manager.d.ts.map +1 -1
- package/dist/core/session/session-manager.js +2 -0
- package/dist/core/session/session-manager.js.map +1 -1
- package/dist/core/telemetry/error-reporter.d.ts.map +1 -1
- package/dist/core/telemetry/error-reporter.js +31 -9
- package/dist/core/telemetry/error-reporter.js.map +1 -1
- package/dist/orchestration/plan-executor.d.ts +0 -1
- package/dist/orchestration/plan-executor.d.ts.map +1 -1
- package/dist/orchestration/plan-executor.js +82 -54
- package/dist/orchestration/plan-executor.js.map +1 -1
- package/dist/prompts/agents/planning.d.ts.map +1 -1
- package/dist/prompts/agents/planning.js +25 -0
- package/dist/prompts/agents/planning.js.map +1 -1
- package/dist/prompts/index.d.ts +0 -2
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +0 -2
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/shared/tool-usage.d.ts +2 -0
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -1
- package/dist/prompts/shared/tool-usage.js +35 -1
- package/dist/prompts/shared/tool-usage.js.map +1 -1
- package/dist/prompts/system/plan-execute.d.ts +1 -0
- package/dist/prompts/system/plan-execute.d.ts.map +1 -1
- package/dist/prompts/system/plan-execute.js +24 -19
- package/dist/prompts/system/plan-execute.js.map +1 -1
- package/dist/tools/llm/index.d.ts +0 -1
- package/dist/tools/llm/index.d.ts.map +1 -1
- package/dist/tools/llm/index.js +0 -1
- package/dist/tools/llm/index.js.map +1 -1
- package/dist/tools/llm/simple/external-services/external-service-api-clients.d.ts +54 -0
- package/dist/tools/llm/simple/external-services/external-service-api-clients.d.ts.map +1 -0
- package/dist/tools/llm/simple/external-services/external-service-api-clients.js +205 -0
- package/dist/tools/llm/simple/external-services/external-service-api-clients.js.map +1 -0
- package/dist/tools/llm/simple/external-services/free-tools.d.ts +2 -0
- package/dist/tools/llm/simple/external-services/free-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/external-services/free-tools.js +2 -0
- package/dist/tools/llm/simple/external-services/free-tools.js.map +1 -0
- package/dist/tools/llm/simple/external-services/index.d.ts +3 -0
- package/dist/tools/llm/simple/external-services/index.d.ts.map +1 -0
- package/dist/tools/llm/simple/external-services/index.js +3 -0
- package/dist/tools/llm/simple/external-services/index.js.map +1 -0
- package/dist/tools/llm/simple/external-services/once-tools.d.ts +3 -0
- package/dist/tools/llm/simple/external-services/once-tools.d.ts.map +1 -0
- package/dist/tools/llm/simple/external-services/once-tools.js +106 -0
- package/dist/tools/llm/simple/external-services/once-tools.js.map +1 -0
- package/dist/tools/llm/simple/file-tools.d.ts +1 -1
- package/dist/tools/llm/simple/file-tools.d.ts.map +1 -1
- package/dist/tools/llm/simple/file-tools.js +49 -6
- package/dist/tools/llm/simple/file-tools.js.map +1 -1
- package/dist/tools/llm/simple/index.d.ts +1 -0
- package/dist/tools/llm/simple/index.d.ts.map +1 -1
- package/dist/tools/llm/simple/index.js +1 -0
- package/dist/tools/llm/simple/index.js.map +1 -1
- package/dist/tools/llm/simple/powershell-tool.d.ts.map +1 -1
- package/dist/tools/llm/simple/powershell-tool.js +15 -2
- package/dist/tools/llm/simple/powershell-tool.js.map +1 -1
- package/dist/tools/llm/simple/simple-tool-executor.d.ts +3 -0
- package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +1 -1
- package/dist/tools/llm/simple/simple-tool-executor.js +9 -0
- package/dist/tools/llm/simple/simple-tool-executor.js.map +1 -1
- package/dist/tools/office/excel-tools/cells.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/cells.js +5 -1
- package/dist/tools/office/excel-tools/cells.js.map +1 -1
- package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/sheets.js +6 -1
- package/dist/tools/office/excel-tools/sheets.js.map +1 -1
- package/dist/tools/office/excel-tools/tables.d.ts.map +1 -1
- package/dist/tools/office/excel-tools/tables.js +6 -1
- package/dist/tools/office/excel-tools/tables.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +3 -2
- package/dist/tools/registry.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.d.ts +1 -1
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +0 -1
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/components/PlanExecuteApp.d.ts +1 -1
- package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -1
- package/dist/ui/components/PlanExecuteApp.js +20 -64
- package/dist/ui/components/PlanExecuteApp.js.map +1 -1
- package/package.json +3 -1
- package/dist/agents/docs-search/index.d.ts +0 -33
- package/dist/agents/docs-search/index.d.ts.map +0 -1
- package/dist/agents/docs-search/index.js +0 -244
- package/dist/agents/docs-search/index.js.map +0 -1
- package/dist/prompts/agents/docs-search-decision.d.ts +0 -6
- package/dist/prompts/agents/docs-search-decision.d.ts.map +0 -1
- package/dist/prompts/agents/docs-search-decision.js +0 -46
- package/dist/prompts/agents/docs-search-decision.js.map +0 -1
- package/dist/prompts/agents/docs-search.d.ts +0 -4
- package/dist/prompts/agents/docs-search.d.ts.map +0 -1
- package/dist/prompts/agents/docs-search.js +0 -70
- package/dist/prompts/agents/docs-search.js.map +0 -1
- package/dist/tools/llm/agents/docs-search-tools.d.ts +0 -17
- package/dist/tools/llm/agents/docs-search-tools.d.ts.map +0 -1
- package/dist/tools/llm/agents/docs-search-tools.js +0 -265
- package/dist/tools/llm/agents/docs-search-tools.js.map +0 -1
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts +0 -6
- package/dist/tools/llm/simple/docs-search-agent-tool.d.ts.map +0 -1
- package/dist/tools/llm/simple/docs-search-agent-tool.js +0 -104
- package/dist/tools/llm/simple/docs-search-agent-tool.js.map +0 -1
- package/dist/ui/components/DocsSearchProgress.d.ts +0 -13
- package/dist/ui/components/DocsSearchProgress.d.ts.map +0 -1
- package/dist/ui/components/DocsSearchProgress.js +0 -37
- package/dist/ui/components/DocsSearchProgress.js.map +0 -1
|
@@ -22,7 +22,8 @@ export const AVAILABLE_TOOLS_WITH_TODO = `
|
|
|
22
22
|
- **tell_to_user**: Send status updates to the user
|
|
23
23
|
- **ask_to_user**: Ask user a question with multiple choice options
|
|
24
24
|
- **write_todos**: Update entire TODO list (replaces current list)
|
|
25
|
-
- **
|
|
25
|
+
- **once_search**: ONCE — AI 기반 개인 노트·회의록·지식 검색 (검색에 최대 2분 소요)
|
|
26
|
+
- **once_task_list**: ONCE — 세션 간 유지되는 영구 업무 할일 목록 조회
|
|
26
27
|
`.trim();
|
|
27
28
|
export const TOOL_REASON_GUIDE = `
|
|
28
29
|
## CRITICAL - Tool "reason" Parameter
|
|
@@ -42,10 +43,43 @@ export const FILE_MODIFICATION_RULES = `
|
|
|
42
43
|
- For NEW files: Use create_file
|
|
43
44
|
- For EXISTING files: First use read_file to see content, then use edit_file with exact line matches
|
|
44
45
|
`.trim();
|
|
46
|
+
export const TOOL_CALL_FORMAT_GUIDE = `
|
|
47
|
+
## CRITICAL - Tool Call Format
|
|
48
|
+
|
|
49
|
+
Every response MUST be a tool call. Plain text without a tool call is REJECTED.
|
|
50
|
+
|
|
51
|
+
Rules:
|
|
52
|
+
1. **Tool name = EXACT registered name only** (e.g. \`read_file\`, \`edit_file\`, \`bash\`)
|
|
53
|
+
2. **No suffixes or tokens** - NEVER append \`<|channel|>\`, \`<|end|>\`, \`|reasoning\`, etc.
|
|
54
|
+
3. **Arguments = valid JSON** matching the tool schema
|
|
55
|
+
|
|
56
|
+
❌ \`bash<|channel|>commentary\` → ✅ \`bash\`
|
|
57
|
+
❌ \`bash<|end|>\` → ✅ \`bash\`
|
|
58
|
+
❌ \`edit_file|reasoning\` → ✅ \`edit_file\`
|
|
59
|
+
❌ Plain text without tool call → ✅ Always call a tool
|
|
60
|
+
|
|
61
|
+
### Correct tool call examples:
|
|
62
|
+
|
|
63
|
+
Reading a file:
|
|
64
|
+
\`\`\`json
|
|
65
|
+
{"name": "read_file", "arguments": {"reason": "기존 코드 확인", "file_path": "src/index.ts"}}
|
|
66
|
+
\`\`\`
|
|
67
|
+
|
|
68
|
+
Running a command:
|
|
69
|
+
\`\`\`json
|
|
70
|
+
{"name": "bash", "arguments": {"reason": "프로젝트 빌드", "command": "npm run build"}}
|
|
71
|
+
\`\`\`
|
|
72
|
+
|
|
73
|
+
Editing a file:
|
|
74
|
+
\`\`\`json
|
|
75
|
+
{"name": "edit_file", "arguments": {"reason": "버그 수정", "file_path": "src/app.ts", "old_string": "const x = 1;", "new_string": "const x = 2;"}}
|
|
76
|
+
\`\`\`
|
|
77
|
+
`.trim();
|
|
45
78
|
export default {
|
|
46
79
|
AVAILABLE_TOOLS,
|
|
47
80
|
AVAILABLE_TOOLS_WITH_TODO,
|
|
48
81
|
TOOL_REASON_GUIDE,
|
|
82
|
+
TOOL_CALL_FORMAT_GUIDE,
|
|
49
83
|
FILE_MODIFICATION_RULES,
|
|
50
84
|
};
|
|
51
85
|
//# sourceMappingURL=tool-usage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-usage.js","sourceRoot":"","sources":["../../../src/prompts/shared/tool-usage.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;CAU9B,CAAC,IAAI,EAAE,CAAC;AAKT,MAAM,CAAC,MAAM,yBAAyB,GAAG
|
|
1
|
+
{"version":3,"file":"tool-usage.js","sourceRoot":"","sources":["../../../src/prompts/shared/tool-usage.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;CAU9B,CAAC,IAAI,EAAE,CAAC;AAKT,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;CAexC,CAAC,IAAI,EAAE,CAAC;AAKT,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;CAWhC,CAAC,IAAI,EAAE,CAAC;AAKT,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;CAKtC,CAAC,IAAI,EAAE,CAAC;AAKT,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BrC,CAAC,IAAI,EAAE,CAAC;AAET,eAAe;IACb,eAAe;IACf,yBAAyB;IACzB,iBAAiB;IACjB,sBAAsB;IACtB,uBAAuB;CACxB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const PLAN_EXECUTE_SYSTEM_PROMPT: string;
|
|
2
|
+
export declare const CRITICAL_REMINDERS = "## REMEMBER\n1. Tool arguments = valid JSON. All required parameters must be included.\n2. Use exact tool names only: read_file, create_file, edit_file, bash, write_todos, final_response, etc.\n3. Update TODO status IMMEDIATELY when starting or finishing a task.\n4. DO NOT explain \u2014 USE the tool. Action, not description.\n5. Use tell_to_user to report progress between tasks \u2014 the user should know what you're doing.\n6. Call final_response ONLY when ALL TODOs are completed or failed.";
|
|
2
3
|
export default PLAN_EXECUTE_SYSTEM_PROMPT;
|
|
3
4
|
//# sourceMappingURL=plan-execute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-execute.d.ts","sourceRoot":"","sources":["../../../src/prompts/system/plan-execute.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"plan-execute.d.ts","sourceRoot":"","sources":["../../../src/prompts/system/plan-execute.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,0BAA0B,QAyHtC,CAAC;AAOF,eAAO,MAAM,kBAAkB,sfAMqC,CAAC;AAErE,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LANGUAGE_PRIORITY_RULE } from '../shared/language-rules.js';
|
|
2
|
-
import { AVAILABLE_TOOLS_WITH_TODO, TOOL_REASON_GUIDE } from '../shared/tool-usage.js';
|
|
2
|
+
import { AVAILABLE_TOOLS_WITH_TODO, TOOL_REASON_GUIDE, TOOL_CALL_FORMAT_GUIDE } from '../shared/tool-usage.js';
|
|
3
3
|
import { CODEBASE_FIRST_RULE } from '../shared/codebase-rules.js';
|
|
4
4
|
export const PLAN_EXECUTE_SYSTEM_PROMPT = `You are the **Execution Agent** of a powerful system that can do almost anything a computer user can do.
|
|
5
5
|
|
|
@@ -57,6 +57,8 @@ ${AVAILABLE_TOOLS_WITH_TODO}
|
|
|
57
57
|
|
|
58
58
|
${TOOL_REASON_GUIDE}
|
|
59
59
|
|
|
60
|
+
${TOOL_CALL_FORMAT_GUIDE}
|
|
61
|
+
|
|
60
62
|
## Execution Rules
|
|
61
63
|
|
|
62
64
|
1. **Read before modify** - Always read existing code first
|
|
@@ -68,23 +70,9 @@ ${CODEBASE_FIRST_RULE}
|
|
|
68
70
|
|
|
69
71
|
## CRITICAL: Tool Error Handling
|
|
70
72
|
|
|
71
|
-
**
|
|
72
|
-
|
|
73
|
-
1. STOP - Read the error message carefully
|
|
74
|
-
2. Investigate - Use \`read_file\` to check actual file content
|
|
75
|
-
3. **RETRY THE SAME TOOL** with corrected parameters (DO NOT skip or move on)
|
|
76
|
-
4. Repeat until success or 3 failures
|
|
73
|
+
**On tool error:** Read the error, investigate the cause, then retry with corrected parameters. Max 3 retries per tool before marking "failed".
|
|
77
74
|
|
|
78
|
-
**
|
|
79
|
-
- Skip the failed tool and move to next task
|
|
80
|
-
- Say "I'll try a different approach" without actually retrying
|
|
81
|
-
- Mark TODO as complete if the tool failed
|
|
82
|
-
|
|
83
|
-
Example flow:
|
|
84
|
-
1. \`edit_file\` fails: "Line 77 content does not match"
|
|
85
|
-
2. Call \`read_file\` to see actual content
|
|
86
|
-
3. **Call \`edit_file\` again** with correct \`old_string\`
|
|
87
|
-
4. Only proceed after edit succeeds
|
|
75
|
+
**NEVER call the same tool with the same arguments twice.** If a tool succeeded, move on. If a tool failed, change your approach or parameters before retrying.
|
|
88
76
|
|
|
89
77
|
## CRITICAL: When to Respond
|
|
90
78
|
|
|
@@ -121,9 +109,26 @@ Messages use XML tags to separate context:
|
|
|
121
109
|
**Focus on \`<CURRENT_REQUEST>\` and \`<CURRENT_TASK>\`.** Use \`<CONVERSATION_HISTORY>\` for reference only.
|
|
122
110
|
Do NOT re-execute tools from history. Do NOT confuse tools used in history with your current task.
|
|
123
111
|
|
|
124
|
-
## Loop Detection
|
|
112
|
+
## Loop Detection & Stop Conditions
|
|
113
|
+
|
|
114
|
+
**STOP immediately when ANY of these conditions are met:**
|
|
115
|
+
1. ✅ All TODOs are "completed" or "failed" → deliver final response
|
|
116
|
+
2. ✅ User explicitly says "stop", "cancel", or "enough"
|
|
117
|
+
3. ✅ Same tool call with same arguments returns same error 2+ times → mark TODO "failed", move on
|
|
118
|
+
4. ✅ TODO context keeps repeating but no progress → mark remaining as "completed"
|
|
125
119
|
|
|
126
|
-
|
|
120
|
+
**NEVER do these:**
|
|
121
|
+
1. ❌ Do NOT stop after completing just ONE TODO — continue to the next
|
|
122
|
+
2. ❌ Do NOT call the same tool with identical arguments expecting different results
|
|
123
|
+
3. ❌ Do NOT retry a failed approach more than 3 times — try an alternative or mark "failed"
|
|
124
|
+
4. ❌ Do NOT leave TODOs as "in_progress" when moving to the next — update status first
|
|
127
125
|
`;
|
|
126
|
+
export const CRITICAL_REMINDERS = `## REMEMBER
|
|
127
|
+
1. Tool arguments = valid JSON. All required parameters must be included.
|
|
128
|
+
2. Use exact tool names only: read_file, create_file, edit_file, bash, write_todos, final_response, etc.
|
|
129
|
+
3. Update TODO status IMMEDIATELY when starting or finishing a task.
|
|
130
|
+
4. DO NOT explain — USE the tool. Action, not description.
|
|
131
|
+
5. Use tell_to_user to report progress between tasks — the user should know what you're doing.
|
|
132
|
+
6. Call final_response ONLY when ALL TODOs are completed or failed.`;
|
|
128
133
|
export default PLAN_EXECUTE_SYSTEM_PROMPT;
|
|
129
134
|
//# sourceMappingURL=plan-execute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-execute.js","sourceRoot":"","sources":["../../../src/prompts/system/plan-execute.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"plan-execute.js","sourceRoot":"","sources":["../../../src/prompts/system/plan-execute.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,CAAC,MAAM,0BAA0B,GAAG;;EAExC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkDtB,yBAAyB;;EAEzB,iBAAiB;;EAEjB,sBAAsB;;;;;;;;;EAStB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDpB,CAAC;AAOF,MAAM,CAAC,MAAM,kBAAkB,GAAG;;;;;;oEAMkC,CAAC;AAErE,eAAe,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/llm/index.ts"],"names":[],"mappings":"AAOA,cAAc,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/llm/index.ts"],"names":[],"mappings":"AAOA,cAAc,mBAAmB,CAAC"}
|
package/dist/tools/llm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/llm/index.ts"],"names":[],"mappings":"AAOA,cAAc,mBAAmB,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/llm/index.ts"],"names":[],"mappings":"AAOA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export declare function getCurrentUserInfo(): Promise<{
|
|
2
|
+
email: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
} | null>;
|
|
5
|
+
export declare function onceNoteAdd(content: string): Promise<{
|
|
6
|
+
success: boolean;
|
|
7
|
+
message?: string;
|
|
8
|
+
error?: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function onceTaskAdd(params: {
|
|
11
|
+
title: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
startDate?: string;
|
|
14
|
+
endDate?: string;
|
|
15
|
+
}): Promise<{
|
|
16
|
+
success: boolean;
|
|
17
|
+
message?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function onceSearch(query: string): Promise<{
|
|
21
|
+
success: boolean;
|
|
22
|
+
result?: string;
|
|
23
|
+
error?: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function onceTaskList(params?: {
|
|
26
|
+
startDate?: string;
|
|
27
|
+
endDate?: string;
|
|
28
|
+
}): Promise<{
|
|
29
|
+
success: boolean;
|
|
30
|
+
result?: string;
|
|
31
|
+
error?: string;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function onceTaskUpdate(params: {
|
|
34
|
+
todoId: string;
|
|
35
|
+
completed?: boolean;
|
|
36
|
+
title?: string;
|
|
37
|
+
content?: string;
|
|
38
|
+
startDate?: string;
|
|
39
|
+
endDate?: string;
|
|
40
|
+
}): Promise<{
|
|
41
|
+
success: boolean;
|
|
42
|
+
message?: string;
|
|
43
|
+
error?: string;
|
|
44
|
+
}>;
|
|
45
|
+
export declare function freeWorkAdd(items: Array<{
|
|
46
|
+
title: string;
|
|
47
|
+
content?: string;
|
|
48
|
+
date?: string;
|
|
49
|
+
}>): Promise<{
|
|
50
|
+
success: boolean;
|
|
51
|
+
message?: string;
|
|
52
|
+
error?: string;
|
|
53
|
+
}>;
|
|
54
|
+
//# sourceMappingURL=external-service-api-clients.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-service-api-clients.d.ts","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/external-service-api-clients.ts"],"names":[],"mappings":"AAkCA,wBAAsB,kBAAkB,IAAI,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAC,CAOjG;AA+BD,wBAAsB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAA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C;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CA2BlE;AAUD,wBAAsB,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAqBnE"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { loadCredentials } from '../../../../core/auth/oauth-login.js';
|
|
3
|
+
import { ONCE_URL, FREE_URL } from '../../../../constants.js';
|
|
4
|
+
import { logger } from '../../../../utils/logger.js';
|
|
5
|
+
const REQUEST_TIMEOUT = 30000;
|
|
6
|
+
const LONG_REQUEST_TIMEOUT = 240000;
|
|
7
|
+
async function getAuthToken() {
|
|
8
|
+
const creds = await loadCredentials();
|
|
9
|
+
if (!creds?.token) {
|
|
10
|
+
throw new Error('Dashboard login required. Please run: hanseol-dev login\n' +
|
|
11
|
+
'Dashboard: https://52.78.246.50.nip.io');
|
|
12
|
+
}
|
|
13
|
+
return creds.token;
|
|
14
|
+
}
|
|
15
|
+
export async function getCurrentUserInfo() {
|
|
16
|
+
const creds = await loadCredentials();
|
|
17
|
+
if (!creds)
|
|
18
|
+
return null;
|
|
19
|
+
return {
|
|
20
|
+
email: creds.email || '',
|
|
21
|
+
displayName: creds.displayName || '',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function handleApiError(error) {
|
|
25
|
+
if (axios.isAxiosError(error)) {
|
|
26
|
+
const data = error.response?.data;
|
|
27
|
+
if (data && typeof data === 'object' && 'error' in data) {
|
|
28
|
+
const apiError = data;
|
|
29
|
+
return apiError.error;
|
|
30
|
+
}
|
|
31
|
+
if (error.response) {
|
|
32
|
+
return `External service API error (${error.response.status}): ${error.response.statusText}`;
|
|
33
|
+
}
|
|
34
|
+
if (error.code === 'ECONNREFUSED' || error.code === 'ENOTFOUND') {
|
|
35
|
+
return 'Cannot connect to external service. Check your network connection.';
|
|
36
|
+
}
|
|
37
|
+
return `External service API request failed: ${error.message}`;
|
|
38
|
+
}
|
|
39
|
+
return error instanceof Error ? error.message : String(error);
|
|
40
|
+
}
|
|
41
|
+
export async function onceNoteAdd(content) {
|
|
42
|
+
try {
|
|
43
|
+
const token = await getAuthToken();
|
|
44
|
+
logger.debug('onceNoteAdd', { contentLength: content.length });
|
|
45
|
+
const response = await axios.post(`${ONCE_URL}/api/quick-add`, { input: content }, {
|
|
46
|
+
timeout: LONG_REQUEST_TIMEOUT,
|
|
47
|
+
proxy: false,
|
|
48
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
49
|
+
});
|
|
50
|
+
const data = response.data;
|
|
51
|
+
if (data?.success === false) {
|
|
52
|
+
return { success: false, error: data.error || 'Note creation failed' };
|
|
53
|
+
}
|
|
54
|
+
let message = data?.message || 'Note saved successfully.';
|
|
55
|
+
if (data?.result) {
|
|
56
|
+
const parts = [];
|
|
57
|
+
if (data.result.summary)
|
|
58
|
+
parts.push(data.result.summary);
|
|
59
|
+
if (data.result.filesCreated?.length)
|
|
60
|
+
parts.push(`Files created: ${data.result.filesCreated.join(', ')}`);
|
|
61
|
+
if (data.result.foldersCreated?.length)
|
|
62
|
+
parts.push(`Folders created: ${data.result.foldersCreated.join(', ')}`);
|
|
63
|
+
if (parts.length > 0)
|
|
64
|
+
message += '\n' + parts.join('\n');
|
|
65
|
+
}
|
|
66
|
+
if (data?.url)
|
|
67
|
+
message += `\nView at: ${data.url}`;
|
|
68
|
+
return { success: true, message };
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
const errorMessage = handleApiError(error);
|
|
72
|
+
logger.error('onceNoteAdd failed', { error: errorMessage });
|
|
73
|
+
return { success: false, error: errorMessage };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export async function onceTaskAdd(params) {
|
|
77
|
+
try {
|
|
78
|
+
const token = await getAuthToken();
|
|
79
|
+
logger.debug('onceTaskAdd', { title: params.title });
|
|
80
|
+
const response = await axios.post(`${ONCE_URL}/api/quick-add/todo`, params, {
|
|
81
|
+
timeout: REQUEST_TIMEOUT,
|
|
82
|
+
proxy: false,
|
|
83
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
84
|
+
});
|
|
85
|
+
const data = response.data;
|
|
86
|
+
return { success: true, message: data?.message || `Todo "${params.title}" added successfully` };
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
const errorMessage = handleApiError(error);
|
|
90
|
+
logger.error('onceTaskAdd failed', { error: errorMessage });
|
|
91
|
+
return { success: false, error: errorMessage };
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
export async function onceSearch(query) {
|
|
95
|
+
try {
|
|
96
|
+
const token = await getAuthToken();
|
|
97
|
+
logger.debug('onceSearch', { query });
|
|
98
|
+
const response = await axios.get(`${ONCE_URL}/api/quick-add/search`, {
|
|
99
|
+
params: { q: query },
|
|
100
|
+
timeout: LONG_REQUEST_TIMEOUT,
|
|
101
|
+
proxy: false,
|
|
102
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
103
|
+
});
|
|
104
|
+
const data = response.data;
|
|
105
|
+
if (data && typeof data === 'object' && 'results' in data) {
|
|
106
|
+
const results = data.results;
|
|
107
|
+
if (!results || results.length === 0) {
|
|
108
|
+
return { success: true, result: data.message || 'No search results found.' };
|
|
109
|
+
}
|
|
110
|
+
const formatted = results.map((item, i) => `${i + 1}. ${item.title || '(no title)'}${item.relevanceScore ? ` (relevance: ${item.relevanceScore})` : ''}${item.path ? `\n Path: ${item.path}` : ''}\n ${item.snippet || ''}`).join('\n\n');
|
|
111
|
+
const header = data.totalFound > results.length
|
|
112
|
+
? `Found ${data.totalFound} results, showing top ${results.length}:\n\n`
|
|
113
|
+
: '';
|
|
114
|
+
return { success: true, result: header + formatted };
|
|
115
|
+
}
|
|
116
|
+
if (Array.isArray(data)) {
|
|
117
|
+
if (data.length === 0) {
|
|
118
|
+
return { success: true, result: 'No search results found.' };
|
|
119
|
+
}
|
|
120
|
+
const formatted = data.map((item, i) => `${i + 1}. ${item.title || '(no title)'}${item.relevanceScore ? ` (relevance: ${item.relevanceScore})` : ''}\n ${item.content || ''}`).join('\n\n');
|
|
121
|
+
return { success: true, result: formatted };
|
|
122
|
+
}
|
|
123
|
+
return { success: true, result: typeof data === 'string' ? data : JSON.stringify(data, null, 2) };
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
const errorMessage = handleApiError(error);
|
|
127
|
+
logger.error('onceSearch failed', { error: errorMessage });
|
|
128
|
+
return { success: false, error: errorMessage };
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
export async function onceTaskList(params) {
|
|
132
|
+
try {
|
|
133
|
+
const token = await getAuthToken();
|
|
134
|
+
logger.debug('onceTaskList', { ...params });
|
|
135
|
+
const response = await axios.get(`${ONCE_URL}/api/quick-add/todos`, {
|
|
136
|
+
params: { ...params },
|
|
137
|
+
timeout: REQUEST_TIMEOUT,
|
|
138
|
+
proxy: false,
|
|
139
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
140
|
+
});
|
|
141
|
+
const data = response.data;
|
|
142
|
+
if (data && typeof data === 'object' && 'todos' in data) {
|
|
143
|
+
const todos = data.todos;
|
|
144
|
+
if (!todos || todos.length === 0) {
|
|
145
|
+
return { success: true, result: data.message || 'No tasks found.' };
|
|
146
|
+
}
|
|
147
|
+
const formatted = todos.map((todo) => `- [${todo.completed ? 'x' : ' '}] ${todo.title || '(no title)'}${todo.endDate ? ` (due: ${todo.endDate})` : ''}${todo.id ? ` [id: ${todo.id}]` : ''}`).join('\n');
|
|
148
|
+
const header = data.message ? `${data.message}\n\n` : '';
|
|
149
|
+
return { success: true, result: header + formatted };
|
|
150
|
+
}
|
|
151
|
+
if (Array.isArray(data)) {
|
|
152
|
+
if (data.length === 0) {
|
|
153
|
+
return { success: true, result: 'No tasks found.' };
|
|
154
|
+
}
|
|
155
|
+
const formatted = data.map((todo) => `- [${todo.completed ? 'x' : ' '}] ${todo.title || '(no title)'}${todo.endDate ? ` (due: ${todo.endDate})` : ''}${todo.id ? ` [id: ${todo.id}]` : ''}`).join('\n');
|
|
156
|
+
return { success: true, result: formatted };
|
|
157
|
+
}
|
|
158
|
+
return { success: true, result: typeof data === 'string' ? data : JSON.stringify(data, null, 2) };
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
const errorMessage = handleApiError(error);
|
|
162
|
+
logger.error('onceTaskList failed', { error: errorMessage });
|
|
163
|
+
return { success: false, error: errorMessage };
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
export async function onceTaskUpdate(params) {
|
|
167
|
+
try {
|
|
168
|
+
const token = await getAuthToken();
|
|
169
|
+
logger.debug('onceTaskUpdate', { todoId: params.todoId });
|
|
170
|
+
const response = await axios.patch(`${ONCE_URL}/api/quick-add/todos`, params, {
|
|
171
|
+
timeout: REQUEST_TIMEOUT,
|
|
172
|
+
proxy: false,
|
|
173
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
174
|
+
});
|
|
175
|
+
const data = response.data;
|
|
176
|
+
let message = data?.message || 'Task updated successfully';
|
|
177
|
+
if (data?.changes?.length) {
|
|
178
|
+
message += `\nChanges: ${data.changes.join(', ')}`;
|
|
179
|
+
}
|
|
180
|
+
return { success: true, message };
|
|
181
|
+
}
|
|
182
|
+
catch (error) {
|
|
183
|
+
const errorMessage = handleApiError(error);
|
|
184
|
+
logger.error('onceTaskUpdate failed', { error: errorMessage });
|
|
185
|
+
return { success: false, error: errorMessage };
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
export async function freeWorkAdd(items) {
|
|
189
|
+
try {
|
|
190
|
+
const token = await getAuthToken();
|
|
191
|
+
logger.debug('freeWorkAdd', { itemCount: items.length });
|
|
192
|
+
const response = await axios.post(`${FREE_URL}/api/items/external`, { items }, {
|
|
193
|
+
timeout: REQUEST_TIMEOUT,
|
|
194
|
+
proxy: false,
|
|
195
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
196
|
+
});
|
|
197
|
+
return { success: true, message: response.data?.message || `${items.length} work item(s) recorded successfully.` };
|
|
198
|
+
}
|
|
199
|
+
catch (error) {
|
|
200
|
+
const errorMessage = handleApiError(error);
|
|
201
|
+
logger.error('freeWorkAdd failed', { error: errorMessage });
|
|
202
|
+
return { success: false, error: errorMessage };
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=external-service-api-clients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-service-api-clients.js","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/external-service-api-clients.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,MAAM,eAAe,GAAG,KAAK,CAAC;AAC9B,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAKpC,KAAK,UAAU,YAAY;IACzB,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;IACtC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,2DAA2D;YAC3D,wCAAwC,CACzC,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC;AACrB,CAAC;AAKD,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;IACtC,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OA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OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;IACjD,CAAC;AACH,CAAC;AAUD,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,KAIhC;IACA,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,YAAY,EAAE,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAEzD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAC/B,GAAG,QAAQ,qBAAqB,EAChC,EAAE,KAAK,EAAE,EACT;YACE,OAAO,EAAE,eAAe;YACxB,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,KAAK,EAAE,EAAE;SAC9C,CACF,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,IAAI,GAAG,KAAK,CAAC,MAAM,sCAAsC,EAAE,CAAC;IACrH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,YAAY,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;QAC3C,MAAM,CAAC,KAAK,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;QAC5D,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;IACjD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"free-tools.d.ts","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/free-tools.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"free-tools.js","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/free-tools.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,WAAW,EACX,WAAW,EACX,kBAAkB,GACnB,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,cAAc,EACd,WAAW,EACX,WAAW,EACX,kBAAkB,GACnB,MAAM,mCAAmC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"once-tools.d.ts","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/once-tools.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAA4B,MAAM,mBAAmB,CAAC;AA+H5E,eAAO,MAAM,UAAU,EAAE,aAAa,EAGrC,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { onceSearch, onceTaskList } from './external-service-api-clients.js';
|
|
2
|
+
import { logger } from '../../../../utils/logger.js';
|
|
3
|
+
const ONCE_SEARCH_DEFINITION = {
|
|
4
|
+
type: 'function',
|
|
5
|
+
function: {
|
|
6
|
+
name: 'once_search',
|
|
7
|
+
description: `ONCE — AI-powered search of the user's personal notes, meeting records, and saved knowledge.
|
|
8
|
+
|
|
9
|
+
Purpose: Notes are saved specifically so they can be referenced when similar issues arise again.
|
|
10
|
+
When you encounter an error or get stuck, ALWAYS search first — the user may have already solved this before.
|
|
11
|
+
|
|
12
|
+
Proactively use this tool to help the user:
|
|
13
|
+
- When something isn't working → search for prior troubleshooting records and solutions
|
|
14
|
+
- When you encounter an error → check if the user has documented a fix before
|
|
15
|
+
- When you need context from the user's previous work or meeting records
|
|
16
|
+
- When looking for information the user may have saved before
|
|
17
|
+
|
|
18
|
+
Note: This search is synchronous and may take up to 2 minutes as the AI explores folders. Results are ranked by relevance.`,
|
|
19
|
+
parameters: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
properties: {
|
|
22
|
+
reason: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'Natural explanation for the user about what you are searching for',
|
|
25
|
+
},
|
|
26
|
+
query: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Search query in natural language',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ['reason', 'query'],
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
const onceSearchTool = {
|
|
36
|
+
definition: ONCE_SEARCH_DEFINITION,
|
|
37
|
+
categories: ['llm-simple'],
|
|
38
|
+
async execute(args) {
|
|
39
|
+
const query = args['query'];
|
|
40
|
+
if (!query || typeof query !== 'string') {
|
|
41
|
+
return { success: false, error: 'query is required and must be a string' };
|
|
42
|
+
}
|
|
43
|
+
logger.debug('once_search execute', { query });
|
|
44
|
+
const result = await onceSearch(query);
|
|
45
|
+
if (result.success) {
|
|
46
|
+
return { success: true, result: result.result };
|
|
47
|
+
}
|
|
48
|
+
return { success: false, error: result.error };
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const ONCE_TASK_LIST_DEFINITION = {
|
|
52
|
+
type: 'function',
|
|
53
|
+
function: {
|
|
54
|
+
name: 'once_task_list',
|
|
55
|
+
description: `ONCE — List the user's persistent work tasks that survive across sessions.
|
|
56
|
+
|
|
57
|
+
⚠️ This is NOT the execution TODO list — it's the user's persistent work task list.
|
|
58
|
+
|
|
59
|
+
Proactively use this tool to help the user:
|
|
60
|
+
- When the user asks about their pending work tasks
|
|
61
|
+
- When you need to check existing tasks before creating new ones to avoid duplicates
|
|
62
|
+
- When reviewing the user's task list to suggest completing relevant tasks
|
|
63
|
+
|
|
64
|
+
Dates should be in YYYY-MM-DD format. If omitted, defaults to today ~ 1 year later.`,
|
|
65
|
+
parameters: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: {
|
|
68
|
+
reason: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
description: 'Natural explanation for the user about why you are checking their tasks',
|
|
71
|
+
},
|
|
72
|
+
startDate: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Filter start date YYYY-MM-DD (default: today)',
|
|
75
|
+
},
|
|
76
|
+
endDate: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'Filter end date YYYY-MM-DD (default: 1 year later)',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ['reason'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
const onceTaskListTool = {
|
|
86
|
+
definition: ONCE_TASK_LIST_DEFINITION,
|
|
87
|
+
categories: ['llm-simple'],
|
|
88
|
+
async execute(args) {
|
|
89
|
+
const params = {};
|
|
90
|
+
if (args['startDate'])
|
|
91
|
+
params.startDate = String(args['startDate']);
|
|
92
|
+
if (args['endDate'])
|
|
93
|
+
params.endDate = String(args['endDate']);
|
|
94
|
+
logger.debug('once_task_list execute', params);
|
|
95
|
+
const result = await onceTaskList(params);
|
|
96
|
+
if (result.success) {
|
|
97
|
+
return { success: true, result: result.result };
|
|
98
|
+
}
|
|
99
|
+
return { success: false, error: result.error };
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
export const ONCE_TOOLS = [
|
|
103
|
+
onceSearchTool,
|
|
104
|
+
onceTaskListTool,
|
|
105
|
+
];
|
|
106
|
+
//# sourceMappingURL=once-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"once-tools.js","sourceRoot":"","sources":["../../../../../src/tools/llm/simple/external-services/once-tools.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,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AAC;IACjD,CAAC;CACF,CAAC;AAUF,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,cAAc;IACd,gBAAgB;CACjB,CAAC"}
|
|
@@ -9,5 +9,5 @@ export declare const FILE_TOOLS: LLMSimpleTool[];
|
|
|
9
9
|
export declare const SYSTEM_TOOLS: LLMSimpleTool[];
|
|
10
10
|
export { USER_INTERACTION_TOOLS, tellToUserTool, askToUserTool, setTellToUserCallback, setAskUserCallback, clearAskUserCallback, hasAskUserCallback, type AskUserRequest, type AskUserResponse, type AskUserCallback, } from './user-interaction-tools.js';
|
|
11
11
|
export { FILE_TOOLS as FILE_SIMPLE_TOOLS };
|
|
12
|
-
export { setToolExecutionCallback, setToolResponseCallback, setPlanCreatedCallback, setTodoStartCallback, setTodoCompleteCallback, setTodoFailCallback, setToolApprovalCallback, setCompactCallback, setAssistantResponseCallback, setReasoningCallback, getToolExecutionCallback, requestToolApproval, emitPlanCreated, emitTodoStart, emitTodoComplete, emitTodoFail, emitCompact, emitAssistantResponse, emitReasoning, executeSimpleTool, executeFileTool, type ToolApprovalResult, } from './simple-tool-executor.js';
|
|
12
|
+
export { setToolExecutionCallback, setToolResponseCallback, setPlanCreatedCallback, setTodoStartCallback, setTodoCompleteCallback, setTodoFailCallback, setToolApprovalCallback, setCompactCallback, setAssistantResponseCallback, setReasoningCallback, getToolExecutionCallback, requestToolApproval, emitPlanCreated, emitTodoStart, emitTodoComplete, emitTodoFail, emitAutoSyncNotification, emitCompact, emitAssistantResponse, emitReasoning, setAutoSyncNotificationCallback, executeSimpleTool, executeFileTool, type ToolApprovalResult, } from './simple-tool-executor.js';
|
|
13
13
|
//# sourceMappingURL=file-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-tools.d.ts","sourceRoot":"","sources":["../../../../src/tools/llm/simple/file-tools.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAA4B,MAAM,gBAAgB,CAAC;AAoLzE,eAAO,MAAM,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