hanseol-dev 5.0.2-dev.0 → 5.0.2-dev.10
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/browser/browser-profile-manager.d.ts +16 -0
- package/dist/agents/browser/browser-profile-manager.d.ts.map +1 -0
- package/dist/agents/browser/browser-profile-manager.js +149 -0
- package/dist/agents/browser/browser-profile-manager.js.map +1 -0
- package/dist/agents/browser/browser-sub-agent.d.ts +22 -0
- package/dist/agents/browser/browser-sub-agent.d.ts.map +1 -0
- package/dist/agents/browser/browser-sub-agent.js +165 -0
- package/dist/agents/browser/browser-sub-agent.js.map +1 -0
- package/dist/agents/browser/confluence-agent.d.ts +3 -0
- package/dist/agents/browser/confluence-agent.d.ts.map +1 -0
- package/dist/agents/browser/confluence-agent.js +35 -0
- package/dist/agents/browser/confluence-agent.js.map +1 -0
- package/dist/agents/browser/index.d.ts +4 -0
- package/dist/agents/browser/index.d.ts.map +1 -0
- package/dist/agents/browser/index.js +4 -0
- package/dist/agents/browser/index.js.map +1 -0
- package/dist/agents/browser/jira-agent.d.ts +3 -0
- package/dist/agents/browser/jira-agent.d.ts.map +1 -0
- package/dist/agents/browser/jira-agent.js +35 -0
- package/dist/agents/browser/jira-agent.js.map +1 -0
- package/dist/agents/browser/prompts.d.ts +4 -0
- package/dist/agents/browser/prompts.d.ts.map +1 -0
- package/dist/agents/browser/prompts.js +241 -0
- package/dist/agents/browser/prompts.js.map +1 -0
- package/dist/agents/browser/search-agent.d.ts +3 -0
- package/dist/agents/browser/search-agent.d.ts.map +1 -0
- package/dist/agents/browser/search-agent.js +31 -0
- package/dist/agents/browser/search-agent.js.map +1 -0
- package/dist/agents/common/complete-tool.d.ts +3 -0
- package/dist/agents/common/complete-tool.d.ts.map +1 -0
- package/dist/agents/common/complete-tool.js +18 -0
- package/dist/agents/common/complete-tool.js.map +1 -0
- package/dist/agents/common/index.d.ts +3 -0
- package/dist/agents/common/index.d.ts.map +1 -0
- package/dist/agents/common/index.js +3 -0
- package/dist/agents/common/index.js.map +1 -0
- package/dist/agents/common/sub-agent.d.ts +26 -0
- package/dist/agents/common/sub-agent.d.ts.map +1 -0
- package/dist/agents/common/sub-agent.js +162 -0
- package/dist/agents/common/sub-agent.js.map +1 -0
- package/dist/agents/index.d.ts +3 -2
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +3 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/office/excel-agent.d.ts.map +1 -1
- package/dist/agents/office/excel-agent.js +6 -6
- package/dist/agents/office/excel-agent.js.map +1 -1
- package/dist/agents/office/index.d.ts +2 -2
- package/dist/agents/office/index.d.ts.map +1 -1
- package/dist/agents/office/index.js +2 -2
- package/dist/agents/office/index.js.map +1 -1
- package/dist/agents/office/powerpoint-agent.d.ts.map +1 -1
- package/dist/agents/office/powerpoint-agent.js +6 -6
- package/dist/agents/office/powerpoint-agent.js.map +1 -1
- package/dist/agents/office/prompts.d.ts +6 -3
- package/dist/agents/office/prompts.d.ts.map +1 -1
- package/dist/agents/office/prompts.js +403 -146
- package/dist/agents/office/prompts.js.map +1 -1
- package/dist/agents/office/word-agent.d.ts.map +1 -1
- package/dist/agents/office/word-agent.js +6 -6
- package/dist/agents/office/word-agent.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/prompts/agents/planning.d.ts.map +1 -1
- package/dist/prompts/agents/planning.js +63 -29
- package/dist/prompts/agents/planning.js.map +1 -1
- package/dist/prompts/shared/tool-usage.d.ts.map +1 -1
- package/dist/prompts/shared/tool-usage.js +9 -4
- package/dist/prompts/shared/tool-usage.js.map +1 -1
- package/dist/prompts/system/plan-execute.d.ts.map +1 -1
- package/dist/prompts/system/plan-execute.js +30 -9
- package/dist/prompts/system/plan-execute.js.map +1 -1
- package/dist/tools/browser/browser-client.d.ts +3 -0
- package/dist/tools/browser/browser-client.d.ts.map +1 -1
- package/dist/tools/browser/browser-client.js +22 -6
- package/dist/tools/browser/browser-client.js.map +1 -1
- package/dist/tools/browser/browser-tools.d.ts +1 -0
- package/dist/tools/browser/browser-tools.d.ts.map +1 -1
- package/dist/tools/browser/browser-tools.js +15 -0
- package/dist/tools/browser/browser-tools.js.map +1 -1
- package/dist/tools/llm/simple/planning-tools.js +1 -1
- package/dist/tools/llm/simple/planning-tools.js.map +1 -1
- package/dist/tools/office/office-client-base.d.ts +1 -0
- package/dist/tools/office/office-client-base.d.ts.map +1 -1
- package/dist/tools/office/office-client-base.js +2 -1
- package/dist/tools/office/office-client-base.js.map +1 -1
- package/dist/tools/office/powerpoint-client.d.ts +1 -0
- package/dist/tools/office/powerpoint-client.d.ts.map +1 -1
- package/dist/tools/office/powerpoint-client.js +12 -18
- package/dist/tools/office/powerpoint-client.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +4 -0
- package/dist/tools/registry.js.map +1 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/agents/office/prompts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/agents/office/prompts.ts"],"names":[],"mappings":"AAUA,MAAM,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAwCsD,CAAC;AAElF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA2EwB,CAAC;AAEhF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EAgIsB,CAAC;AAE/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6HA6MgE,CAAC;AAI9H,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;iGAmBuD,CAAC;AAElG,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;uFAkBmD,CAAC;AAExF,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;8EAwByC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"word-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/word-agent.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKpD,wBAAgB,yBAAyB,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"word-agent.d.ts","sourceRoot":"","sources":["../../../src/agents/office/word-agent.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKpD,wBAAgB,yBAAyB,IAAI,YAAY,CA4BxD"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { WORD_TOOLS } from '../../tools/office/word-tools.js';
|
|
2
|
-
import {
|
|
3
|
-
import { WORD_SYSTEM_PROMPT } from './prompts.js';
|
|
2
|
+
import { SubAgent } from '../common/sub-agent.js';
|
|
3
|
+
import { WORD_SYSTEM_PROMPT, WORD_PLANNING_PROMPT } from './prompts.js';
|
|
4
4
|
export function createWordWorkRequestTool() {
|
|
5
5
|
return {
|
|
6
6
|
definition: {
|
|
7
7
|
type: 'function',
|
|
8
8
|
function: {
|
|
9
|
-
name: '
|
|
10
|
-
description: 'Microsoft Word
|
|
9
|
+
name: 'word_agent',
|
|
10
|
+
description: 'Autonomous Microsoft Word specialist agent. Creates professional-quality documents with beautiful formatting, color schemes, tables, headers/footers, and page layout — all automatically. Give it a topic or rough description and it will produce a polished, enterprise-grade Word document. Also capable of editing existing .docx files. The agent runs independently with its own tools and returns the completed result.',
|
|
11
11
|
parameters: {
|
|
12
12
|
type: 'object',
|
|
13
13
|
properties: {
|
|
14
14
|
instruction: {
|
|
15
15
|
type: 'string',
|
|
16
|
-
description: '
|
|
16
|
+
description: 'Detailed instruction for the Word agent. Include: topic/title, desired sections or content outline, any specific formatting requirements, and save path. The more detail you provide, the better the result. The agent will autonomously create a professional document.',
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
required: ['instruction'],
|
|
@@ -21,7 +21,7 @@ export function createWordWorkRequestTool() {
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
execute: async (args, llmClient) => {
|
|
24
|
-
const agent = new
|
|
24
|
+
const agent = new SubAgent(llmClient, 'word', WORD_TOOLS, WORD_SYSTEM_PROMPT, { maxIterations: 50, planningPrompt: WORD_PLANNING_PROMPT, planningMaxTokens: 1500 });
|
|
25
25
|
return agent.run(args['instruction']);
|
|
26
26
|
},
|
|
27
27
|
categories: ['llm-agent'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"word-agent.js","sourceRoot":"","sources":["../../../src/agents/office/word-agent.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"word-agent.js","sourceRoot":"","sources":["../../../src/agents/office/word-agent.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAExE,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE;gBACR,IAAI,EAAE,YAAY;gBAClB,WAAW,EACT,iaAAia;gBACna,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,0QAA0Q;yBAC7Q;qBACF;oBACD,QAAQ,EAAE,CAAC,aAAa,CAAC;iBAC1B;aACF;SACF;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,cAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;YACpK,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAW,CAAC,CAAC;QAClD,CAAC;QACD,UAAU,EAAE,CAAC,WAAW,CAAC;QACzB,cAAc,EAAE,IAAI;KACrB,CAAC;AACJ,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const PROJECTS_DIR: string;
|
|
|
7
7
|
export declare const CREDENTIALS_FILE_PATH: string;
|
|
8
8
|
export declare const APP_NAME = "hanseol-dev";
|
|
9
9
|
export declare const SERVICE_ID = "hanseol";
|
|
10
|
-
export declare const APP_VERSION = "5.0.2-dev.
|
|
10
|
+
export declare const APP_VERSION = "5.0.2-dev.10";
|
|
11
11
|
export declare const DASHBOARD_URL = "https://52.78.246.50.nip.io";
|
|
12
12
|
export declare const ONCE_URL = "https://52.78.246.50.nip.io:5090";
|
|
13
13
|
export declare const FREE_URL = "https://52.78.246.50.nip.io:6090";
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,QAA0C,CAAC;AAGtE,eAAO,MAAM,aAAa,QAAiB,CAAC;AAM5C,eAAO,MAAM,gBAAgB,QAA2C,CAAC;AAMzE,eAAO,MAAM,QAAQ,QAAoC,CAAC;AAM1D,eAAO,MAAM,WAAW,QAAuC,CAAC;AAMhE,eAAO,MAAM,YAAY,QAAwC,CAAC;AAOlE,eAAO,MAAM,qBAAqB,QAAgD,CAAC;AAMnF,eAAO,MAAM,QAAQ,gBAAgB,CAAC;AAMtC,eAAO,MAAM,UAAU,YAAY,CAAC;AAKpC,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,QAA0C,CAAC;AAGtE,eAAO,MAAM,aAAa,QAAiB,CAAC;AAM5C,eAAO,MAAM,gBAAgB,QAA2C,CAAC;AAMzE,eAAO,MAAM,QAAQ,QAAoC,CAAC;AAM1D,eAAO,MAAM,WAAW,QAAuC,CAAC;AAMhE,eAAO,MAAM,YAAY,QAAwC,CAAC;AAOlE,eAAO,MAAM,qBAAqB,QAAgD,CAAC;AAMnF,eAAO,MAAM,QAAQ,gBAAgB,CAAC;AAMtC,eAAO,MAAM,UAAU,YAAY,CAAC;AAKpC,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAM1C,eAAO,MAAM,aAAa,gCAAgC,CAAC;AAM3D,eAAO,MAAM,QAAQ,qCAAqC,CAAC;AAM3D,eAAO,MAAM,QAAQ,qCAAqC,CAAC;AAM3D,eAAO,MAAM,eAAe,QAAQ,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -9,7 +9,7 @@ export const PROJECTS_DIR = path.join(LOCAL_HOME_DIR, 'projects');
|
|
|
9
9
|
export const CREDENTIALS_FILE_PATH = path.join(LOCAL_HOME_DIR, 'credentials.json');
|
|
10
10
|
export const APP_NAME = 'hanseol-dev';
|
|
11
11
|
export const SERVICE_ID = 'hanseol';
|
|
12
|
-
export const APP_VERSION = '5.0.2-dev.
|
|
12
|
+
export const APP_VERSION = '5.0.2-dev.10';
|
|
13
13
|
export const DASHBOARD_URL = 'https://52.78.246.50.nip.io';
|
|
14
14
|
export const ONCE_URL = 'https://52.78.246.50.nip.io:5090';
|
|
15
15
|
export const FREE_URL = 'https://52.78.246.50.nip.io:6090';
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAMzB,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC;AAGtE,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;AAM5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAMzE,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AAM1D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;AAMhE,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAOlE,MAAM,CAAC,MAAM,qBA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C,CAAC;AAM3D,MAAM,CAAC,MAAM,QAAQ,GAAG,kCAAkC,CAAC;AAM3D,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../src/prompts/agents/planning.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../src/prompts/agents/planning.ts"],"names":[],"mappings":"AAsRA,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAE,MAAW,GAAG,MAAM,CAarG;AAMD,eAAO,MAAM,sBAAsB,QAWlC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const PLANNING_BASE_PROMPT = `You are a **Planning Agent** that creates task lists for a powerful Execution Agent.
|
|
2
2
|
|
|
3
|
-
CRITICAL:
|
|
4
|
-
TODO
|
|
3
|
+
CRITICAL: Default to Korean. Switch to the user's language only when the user inputs in a different language.
|
|
4
|
+
Write TODO titles, responses, and questions in the user's language.
|
|
5
5
|
|
|
6
6
|
## YOUR ROLE
|
|
7
7
|
|
|
@@ -14,9 +14,43 @@ The **Execution Agent** (not you) has powerful capabilities:
|
|
|
14
14
|
- Execute ANY bash command (git, npm, python, docker, etc.)
|
|
15
15
|
- Read, create, edit, delete ANY files on the system
|
|
16
16
|
- Run builds, tests, deployments, and any workflow
|
|
17
|
-
- Browser automation, office document editing (if enabled)
|
|
18
17
|
- Access and control applications just like the user can
|
|
19
18
|
|
|
19
|
+
### Specialist Sub-Agents (Agent-as-Tool)
|
|
20
|
+
|
|
21
|
+
The Execution Agent has access to **autonomous specialist agents** that handle complex tasks independently:
|
|
22
|
+
|
|
23
|
+
**Office Agents** (available on Windows):
|
|
24
|
+
- \`word_agent\`: Creates/edits professional Word documents autonomously. Give it a topic and it produces a polished document with formatting, tables, headers, and page layout.
|
|
25
|
+
- \`excel_agent\`: Creates/edits professional Excel spreadsheets autonomously. Give it data requirements and it produces formatted tables with formulas, charts, and conditional formatting.
|
|
26
|
+
- \`powerpoint_agent\`: Creates/edits professional PowerPoint presentations autonomously. Give it a topic and it produces stunning slides with varied layouts, color schemes, and visual hierarchy.
|
|
27
|
+
|
|
28
|
+
**Browser Agents** (always available):
|
|
29
|
+
- \`confluence_request\`: Searches and creates Confluence pages autonomously.
|
|
30
|
+
- \`jira_request\`: Views and manages Jira issues autonomously.
|
|
31
|
+
- \`search_request\`: Searches the web (Google, Naver, StackOverflow, etc.) and collects results.
|
|
32
|
+
|
|
33
|
+
**Agent Selection Guide — choose the RIGHT agent:**
|
|
34
|
+
- \`powerpoint_agent\`: presentations, pitch decks, slide decks, briefings, proposals with slides, 발표자료, 피치덱, 슬라이드, 브리핑, 제안서(프레젠테이션), 소개자료
|
|
35
|
+
- \`word_agent\`: reports, manuals, proposals (text-heavy), contracts, letters, resumes, 보고서, 매뉴얼, 기획서, 계약서, 이력서, 레터, 논문, 리포트
|
|
36
|
+
- \`excel_agent\`: spreadsheets, data tables, budgets, financial models, schedules, trackers, 실적표, 예산표, 데이터시트, 일정표, 매출표, 대시보드(데이터)
|
|
37
|
+
|
|
38
|
+
⚠️ **Common mistakes to avoid:**
|
|
39
|
+
- "피치덱" / "pitch deck" → \`powerpoint_agent\` (NOT word_agent!)
|
|
40
|
+
- "발표자료" / "프레젠테이션" → \`powerpoint_agent\` (NOT word_agent!)
|
|
41
|
+
- "매출 보고서" (with data tables) → \`excel_agent\` (NOT word_agent!)
|
|
42
|
+
- "제안서" depends on context: if slides → \`powerpoint_agent\`, if document → \`word_agent\`
|
|
43
|
+
|
|
44
|
+
**How to plan for sub-agents:**
|
|
45
|
+
- When the user wants Office documents → create ONE SINGLE TODO that delegates the ENTIRE document to the appropriate agent with a DETAILED instruction
|
|
46
|
+
- ⚠️ CRITICAL: Do NOT split an agent task into multiple TODOs (e.g., one TODO per slide/page/section). The agent handles the ENTIRE document internally. Breaking it into pieces creates 12 separate files instead of 1 cohesive document.
|
|
47
|
+
- ❌ BAD: "#1 슬라이드1 생성", "#2 슬라이드2 생성", "#3 슬라이드3 생성"
|
|
48
|
+
- ✅ GOOD: "#1 PowerPoint 에이전트에게 피치덱 전체 생성 요청 (12-15장, 모든 섹션 포함)"
|
|
49
|
+
- The instruction should include: topic, desired sections/content, specific data, formatting preferences, and save path
|
|
50
|
+
- Sub-agents work best with detailed instructions. The more context you provide, the better the result.
|
|
51
|
+
- If the user's request is vague, the TODO should still include rich context inferred from the conversation.
|
|
52
|
+
- Example TODO: "Excel 에이전트에게 2024년 분기별 매출 실적표 생성 요청 (항목: 분기, 국내매출, 해외매출, 합계, 전분기대비 증감률 / 4분기 데이터 / 저장 경로 포함)"
|
|
53
|
+
|
|
20
54
|
Since the Execution Agent can do almost anything a computer user can do, your job is to plan tasks that fully utilize its capabilities.
|
|
21
55
|
|
|
22
56
|
## YOUR MISSION
|
|
@@ -81,15 +115,15 @@ Use this ONLY for pure questions that need NO action:
|
|
|
81
115
|
### Correct tool call examples:
|
|
82
116
|
|
|
83
117
|
\`\`\`json
|
|
84
|
-
{"name": "create_todos", "arguments": {"title": "
|
|
118
|
+
{"name": "create_todos", "arguments": {"title": "Code analysis & bug fix", "todos": [{"id": "1", "title": "Analyze existing code"}, {"id": "2", "title": "Fix the bug"}], "complexity": "simple"}}
|
|
85
119
|
\`\`\`
|
|
86
120
|
|
|
87
121
|
\`\`\`json
|
|
88
|
-
{"name": "ask_to_user", "arguments": {"question": "
|
|
122
|
+
{"name": "ask_to_user", "arguments": {"question": "Which implementation approach?", "options": ["JWT auth", "Session-based", "OAuth"]}}
|
|
89
123
|
\`\`\`
|
|
90
124
|
|
|
91
125
|
\`\`\`json
|
|
92
|
-
{"name": "respond_to_user", "arguments": {"response": "React
|
|
126
|
+
{"name": "respond_to_user", "arguments": {"response": "React Hooks are a feature for managing state in functional components."}}
|
|
93
127
|
\`\`\`
|
|
94
128
|
|
|
95
129
|
## CRITICAL RULES
|
|
@@ -168,18 +202,18 @@ Do NOT re-plan tasks from history. Create fresh TODOs for the current request.
|
|
|
168
202
|
4. **User's language** - Ask in the same language as the user
|
|
169
203
|
|
|
170
204
|
### For create_todos:
|
|
171
|
-
1.
|
|
172
|
-
2.
|
|
173
|
-
-
|
|
174
|
-
- UI
|
|
175
|
-
- API
|
|
176
|
-
-
|
|
177
|
-
3.
|
|
178
|
-
4.
|
|
179
|
-
5.
|
|
180
|
-
6. **title
|
|
181
|
-
-
|
|
182
|
-
-
|
|
205
|
+
1. **Write detailed, specific TODOs** — Clearly describe what to do and how for each TODO. No vague titles.
|
|
206
|
+
2. **Always include verification steps** — Every implementation task must have a verification TODO:
|
|
207
|
+
- Code changes → verify by running build/tests
|
|
208
|
+
- UI changes → verify visually with screenshots
|
|
209
|
+
- API changes → verify with actual calls
|
|
210
|
+
- Config changes → verify applied results
|
|
211
|
+
3. **Enterprise quality standards** — Plan for error handling, edge cases, and consistency with existing code
|
|
212
|
+
4. **Order matters** — Place dependent tasks in correct order
|
|
213
|
+
5. **Write titles in user's language** (default Korean, switch only when user inputs in another language)
|
|
214
|
+
6. **title should be a short summary (5-20 chars) covering all tasks** — Used as session name.
|
|
215
|
+
- Single task: "Fix login bug", "Add dark mode"
|
|
216
|
+
- Combined tasks: "Schedule & budget docs", "Auth + permissions"
|
|
183
217
|
|
|
184
218
|
### For respond_to_user:
|
|
185
219
|
1. **Only for pure knowledge** - No action required
|
|
@@ -197,21 +231,21 @@ User: "Deploy this app"
|
|
|
197
231
|
→ Use ask_to_user: "Where should I deploy?" with options: ["AWS EC2", "Vercel", "Docker container", "Other"]
|
|
198
232
|
|
|
199
233
|
**create_todos (clear request):**
|
|
200
|
-
User: "
|
|
201
|
-
→ Use create_todos with title "
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
234
|
+
User: "Add a forgot password link to the login page"
|
|
235
|
+
→ Use create_todos with title "Add forgot password link": [
|
|
236
|
+
"Analyze existing login page component",
|
|
237
|
+
"Add forgot password link UI and connect route",
|
|
238
|
+
"Verify UI result with build and screenshot"
|
|
205
239
|
]
|
|
206
240
|
|
|
207
241
|
**create_todos (after clarification):**
|
|
208
242
|
User asked for auth → You clarified → User chose "JWT"
|
|
209
|
-
→ Use create_todos with title "JWT
|
|
210
|
-
"
|
|
211
|
-
"JWT
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"
|
|
243
|
+
→ Use create_todos with title "Implement JWT auth": [
|
|
244
|
+
"Analyze existing auth code (auth directory, middleware structure)",
|
|
245
|
+
"Implement JWT auth middleware (with error handling, token validation)",
|
|
246
|
+
"Implement login/signup API endpoints",
|
|
247
|
+
"Add token storage and refresh logic",
|
|
248
|
+
"Verify with build and tests"
|
|
215
249
|
]
|
|
216
250
|
|
|
217
251
|
**respond_to_user (pure knowledge):**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../../src/prompts/agents/planning.ts"],"names":[],"mappings":"AAaA,MAAM,oBAAoB,GAAG
|
|
1
|
+
{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../../src/prompts/agents/planning.ts"],"names":[],"mappings":"AAaA,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkQ5B,CAAC;AAOF,MAAM,UAAU,yBAAyB,CAAC,WAAmB,EAAE,oBAA4B,EAAE;IAC3F,MAAM,WAAW,GAAG;;;;;EAKpB,WAAW;EACX,iBAAiB;;;CAGlB,CAAC;IAEA,OAAO,oBAAoB,GAAG,WAAW,CAAC;AAC5C,CAAC;AAMD,MAAM,CAAC,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;;;;;;;;;;;CAW5D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-usage.d.ts","sourceRoot":"","sources":["../../../src/prompts/shared/tool-usage.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,QAUpB,CAAC;AAKT,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"tool-usage.d.ts","sourceRoot":"","sources":["../../../src/prompts/shared/tool-usage.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,eAAe,QAUpB,CAAC;AAKT,eAAO,MAAM,yBAAyB,QAmB9B,CAAC;AAKT,eAAO,MAAM,iBAAiB,QAWtB,CAAC;AAKT,eAAO,MAAM,uBAAuB,QAK5B,CAAC;AAKT,eAAO,MAAM,sBAAsB,QA+B3B,CAAC;;;;;;;;AAET,wBAME"}
|
|
@@ -22,7 +22,12 @@ 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
|
-
- **once_search**: ONCE — AI
|
|
25
|
+
- **once_search**: ONCE — AI-powered personal note/meeting/knowledge search (may take up to 2 min)
|
|
26
|
+
|
|
27
|
+
### Specialist Sub-Agent Tools (autonomous agents that run independently)
|
|
28
|
+
- **word_agent**: Autonomous Word agent — creates/edits professional documents. Provide detailed instruction with topic, sections, content outline, and save path.
|
|
29
|
+
- **excel_agent**: Autonomous Excel agent — creates/edits professional spreadsheets. Provide data structure, sample data, formulas needed, and save path.
|
|
30
|
+
- **powerpoint_agent**: Autonomous PowerPoint agent — creates/edits professional presentations. Provide topic, slide outline, content details, and save path.
|
|
26
31
|
`.trim();
|
|
27
32
|
export const TOOL_REASON_GUIDE = `
|
|
28
33
|
## CRITICAL - Tool "reason" Parameter
|
|
@@ -61,17 +66,17 @@ Rules:
|
|
|
61
66
|
|
|
62
67
|
Reading a file:
|
|
63
68
|
\`\`\`json
|
|
64
|
-
{"name": "read_file", "arguments": {"reason": "
|
|
69
|
+
{"name": "read_file", "arguments": {"reason": "Check existing code", "file_path": "src/index.ts"}}
|
|
65
70
|
\`\`\`
|
|
66
71
|
|
|
67
72
|
Running a command:
|
|
68
73
|
\`\`\`json
|
|
69
|
-
{"name": "bash", "arguments": {"reason": "
|
|
74
|
+
{"name": "bash", "arguments": {"reason": "Build the project", "command": "npm run build"}}
|
|
70
75
|
\`\`\`
|
|
71
76
|
|
|
72
77
|
Editing a file:
|
|
73
78
|
\`\`\`json
|
|
74
|
-
{"name": "edit_file", "arguments": {"reason": "
|
|
79
|
+
{"name": "edit_file", "arguments": {"reason": "Fix the bug", "file_path": "src/app.ts", "old_string": "const x = 1;", "new_string": "const x = 2;"}}
|
|
75
80
|
\`\`\`
|
|
76
81
|
`.trim();
|
|
77
82
|
export default {
|
|
@@ -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;;;;;;;;;;;;;;;;;;;CAmBxC,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 +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,QAoLtC,CAAC;AAMF,eAAO,MAAM,wBAAwB,6rBAOsD,CAAC;AAS5F,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAoB/D;AAGD,eAAO,MAAM,kBAAkB,QAA8B,CAAC;AAE9D,eAAe,0BAA0B,CAAC"}
|
|
@@ -5,8 +5,8 @@ export const PLAN_EXECUTE_SYSTEM_PROMPT = `You are the **Execution Agent** of a
|
|
|
5
5
|
|
|
6
6
|
${LANGUAGE_PRIORITY_RULE}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
**Additional language rule**: Default to Korean. Switch to the user's language only when the user inputs in a different language.
|
|
9
|
+
Write all tool reasons, status messages, and responses in the user's language.
|
|
10
10
|
|
|
11
11
|
## SYSTEM CAPABILITIES
|
|
12
12
|
|
|
@@ -89,6 +89,27 @@ This does NOT conflict with Enterprise Quality:
|
|
|
89
89
|
|
|
90
90
|
${CODEBASE_FIRST_RULE}
|
|
91
91
|
|
|
92
|
+
## CRITICAL: Sub-Agent Delegation
|
|
93
|
+
|
|
94
|
+
When delegating to specialist agents (word_agent, excel_agent, powerpoint_agent):
|
|
95
|
+
|
|
96
|
+
**Write DETAILED instructions:**
|
|
97
|
+
- Include the full topic, desired sections, specific data/content, formatting preferences, and save path
|
|
98
|
+
- The more detail you provide, the better the result
|
|
99
|
+
- If the user gave vague instructions, YOU must fill in the gaps with professional judgment before delegating
|
|
100
|
+
- Example: User says "매출 보고서 만들어줘" → You should instruct: "2024년 분기별 매출 실적 보고서를 만들어주세요. 포함 항목: 1분기~4분기 국내/해외 매출, 전분기 대비 증감률, 합계. 현실적인 데이터를 생성하고 차트도 포함해주세요. 저장 경로: C:\\Users\\{user}\\Desktop\\매출보고서.xlsx"
|
|
101
|
+
|
|
102
|
+
**Verify agent results:**
|
|
103
|
+
- After the agent completes, check if the result is satisfactory
|
|
104
|
+
- If a screenshot tool is available, take a screenshot and verify visually
|
|
105
|
+
- If the result is unsatisfactory, call the agent again with MORE SPECIFIC instructions addressing what was wrong
|
|
106
|
+
|
|
107
|
+
**CRITICAL — Do NOT re-call an agent unnecessarily:**
|
|
108
|
+
- When an agent returns a successful completion, TRUST its result. The file has been created/modified.
|
|
109
|
+
- Do NOT call the same agent again just because you cannot independently verify the file exists — the agent has its own file system tools and confirms completion itself.
|
|
110
|
+
- Only re-call an agent if the CONTENT is wrong (e.g., wrong topic, poor quality, missing sections), not because of file path uncertainty.
|
|
111
|
+
- Each agent call is expensive (spawns a full LLM session). Calling the same agent 2-3 times wastes resources and creates duplicate files.
|
|
112
|
+
|
|
92
113
|
## CRITICAL: Tool Error Handling
|
|
93
114
|
|
|
94
115
|
**On tool error:** Read the error, investigate the cause, then retry with corrected parameters.
|
|
@@ -140,12 +161,12 @@ Do NOT re-execute tools from history. Do NOT confuse tools used in history with
|
|
|
140
161
|
|
|
141
162
|
## CRITICAL: Enterprise Quality
|
|
142
163
|
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
164
|
+
Work with the mindset of building an enterprise-grade service.
|
|
165
|
+
- Always consider error handling and edge cases
|
|
166
|
+
- Always read and understand existing code before modifying
|
|
167
|
+
- Always verify after modification (build, test, screenshot)
|
|
168
|
+
- Always check if the same fix is needed in related files
|
|
169
|
+
- Maintain the tension that nothing must be missed
|
|
149
170
|
|
|
150
171
|
## Loop Detection & Stop Conditions
|
|
151
172
|
|
|
@@ -179,7 +200,7 @@ export function getCriticalReminders(hasVision) {
|
|
|
179
200
|
'6. Call final_response ONLY when ALL TODOs are completed or failed.',
|
|
180
201
|
'7. VERIFY every result before marking complete. Run, test, read — never assume correctness.',
|
|
181
202
|
'8. Enterprise quality — always check error handling, edge cases, and related files.',
|
|
182
|
-
'9. Default to Korean — switch language only when user inputs in another language.',
|
|
203
|
+
'9. Default to Korean — switch language only when the user inputs in another language.',
|
|
183
204
|
'10. SURGICAL — do NOT modify code outside the TODO scope. No "improving" adjacent code.',
|
|
184
205
|
'11. SIMPLICITY — minimum code to solve the problem. No single-use abstractions. No unrequested features.',
|
|
185
206
|
];
|
|
@@ -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,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,CAAC,MAAM,0BAA0B,GAAG;;EAExC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDtB,yBAAyB;;EAEzB,iBAAiB;;EAEjB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BtB,mBAAmB
|
|
1
|
+
{"version":3,"file":"plan-execute.js","sourceRoot":"","sources":["../../../src/prompts/system/plan-execute.ts"],"names":[],"m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
91
|
+
userDataDir?: string;
|
|
92
|
+
cdpPort?: number;
|
|
91
93
|
}): Promise<BrowserResponse>;
|
|
92
94
|
close(): Promise<BrowserResponse>;
|
|
93
95
|
navigate(url: string): Promise<NavigateResponse>;
|
|
@@ -113,5 +115,6 @@ declare class BrowserClient {
|
|
|
113
115
|
focusElement(selector: string): Promise<BrowserResponse>;
|
|
114
116
|
}
|
|
115
117
|
export declare const browserClient: BrowserClient;
|
|
118
|
+
export { BrowserClient };
|
|
116
119
|
export type { BrowserResponse, HealthResponse, ScreenshotResponse, NavigateResponse, PageInfoResponse, ConsoleResponse, NetworkResponse };
|
|
117
120
|
//# sourceMappingURL=browser-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser-client.d.ts","sourceRoot":"","sources":["../../../src/tools/browser/browser-client.ts"],"names":[],"mappings":"AAyBA,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,UAAU,cAAe,SAAQ,eAAe;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,MAAM,EAAE,OAAO,CAAC;QAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QACpB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,cAAc,EAAE,OAAO,CAAC;KACzB,CAAC;CACH;AAED,UAAU,kBAAmB,SAAQ,eAAe;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UA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BhF,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CA+B/D;AAGD,eAAO,MAAM,aAAa,eAAsB,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -304,6 +304,8 @@ class BrowserClient {
|
|
|
304
304
|
async launch(options) {
|
|
305
305
|
const headless = options?.headless ?? false;
|
|
306
306
|
const preferredBrowser = options?.browser ?? 'chrome';
|
|
307
|
+
if (options?.cdpPort)
|
|
308
|
+
this.cdpPort = options.cdpPort;
|
|
307
309
|
logger.debug(`[BrowserClient] launch: starting browser (preferred=${preferredBrowser}, headless=${headless})`);
|
|
308
310
|
try {
|
|
309
311
|
if (this.cdp) {
|
|
@@ -352,7 +354,8 @@ class BrowserClient {
|
|
|
352
354
|
baseArgs.push('--headless=new');
|
|
353
355
|
}
|
|
354
356
|
if (this.platform === 'native-windows') {
|
|
355
|
-
const userDataDir =
|
|
357
|
+
const userDataDir = options?.userDataDir
|
|
358
|
+
|| `${process.env['LOCALAPPDATA']}\\hanseol-browser-profile-${Date.now()}`;
|
|
356
359
|
const args = [...baseArgs, `--user-data-dir=${userDataDir}`];
|
|
357
360
|
logger.debug(`[BrowserClient] launch: spawning browser directly on Windows`);
|
|
358
361
|
this.browserProcess = spawn(browserPath, args, {
|
|
@@ -361,10 +364,21 @@ class BrowserClient {
|
|
|
361
364
|
});
|
|
362
365
|
}
|
|
363
366
|
else if (this.platform === 'wsl') {
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
367
|
+
let psCommand;
|
|
368
|
+
if (options?.userDataDir) {
|
|
369
|
+
const winPath = options.userDataDir.startsWith('/mnt/')
|
|
370
|
+
? options.userDataDir.replace(/^\/mnt\/([a-z])\//, (_, d) => `${d.toUpperCase()}:\\`).replace(/\//g, '\\')
|
|
371
|
+
: options.userDataDir;
|
|
372
|
+
const argsForPowerShell = [`'--user-data-dir=${winPath}'`, ...baseArgs.map(a => `"${a}"`)];
|
|
373
|
+
const argsString = argsForPowerShell.join(',');
|
|
374
|
+
psCommand = `Start-Process -FilePath '${browserPath}' -ArgumentList ${argsString}`;
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
const argsForPowerShell = ['--user-data-dir=$dir', ...baseArgs];
|
|
378
|
+
const argsString = argsForPowerShell.map(arg => `"${arg}"`).join(',');
|
|
379
|
+
psCommand = `$dir = "$env:LOCALAPPDATA\\hanseol-browser-profile-${Date.now()}"; Start-Process -FilePath '${browserPath}' -ArgumentList ${argsString}`;
|
|
380
|
+
}
|
|
381
|
+
logger.debug(`[BrowserClient] launch: executing PowerShell command from WSL (port=${this.cdpPort})`);
|
|
368
382
|
const powershellPath = getPowerShellPath();
|
|
369
383
|
this.browserProcess = spawn(powershellPath, ['-Command', psCommand], {
|
|
370
384
|
detached: true,
|
|
@@ -372,7 +386,8 @@ class BrowserClient {
|
|
|
372
386
|
});
|
|
373
387
|
}
|
|
374
388
|
else {
|
|
375
|
-
const userDataDir =
|
|
389
|
+
const userDataDir = options?.userDataDir
|
|
390
|
+
|| `${process.env['HOME']}/.hanseol-browser-profile-${Date.now()}`;
|
|
376
391
|
const args = [...baseArgs, `--user-data-dir=${userDataDir}`];
|
|
377
392
|
logger.debug(`[BrowserClient] launch: spawning browser directly on Linux`);
|
|
378
393
|
this.browserProcess = spawn(browserPath, args, {
|
|
@@ -1074,4 +1089,5 @@ class BrowserClient {
|
|
|
1074
1089
|
}
|
|
1075
1090
|
}
|
|
1076
1091
|
export const browserClient = new BrowserClient();
|
|
1092
|
+
export { BrowserClient };
|
|
1077
1093
|
//# sourceMappingURL=browser-client.js.map
|