@mazees/mark 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +29 -0
- package/README.md +209 -0
- package/bin/mark.js +27 -0
- package/out/renderer/assets/icon-DHo2CYph.svg +1 -0
- package/out/renderer/assets/index-G2fADWO-.js +4768 -0
- package/out/renderer/assets/index-f3mVse3c.css +1 -0
- package/out/renderer/assets/music-cover-CG4vi3kZ.png +0 -0
- package/out/renderer/assets/poppins-devanagari-400-normal-CJDn6rn8.woff2 +0 -0
- package/out/renderer/assets/poppins-devanagari-400-normal-CqVvlrh5.woff +0 -0
- package/out/renderer/assets/poppins-devanagari-500-normal-BIdkeU1p.woff2 +0 -0
- package/out/renderer/assets/poppins-devanagari-500-normal-DMPDjHtT.woff +0 -0
- package/out/renderer/assets/poppins-devanagari-600-normal-ClASKHrr.woff +0 -0
- package/out/renderer/assets/poppins-devanagari-600-normal-STEjXBNN.woff2 +0 -0
- package/out/renderer/assets/poppins-devanagari-700-normal-O-jipLrW.woff2 +0 -0
- package/out/renderer/assets/poppins-devanagari-700-normal-fHs-vx92.woff +0 -0
- package/out/renderer/assets/poppins-latin-400-normal-BOb3E3N0.woff +0 -0
- package/out/renderer/assets/poppins-latin-400-normal-cpxAROuN.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-500-normal-C8OXljZJ.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-500-normal-DGXqpDMm.woff +0 -0
- package/out/renderer/assets/poppins-latin-600-normal-BJdTmd5m.woff +0 -0
- package/out/renderer/assets/poppins-latin-600-normal-zEkxB9Mr.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-700-normal-BVuQR_eA.woff +0 -0
- package/out/renderer/assets/poppins-latin-700-normal-Qrb0O0WB.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-ext-400-normal-DaBSavcJ.woff +0 -0
- package/out/renderer/assets/poppins-latin-ext-400-normal-by3JarPu.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-ext-500-normal-CK-6C4Hw.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-ext-500-normal-CgAe2rWW.woff +0 -0
- package/out/renderer/assets/poppins-latin-ext-600-normal-CAhIAdZj.woff2 +0 -0
- package/out/renderer/assets/poppins-latin-ext-600-normal-Df5ffKXP.woff +0 -0
- package/out/renderer/assets/poppins-latin-ext-700-normal-DctTR6Tg.woff +0 -0
- package/out/renderer/assets/poppins-latin-ext-700-normal-cby-RkWa.woff2 +0 -0
- package/out/renderer/favicon.ico +0 -0
- package/out/renderer/icon-256.png +0 -0
- package/out/renderer/icon.svg +1 -0
- package/out/renderer/index.html +25 -0
- package/out/renderer/manifest.json +25 -0
- package/out/renderer/robot-simulator.html +1640 -0
- package/package.json +106 -0
- package/src/cli/index.js +332 -0
- package/src/cli/monitor.js +413 -0
- package/src/cli/theme.js +347 -0
- package/src/launcher/MarkTray.cs +227 -0
- package/src/main/browser-agent.js +1132 -0
- package/src/main/git-service.js +90 -0
- package/src/main/google/google-calendar.js +69 -0
- package/src/main/google/google-drive.js +263 -0
- package/src/main/google/google-gmail.js +131 -0
- package/src/main/google/google-service.js +241 -0
- package/src/main/node-tools.js +23 -0
- package/src/main/pc-agent-scripts/mouse-locker.ps1 +76 -0
- package/src/main/pc-agent-scripts/ocr-region.ps1 +185 -0
- package/src/main/pc-agent-scripts/pc-daemon.ps1 +726 -0
- package/src/main/pc-agent-scripts/pc-overlay.ps1 +253 -0
- package/src/main/pc-agent-scripts/pick-folder.ps1 +33 -0
- package/src/main/pc-agent-scripts/read-ui.ps1 +181 -0
- package/src/main/pc-agent-scripts/take-screenshot.ps1 +24 -0
- package/src/main/pc-agent-scripts/win-action.ps1 +380 -0
- package/src/main/plugins/plugin-loader.js +306 -0
- package/src/main/skills/skill-manager.js +265 -0
- package/src/main/syntax-validator.js +455 -0
- package/src/main/task-daemon.js +117 -0
- package/src/main/telegram/telegram-service.js +835 -0
- package/src/main/tools/browser-tools.js +516 -0
- package/src/main/tools/file-tools.js +1126 -0
- package/src/main/tools/git-tools.js +79 -0
- package/src/main/tools/google-tools.js +566 -0
- package/src/main/tools/index.js +36 -0
- package/src/main/tools/media-tools.js +42 -0
- package/src/main/tools/system-tools.js +295 -0
- package/src/main/tools/task-tools.js +73 -0
- package/src/main/tools/telegram-tools.js +101 -0
- package/src/renderer/index.html +24 -0
- package/src/renderer/public/favicon.ico +0 -0
- package/src/renderer/public/icon-256.png +0 -0
- package/src/renderer/public/icon.svg +1 -0
- package/src/renderer/public/manifest.json +25 -0
- package/src/renderer/public/robot-simulator.html +1640 -0
- package/src/renderer/src/App.jsx +304 -0
- package/src/renderer/src/api/ai/awareness.js +294 -0
- package/src/renderer/src/api/ai/chatSummarizer.js +79 -0
- package/src/renderer/src/api/ai/contextCompactor.js +129 -0
- package/src/renderer/src/api/ai/contextManager.js +1130 -0
- package/src/renderer/src/api/ai/core.js +167 -0
- package/src/renderer/src/api/ai/index.js +4 -0
- package/src/renderer/src/api/ai/memoryGroomer.js +101 -0
- package/src/renderer/src/api/ai/persona.js +115 -0
- package/src/renderer/src/api/ai/planning.js +317 -0
- package/src/renderer/src/api/ai/relationship.js +177 -0
- package/src/renderer/src/api/ai/skillSynthesizer.js +168 -0
- package/src/renderer/src/api/ai/tools.js +167 -0
- package/src/renderer/src/api/ai/utils.js +359 -0
- package/src/renderer/src/api/db.js +1013 -0
- package/src/renderer/src/api/oramaStore.js +592 -0
- package/src/renderer/src/api/ragPipeline.js +87 -0
- package/src/renderer/src/api/subagent/subagentExecutor.js +780 -0
- package/src/renderer/src/api/subagent/subagentPrompt.js +44 -0
- package/src/renderer/src/api/subagent/subagentStore.js +173 -0
- package/src/renderer/src/api/taskExecutor.js +18 -0
- package/src/renderer/src/api/taskStore.js +315 -0
- package/src/renderer/src/api/tools/core-tools.js +707 -0
- package/src/renderer/src/api/tools/index.js +151 -0
- package/src/renderer/src/api/turnPairMigrator.js +200 -0
- package/src/renderer/src/api/vectorMemory.js +136 -0
- package/src/renderer/src/api/wakeWord.js +101 -0
- package/src/renderer/src/api/web-bridge.js +885 -0
- package/src/renderer/src/api/webSpeech.js +178 -0
- package/src/renderer/src/api/workspaceRag.js +76 -0
- package/src/renderer/src/assets/electron.svg +10 -0
- package/src/renderer/src/assets/icon.svg +1 -0
- package/src/renderer/src/assets/main.css +589 -0
- package/src/renderer/src/assets/music-cover.png +0 -0
- package/src/renderer/src/assets/wavy-lines.svg +25 -0
- package/src/renderer/src/components/Chat/ApprovalBubble.jsx +127 -0
- package/src/renderer/src/components/Chat/CodeBlock.jsx +83 -0
- package/src/renderer/src/components/Chat/DurableTaskBubble.jsx +455 -0
- package/src/renderer/src/components/Chat/FileDiffModal.jsx +328 -0
- package/src/renderer/src/components/Chat/GeminiWidgets.jsx +82 -0
- package/src/renderer/src/components/Chat/MemoryFooterBubble.jsx +34 -0
- package/src/renderer/src/components/Chat/MessageBubble.jsx +459 -0
- package/src/renderer/src/components/Chat/PluginExecutionBubble.jsx +41 -0
- package/src/renderer/src/components/Chat/ThinkingBubble.jsx +316 -0
- package/src/renderer/src/components/Chat/YoutubeSearchBubble.jsx +43 -0
- package/src/renderer/src/components/Chat/YoutubeSummaryBubble.jsx +40 -0
- package/src/renderer/src/components/Chat/index.js +11 -0
- package/src/renderer/src/components/ChatList.jsx +434 -0
- package/src/renderer/src/components/GlobalCameraManager.jsx +67 -0
- package/src/renderer/src/components/Versions.jsx +15 -0
- package/src/renderer/src/components/YoutubeMusicPlayer.jsx +375 -0
- package/src/renderer/src/components/camera/CameraPreview.jsx +236 -0
- package/src/renderer/src/components/config/AiEngineSection.jsx +363 -0
- package/src/renderer/src/components/config/CameraSection.jsx +100 -0
- package/src/renderer/src/components/config/PermissionsSection.jsx +130 -0
- package/src/renderer/src/components/config/ShortcutSection.jsx +102 -0
- package/src/renderer/src/components/config/VoiceSection.jsx +110 -0
- package/src/renderer/src/components/config/index.js +5 -0
- package/src/renderer/src/components/core/Avatar.jsx +2197 -0
- package/src/renderer/src/components/core/ConfirmModal.jsx +80 -0
- package/src/renderer/src/components/core/DraggableHoloCard.jsx +125 -0
- package/src/renderer/src/components/core/FloatingMenu.jsx +272 -0
- package/src/renderer/src/components/core/HoloCard.jsx +64 -0
- package/src/renderer/src/components/core/InputBar.jsx +1346 -0
- package/src/renderer/src/components/core/ProcessPanel.jsx +216 -0
- package/src/renderer/src/components/core/ResponseArea.jsx +149 -0
- package/src/renderer/src/components/core/StatusIndicator.jsx +59 -0
- package/src/renderer/src/components/core/ThoughtNeuralFlow.jsx +168 -0
- package/src/renderer/src/components/core/ToolClustersDeck.jsx +210 -0
- package/src/renderer/src/components/core/native-skills.js +43 -0
- package/src/renderer/src/components/neural-core/EmotionalCortexLobe.jsx +359 -0
- package/src/renderer/src/components/neural-core/NodeDissectionModal.jsx +57 -0
- package/src/renderer/src/components/neural-core/ProceduralMatrixLobe.jsx +193 -0
- package/src/renderer/src/components/neural-core/ProceduralSkillModal.jsx +53 -0
- package/src/renderer/src/components/neural-core/ResetAiModal.jsx +198 -0
- package/src/renderer/src/components/neural-core/SynapticMemoryLobe.jsx +204 -0
- package/src/renderer/src/components/neural-core/traitMeta.js +102 -0
- package/src/renderer/src/components/subagent/AgentChatFeed.jsx +603 -0
- package/src/renderer/src/components/subagent/AgentInspector.jsx +224 -0
- package/src/renderer/src/components/subagent/AgentSidebar.jsx +216 -0
- package/src/renderer/src/components/subagent/SubagentIntercom.jsx +572 -0
- package/src/renderer/src/components/subagent/SubagentTopologyMap.jsx +423 -0
- package/src/renderer/src/contexts/ApprovalContext.jsx +425 -0
- package/src/renderer/src/contexts/ChatContext.jsx +61 -0
- package/src/renderer/src/contexts/YoutubeMusicContext.jsx +333 -0
- package/src/renderer/src/data/faqData.js +202 -0
- package/src/renderer/src/hooks/agent/executeAgentTool.js +895 -0
- package/src/renderer/src/hooks/agent/index.js +4 -0
- package/src/renderer/src/hooks/agent/useMarkMusic.js +75 -0
- package/src/renderer/src/hooks/agent/useMarkPlan.js +2739 -0
- package/src/renderer/src/hooks/agent/useMarkState.js +173 -0
- package/src/renderer/src/hooks/agent/useMarkYoutube.js +82 -0
- package/src/renderer/src/hooks/agent/useRelationalGrowth.js +201 -0
- package/src/renderer/src/hooks/telegram/useTelegramBot.js +63 -0
- package/src/renderer/src/hooks/useAwareness.js +289 -0
- package/src/renderer/src/hooks/useChatArchiver.js +52 -0
- package/src/renderer/src/hooks/useConfirm.jsx +68 -0
- package/src/renderer/src/hooks/useMarkAgent.js +454 -0
- package/src/renderer/src/hooks/useMemoryGroomer.js +152 -0
- package/src/renderer/src/hooks/useVAD.js +511 -0
- package/src/renderer/src/hooks/useWebSpeechWakeWord.js +122 -0
- package/src/renderer/src/main.jsx +12 -0
- package/src/renderer/src/pages/ChatStudio.jsx +922 -0
- package/src/renderer/src/pages/Configuration.jsx +360 -0
- package/src/renderer/src/pages/GoogleWorkspace.jsx +293 -0
- package/src/renderer/src/pages/Guidebook.jsx +917 -0
- package/src/renderer/src/pages/Knowledge.jsx +241 -0
- package/src/renderer/src/pages/MarkHome.jsx +491 -0
- package/src/renderer/src/pages/NeuralCore.jsx +786 -0
- package/src/renderer/src/pages/Plugins.jsx +630 -0
- package/src/renderer/src/pages/SkillEditor.jsx +380 -0
- package/src/renderer/src/pages/Skills.jsx +219 -0
- package/src/renderer/src/pages/Subagents.jsx +342 -0
- package/src/renderer/src/pages/TelegramBot.jsx +343 -0
- package/src/renderer/src/utils/chatContentParser.js +203 -0
- package/src/renderer/src/utils/toolClusters.js +201 -0
- package/src/server/bin/sha3_wasm_bg.wasm +0 -0
- package/src/server/config-manager.js +57 -0
- package/src/server/index.js +195 -0
- package/src/server/launcher.js +87 -0
- package/src/server/memory/db-store.js +758 -0
- package/src/server/memory/orama-store.js +177 -0
- package/src/server/memory/vector-engine.js +109 -0
- package/src/server/routes/ai.routes.js +280 -0
- package/src/server/routes/awareness.routes.js +62 -0
- package/src/server/routes/chat.routes.js +61 -0
- package/src/server/routes/config.routes.js +41 -0
- package/src/server/routes/index.js +35 -0
- package/src/server/routes/integrations.routes.js +116 -0
- package/src/server/routes/memory.routes.js +256 -0
- package/src/server/routes/plugins.routes.js +72 -0
- package/src/server/routes/skills.routes.js +139 -0
- package/src/server/routes/subagents.routes.js +70 -0
- package/src/server/routes/tasks.routes.js +175 -0
- package/src/server/routes/workspace.routes.js +127 -0
- package/src/server/services/ai/ai-utils.js +161 -0
- package/src/server/services/ai/openai-provider.js +757 -0
- package/src/server/services/ai/web-provider.js +729 -0
- package/src/server/services/ai-bridge.js +46 -0
- package/src/server/services/deepseek-web.js +956 -0
- package/src/server/services/gemini-web.js +170 -0
- package/src/server/services/notification-service.js +91 -0
- package/src/server/services/updater.js +125 -0
- package/src/server/tools/awareness-tracker.js +292 -0
- package/src/server/tools/group-tools.js +1164 -0
- package/src/server/tools/media-tools.js +244 -0
- package/src/server/tools/pc-agent.js +327 -0
- package/src/server/tools/screen-service.js +51 -0
- package/src/server/ws-hub.js +168 -0
- package/src/shared/parsers/mark-tag-parser.js +275 -0
|
@@ -0,0 +1,707 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Built-in Tools Schema untuk MARK V5 (OpenAI-compatible OpenAPI Function Definition).
|
|
3
|
+
* Seluruh nama tool mempertahankan format kebab-case (100% valid sesuai regex OpenAI ^[a-zA-Z0-9_-]{1,64}$).
|
|
4
|
+
*/
|
|
5
|
+
export const core_tools_schema = [
|
|
6
|
+
{
|
|
7
|
+
type: 'function',
|
|
8
|
+
function: {
|
|
9
|
+
name: 'browser-search',
|
|
10
|
+
description:
|
|
11
|
+
'HANYA untuk mencari dan menemukan URL / link website yang relevan dengan kata kunci (bukan untuk membaca isi artikel lengkap). Mengembalikan daftar judul & URL. Untuk membaca isi konten lengkap dari URL yang ditemukan, gunakan tool "browser-fetch".',
|
|
12
|
+
parameters: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
query: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description:
|
|
18
|
+
'Kata kunci pencarian web (misal: "gpt 6 astra", "kebakaran kalimantan 2026")'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
required: ['query'],
|
|
22
|
+
additionalProperties: false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'function',
|
|
28
|
+
function: {
|
|
29
|
+
name: 'browser-fetch',
|
|
30
|
+
description:
|
|
31
|
+
'Membaca dan mengambil (curl/fetch) isi konten teks/artikel dari suatu URL secara instan tanpa perlu membuka jendela browser fisik. Sangat cepat untuk membaca isi berita, dokumentasi, atau artikel web.',
|
|
32
|
+
parameters: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
url: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'URL web yang ingin dibaca isinya (misal: "https://example.com/artikel")'
|
|
38
|
+
},
|
|
39
|
+
max_chars: {
|
|
40
|
+
type: 'number',
|
|
41
|
+
description:
|
|
42
|
+
'Batas maksimal karakter teks yang diekstrak (default 4000, maksimal 12000)'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
required: ['url'],
|
|
46
|
+
additionalProperties: false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'function',
|
|
52
|
+
function: {
|
|
53
|
+
name: 'read-tools',
|
|
54
|
+
description:
|
|
55
|
+
'WAJIB dipanggil jika kamu membutuhkan dokumentasi atau fungsi tambahan dari grup tool tertentu sebelum mengeksekusinya.',
|
|
56
|
+
parameters: {
|
|
57
|
+
type: 'object',
|
|
58
|
+
properties: {
|
|
59
|
+
group_name: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
description: 'Nama grup tool bawaan atau plugin yang ingin dibaca.'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
required: ['group_name'],
|
|
65
|
+
additionalProperties: false
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'function',
|
|
71
|
+
function: {
|
|
72
|
+
name: 'manage-memory',
|
|
73
|
+
description:
|
|
74
|
+
'Menyimpan, memperbarui, atau menghapus fakta profil, preferensi user, atau catatan penting ke memori jangka panjang.',
|
|
75
|
+
parameters: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {
|
|
78
|
+
action: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
enum: ['insert', 'update', 'delete'],
|
|
81
|
+
description: 'Aksi database memori'
|
|
82
|
+
},
|
|
83
|
+
type: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
enum: ['profile', 'preference', 'notes'],
|
|
86
|
+
description: 'Kategori memori'
|
|
87
|
+
},
|
|
88
|
+
summary: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
description: 'Ringkasan singkat memori'
|
|
91
|
+
},
|
|
92
|
+
detail: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
description: 'Detail konten fakta atau catatan yang disimpan'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
required: ['action', 'type', 'summary', 'detail'],
|
|
98
|
+
additionalProperties: false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: 'function',
|
|
104
|
+
function: {
|
|
105
|
+
name: 'update-working-memory',
|
|
106
|
+
description:
|
|
107
|
+
'Menyimpan atau memperbarui catatan ringkas progres koding, lokasi baris/fungsi yang telah dipetakan ke .mark/working-memory.json.',
|
|
108
|
+
parameters: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
properties: {
|
|
111
|
+
notes: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'Catatan progres koding atau rencana kerja teknis'
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
required: ['notes'],
|
|
117
|
+
additionalProperties: false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
type: 'function',
|
|
123
|
+
function: {
|
|
124
|
+
name: 'memory-search',
|
|
125
|
+
description:
|
|
126
|
+
'Mencari ingatan masa lalu, preferensi/catatan user, solusi historis, dan riwayat chat percakapan asli.',
|
|
127
|
+
parameters: {
|
|
128
|
+
type: 'object',
|
|
129
|
+
properties: {
|
|
130
|
+
query: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'Kata kunci pencarian memori'
|
|
133
|
+
},
|
|
134
|
+
threshold: {
|
|
135
|
+
type: 'number',
|
|
136
|
+
description: 'Tingkat kemiripan (0.1 - 0.9, default 0.5)'
|
|
137
|
+
},
|
|
138
|
+
limit: {
|
|
139
|
+
type: 'number',
|
|
140
|
+
description: 'Jumlah maksimal data yang diambil (default 5)'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
required: ['query'],
|
|
144
|
+
additionalProperties: false
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: 'function',
|
|
150
|
+
function: {
|
|
151
|
+
name: 'read-file',
|
|
152
|
+
description: 'Membaca isi berkas teks dari workspace atau sistem operasi.',
|
|
153
|
+
parameters: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
properties: {
|
|
156
|
+
path: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
description: 'Path absolut atau relatif berkas yang akan dibaca'
|
|
159
|
+
},
|
|
160
|
+
start_line: {
|
|
161
|
+
type: 'number',
|
|
162
|
+
description: 'Nomor baris awal (opsional)'
|
|
163
|
+
},
|
|
164
|
+
end_line: {
|
|
165
|
+
type: 'number',
|
|
166
|
+
description: 'Nomor baris akhir (opsional)'
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
required: ['path'],
|
|
170
|
+
additionalProperties: false
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
type: 'function',
|
|
176
|
+
function: {
|
|
177
|
+
name: 'read-image',
|
|
178
|
+
description:
|
|
179
|
+
'Membaca berkas gambar lokal (.png, .jpg, .jpeg, .webp, .gif, dll.) dari workspace atau sistem operasi di luar chat. DILARANG menggunakan tool ini jika gambar sudah dilampirkan langsung di chat (temp-uploads), karena sudah terlihat langsung di visual context.',
|
|
180
|
+
parameters: {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {
|
|
183
|
+
file_path: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'Path absolut atau relatif berkas gambar yang akan dibaca'
|
|
186
|
+
},
|
|
187
|
+
query: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
description:
|
|
190
|
+
'Instruksi atau pertanyaan tentang apa yang ingin kamu analisis dari gambar (opsional)'
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
required: ['file_path'],
|
|
194
|
+
additionalProperties: false
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
type: 'function',
|
|
200
|
+
function: {
|
|
201
|
+
name: 'write-file',
|
|
202
|
+
description: 'Membuat berkas baru atau menulis ulang berkas dari nol.',
|
|
203
|
+
parameters: {
|
|
204
|
+
type: 'object',
|
|
205
|
+
properties: {
|
|
206
|
+
path: {
|
|
207
|
+
type: 'string',
|
|
208
|
+
description: 'Path berkas tujuan'
|
|
209
|
+
},
|
|
210
|
+
content: {
|
|
211
|
+
type: 'string',
|
|
212
|
+
description: 'Konten teks lengkap berkas'
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
required: ['path', 'content'],
|
|
216
|
+
additionalProperties: false
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: 'function',
|
|
222
|
+
function: {
|
|
223
|
+
name: 'replace-content',
|
|
224
|
+
description:
|
|
225
|
+
'Mengedit berkas kode dengan mencocokkan teks lama dan menggantinya secara presisi.',
|
|
226
|
+
parameters: {
|
|
227
|
+
type: 'object',
|
|
228
|
+
properties: {
|
|
229
|
+
path: {
|
|
230
|
+
type: 'string',
|
|
231
|
+
description: 'Path berkas yang akan diedit'
|
|
232
|
+
},
|
|
233
|
+
target_content: {
|
|
234
|
+
type: 'string',
|
|
235
|
+
description: 'Teks lama yang akan diganti'
|
|
236
|
+
},
|
|
237
|
+
replacement_content: {
|
|
238
|
+
type: 'string',
|
|
239
|
+
description: 'Teks baru pengganti'
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
required: ['path', 'target_content', 'replacement_content'],
|
|
243
|
+
additionalProperties: false
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
type: 'function',
|
|
249
|
+
function: {
|
|
250
|
+
name: 'replace-lines',
|
|
251
|
+
description: 'Mengedit baris tertentu pada berkas berdasarkan nomor baris.',
|
|
252
|
+
parameters: {
|
|
253
|
+
type: 'object',
|
|
254
|
+
properties: {
|
|
255
|
+
path: {
|
|
256
|
+
type: 'string',
|
|
257
|
+
description: 'Path berkas yang akan diedit'
|
|
258
|
+
},
|
|
259
|
+
start_line: {
|
|
260
|
+
type: 'number',
|
|
261
|
+
description: 'Nomor baris awal'
|
|
262
|
+
},
|
|
263
|
+
end_line: {
|
|
264
|
+
type: 'number',
|
|
265
|
+
description: 'Nomor baris akhir'
|
|
266
|
+
},
|
|
267
|
+
new_code: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
description: 'Kode baru pengganti'
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
required: ['path', 'start_line', 'end_line', 'new_code'],
|
|
273
|
+
additionalProperties: false
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
type: 'function',
|
|
279
|
+
function: {
|
|
280
|
+
name: 'delete-file',
|
|
281
|
+
description: 'Menghapus berkas dari sistem operasi.',
|
|
282
|
+
parameters: {
|
|
283
|
+
type: 'object',
|
|
284
|
+
properties: {
|
|
285
|
+
path: {
|
|
286
|
+
type: 'string',
|
|
287
|
+
description: 'Path berkas yang akan dihapus'
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
required: ['path'],
|
|
291
|
+
additionalProperties: false
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
type: 'function',
|
|
297
|
+
function: {
|
|
298
|
+
name: 'list-dir',
|
|
299
|
+
description: 'Melihat daftar isi folder langsung (1 level).',
|
|
300
|
+
parameters: {
|
|
301
|
+
type: 'object',
|
|
302
|
+
properties: {
|
|
303
|
+
path: {
|
|
304
|
+
type: 'string',
|
|
305
|
+
description: 'Path folder (kosongkan untuk root workspace)'
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
additionalProperties: false
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
type: 'function',
|
|
314
|
+
function: {
|
|
315
|
+
name: 'find-files',
|
|
316
|
+
description:
|
|
317
|
+
'Mencari berkas di seluruh subfolder secara rekursif dengan filter nama/ekstensi glob.',
|
|
318
|
+
parameters: {
|
|
319
|
+
type: 'object',
|
|
320
|
+
properties: {
|
|
321
|
+
pattern: {
|
|
322
|
+
type: 'string',
|
|
323
|
+
description: 'Pola glob pencarian (misal: "*.jsx" atau "*.ts")'
|
|
324
|
+
},
|
|
325
|
+
subfolder: {
|
|
326
|
+
type: 'string',
|
|
327
|
+
description: 'Subfolder target pencarian'
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
required: ['pattern'],
|
|
331
|
+
additionalProperties: false
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
type: 'function',
|
|
337
|
+
function: {
|
|
338
|
+
name: 'grep-search',
|
|
339
|
+
description:
|
|
340
|
+
'Mencari kata kunci atau regex di dalam satu berkas spesifik maupun seluruh berkas dalam folder secara rekursif. Mengembalikan nomor baris dan cuplikan kode yang cocok.',
|
|
341
|
+
parameters: {
|
|
342
|
+
type: 'object',
|
|
343
|
+
properties: {
|
|
344
|
+
keyword: {
|
|
345
|
+
type: 'string',
|
|
346
|
+
description: 'Kata kunci teks atau pola yang dicari'
|
|
347
|
+
},
|
|
348
|
+
path: {
|
|
349
|
+
type: 'string',
|
|
350
|
+
description:
|
|
351
|
+
'Path berkas spesifik (misal: "minecraft_2d.html") ATAU folder target (kosongkan untuk root workspace)'
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
required: ['keyword'],
|
|
355
|
+
additionalProperties: false
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
type: 'function',
|
|
361
|
+
function: {
|
|
362
|
+
name: 'file-outline',
|
|
363
|
+
description:
|
|
364
|
+
'Melihat peta dan struktur berkas (fungsi, class, heading) tanpa membaca seluruh isi.',
|
|
365
|
+
parameters: {
|
|
366
|
+
type: 'object',
|
|
367
|
+
properties: {
|
|
368
|
+
path: {
|
|
369
|
+
type: 'string',
|
|
370
|
+
description: 'Path berkas kode'
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
required: ['path'],
|
|
374
|
+
additionalProperties: false
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
type: 'function',
|
|
380
|
+
function: {
|
|
381
|
+
name: 'read-document',
|
|
382
|
+
description: 'Membaca dan mencari isi dokumen teks, PDF, atau DOCX.',
|
|
383
|
+
parameters: {
|
|
384
|
+
type: 'object',
|
|
385
|
+
properties: {
|
|
386
|
+
path: {
|
|
387
|
+
type: 'string',
|
|
388
|
+
description: 'Path berkas dokumen'
|
|
389
|
+
},
|
|
390
|
+
keyword: {
|
|
391
|
+
type: 'string',
|
|
392
|
+
description: 'Kata kunci pencarian spesifik di dalam dokumen'
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
required: ['path'],
|
|
396
|
+
additionalProperties: false
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
type: 'function',
|
|
402
|
+
function: {
|
|
403
|
+
name: 'read-skill',
|
|
404
|
+
description:
|
|
405
|
+
'Membaca file pedoman skill untuk memuat instruksi dan workflow khusus sebelum eksekusi aksi.',
|
|
406
|
+
parameters: {
|
|
407
|
+
type: 'object',
|
|
408
|
+
properties: {
|
|
409
|
+
skill_name: {
|
|
410
|
+
type: 'string',
|
|
411
|
+
description: 'Nama skill yang ingin dibaca (misal: "speedrunner", "git-commit")'
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
required: ['skill_name'],
|
|
415
|
+
additionalProperties: false
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
type: 'function',
|
|
421
|
+
function: {
|
|
422
|
+
name: 'open',
|
|
423
|
+
description:
|
|
424
|
+
'Membuka aplikasi Windows via shell execute atau membuka URL di browser default.',
|
|
425
|
+
parameters: {
|
|
426
|
+
type: 'object',
|
|
427
|
+
properties: {
|
|
428
|
+
target: {
|
|
429
|
+
type: 'string',
|
|
430
|
+
description: 'Nama executable/path atau URL web'
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
required: ['target'],
|
|
434
|
+
additionalProperties: false
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
type: 'function',
|
|
440
|
+
function: {
|
|
441
|
+
name: 'run-powershell',
|
|
442
|
+
description: 'Menjalankan perintah terminal PowerShell Windows.',
|
|
443
|
+
parameters: {
|
|
444
|
+
type: 'object',
|
|
445
|
+
properties: {
|
|
446
|
+
command: {
|
|
447
|
+
type: 'string',
|
|
448
|
+
description: 'Perintah PowerShell satu baris'
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
required: ['command'],
|
|
452
|
+
additionalProperties: false
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
type: 'function',
|
|
458
|
+
function: {
|
|
459
|
+
name: 'spawn_subagent',
|
|
460
|
+
description:
|
|
461
|
+
'Mendelegasikan tugas ke sub-agent baru yang bekerja mandiri di background secara non-blocking. Sub-agent akan mengeksekusi misi dan melapor kembali secara otomatis via push notification tanpa Lead Agent perlu memanggil wait_subagents.',
|
|
462
|
+
parameters: {
|
|
463
|
+
type: 'object',
|
|
464
|
+
properties: {
|
|
465
|
+
name: {
|
|
466
|
+
type: 'string',
|
|
467
|
+
description: 'Nama sub-agent spesialis (misal: "Developer", "Mr Tester", "Researcher")'
|
|
468
|
+
},
|
|
469
|
+
role: { type: 'string', description: 'Peran sub-agent' },
|
|
470
|
+
goal: { type: 'string', description: 'Tujuan utama sub-agent' },
|
|
471
|
+
initial_message: {
|
|
472
|
+
type: 'string',
|
|
473
|
+
description: 'Pesan instruksi awal tugas yang didelegasikan'
|
|
474
|
+
},
|
|
475
|
+
tools: {
|
|
476
|
+
type: 'string',
|
|
477
|
+
description: 'Daftar tool yang diizinkan (dipisah koma, atau "*")'
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
required: ['name', 'role', 'goal', 'initial_message'],
|
|
481
|
+
additionalProperties: false
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
type: 'function',
|
|
487
|
+
function: {
|
|
488
|
+
name: 'message_agent',
|
|
489
|
+
description:
|
|
490
|
+
'Mengirim pesan atau instruksi teknis langsung ke sub-agent spesialis lain (atau membalas sub-agent) dan menerima responnya.',
|
|
491
|
+
parameters: {
|
|
492
|
+
type: 'object',
|
|
493
|
+
properties: {
|
|
494
|
+
target_agent: {
|
|
495
|
+
type: 'string',
|
|
496
|
+
description:
|
|
497
|
+
'Nama atau ID sub-agent tujuan (misal: "Developer", "Mr Tester", atau "sub_xxx")'
|
|
498
|
+
},
|
|
499
|
+
message: { type: 'string', description: 'Pesan, instruksi, atau pertanyaan teknis' }
|
|
500
|
+
},
|
|
501
|
+
required: ['target_agent', 'message'],
|
|
502
|
+
additionalProperties: false
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
type: 'function',
|
|
508
|
+
function: {
|
|
509
|
+
name: 'send_message',
|
|
510
|
+
description: 'Mengirim pesan instruksi atau evaluasi ke Sub-Agent aktif.',
|
|
511
|
+
parameters: {
|
|
512
|
+
type: 'object',
|
|
513
|
+
properties: {
|
|
514
|
+
subagent_id: { type: 'string', description: 'ID sub-agent tujuan' },
|
|
515
|
+
message: { type: 'string', description: 'Pesan instruksi' }
|
|
516
|
+
},
|
|
517
|
+
required: ['subagent_id', 'message'],
|
|
518
|
+
additionalProperties: false
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
type: 'function',
|
|
524
|
+
function: {
|
|
525
|
+
name: 'list_subagents',
|
|
526
|
+
description:
|
|
527
|
+
'Melihat daftar seluruh sub-agent yang sedang aktif atau sudah selesai beserta statusnya.',
|
|
528
|
+
parameters: {
|
|
529
|
+
type: 'object',
|
|
530
|
+
properties: {
|
|
531
|
+
status: { type: 'string', description: 'Filter status (running/idle/completed)' }
|
|
532
|
+
},
|
|
533
|
+
additionalProperties: false
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
type: 'function',
|
|
539
|
+
function: {
|
|
540
|
+
name: 'report_to_lead',
|
|
541
|
+
description:
|
|
542
|
+
'Melaporkan hasil akhir misi, rangkuman eksekusi, atau temuan penting langsung ke Lead Agent (Mark) dan memicu push notification di chat utama.',
|
|
543
|
+
parameters: {
|
|
544
|
+
type: 'object',
|
|
545
|
+
properties: {
|
|
546
|
+
summary: {
|
|
547
|
+
type: 'string',
|
|
548
|
+
description: 'Rangkuman lengkap hasil pekerjaan yang telah selesai'
|
|
549
|
+
},
|
|
550
|
+
artifact: {
|
|
551
|
+
type: 'string',
|
|
552
|
+
description: 'Path berkas atau artefak yang berhasil dibuat/dimodifikasi jika ada'
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
required: ['summary'],
|
|
556
|
+
additionalProperties: false
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
type: 'function',
|
|
562
|
+
function: {
|
|
563
|
+
name: 'create_agent_task',
|
|
564
|
+
description:
|
|
565
|
+
'Membuat dan mengaktifkan rencana alur kerja tugas multi-tahap (Task Workflow) terstruktur dengan sasaran utama dan target deliverable per tahap.',
|
|
566
|
+
parameters: {
|
|
567
|
+
type: 'object',
|
|
568
|
+
properties: {
|
|
569
|
+
title: { type: 'string', description: 'Judul tugas utama' },
|
|
570
|
+
objective: {
|
|
571
|
+
type: 'string',
|
|
572
|
+
description: 'Tujuan akhir penyelesaian tugas secara menyeluruh'
|
|
573
|
+
},
|
|
574
|
+
steps: {
|
|
575
|
+
type: 'array',
|
|
576
|
+
description: 'Daftar langkah/tahapan pengerjaan terstruktur',
|
|
577
|
+
items: {
|
|
578
|
+
type: 'object',
|
|
579
|
+
properties: {
|
|
580
|
+
id: { type: 'string', description: 'ID unik tahap (misal: "step-1")' },
|
|
581
|
+
title: { type: 'string', description: 'Nama tahapan' },
|
|
582
|
+
objective: {
|
|
583
|
+
type: 'string',
|
|
584
|
+
description: 'Sasaran khusus yang harus dicapai pada langkah ini'
|
|
585
|
+
},
|
|
586
|
+
deliverable: {
|
|
587
|
+
type: 'string',
|
|
588
|
+
description: 'Keluaran konkret atau berkas bukti hasil pengerjaan tahap'
|
|
589
|
+
},
|
|
590
|
+
acceptanceCriteria: {
|
|
591
|
+
type: 'array',
|
|
592
|
+
items: { type: 'string' },
|
|
593
|
+
description: 'Kriteria kelayakan selesainya tahap ini'
|
|
594
|
+
}
|
|
595
|
+
},
|
|
596
|
+
required: ['id', 'title', 'objective', 'deliverable']
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
required: ['title', 'objective', 'steps'],
|
|
601
|
+
additionalProperties: false
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
type: 'function',
|
|
607
|
+
function: {
|
|
608
|
+
name: 'mark_done_task',
|
|
609
|
+
description:
|
|
610
|
+
'Menandai tahap aktif tugas alur kerja (Task Workflow) telah 100% selesai dan teruji secara final, menulis berkas deliverable artefak markdown (.md), dan memajukan alur kerja ke tahap berikutnya. DILARANG memanggil tool ini untuk menyimpan draf atau progress cicilan; panggil hanya TEPAT 1 KALI di akhir tahap.',
|
|
611
|
+
parameters: {
|
|
612
|
+
type: 'object',
|
|
613
|
+
properties: {
|
|
614
|
+
taskId: {
|
|
615
|
+
type: 'string',
|
|
616
|
+
description:
|
|
617
|
+
'ID unik alur kerja yang sedang berjalan (opsional jika alur kerja sedang aktif)'
|
|
618
|
+
},
|
|
619
|
+
stepIndex: {
|
|
620
|
+
type: 'integer',
|
|
621
|
+
description:
|
|
622
|
+
'Nomor indeks tahap yang diselesaikan (1-based, misal: 1 untuk tahap 1, 2 untuk tahap 2). Wajib diisi sesuai tahap yang dituntaskan.'
|
|
623
|
+
},
|
|
624
|
+
artifactContent: {
|
|
625
|
+
type: 'string',
|
|
626
|
+
description: 'Isi konten dokumen markdown (.md) deliverable hasil pengerjaan tahap ini'
|
|
627
|
+
},
|
|
628
|
+
verificationProof: {
|
|
629
|
+
type: 'string',
|
|
630
|
+
description:
|
|
631
|
+
'Bukti verifikasi dan hasil pengujian konkret bahwa deliverable tahap ini berfungsi dan memenuhi kriteria (misal: log hasil test terminal, verifikasi isi file, atau pemeriksaan sintaks). Wajib disertakan sebelum tahap ditandai selesai.'
|
|
632
|
+
},
|
|
633
|
+
summary: {
|
|
634
|
+
type: 'string',
|
|
635
|
+
description:
|
|
636
|
+
'Ringkasan apa yang telah diselesaikan pada tahap ini. Pada tahap terakhir alur kerja, parameter ini WAJIB memuat rangkuman menyeluruh dari awal hingga akhir proyek sebagai laporan penutup final untuk pengguna.'
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
required: ['stepIndex', 'artifactContent', 'verificationProof'],
|
|
640
|
+
additionalProperties: false
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
type: 'function',
|
|
646
|
+
function: {
|
|
647
|
+
name: 'read_task',
|
|
648
|
+
description:
|
|
649
|
+
'Membaca status alur kerja tugas (Task Workflow) dan isi artefak markdown dari tahap-tahap yang telah diselesaikan.',
|
|
650
|
+
parameters: {
|
|
651
|
+
type: 'object',
|
|
652
|
+
properties: {
|
|
653
|
+
taskId: { type: 'string', description: 'ID unik alur kerja yang ingin dibaca' },
|
|
654
|
+
stepIndex: {
|
|
655
|
+
type: 'integer',
|
|
656
|
+
description:
|
|
657
|
+
'Nomor indeks tahap yang ingin dibaca artefaknya (1-based, opsional. Jika kosong akan membaca seluruh ringkasan alur kerja)'
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
required: ['taskId'],
|
|
661
|
+
additionalProperties: false
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
type: 'function',
|
|
667
|
+
function: {
|
|
668
|
+
name: 'kill_subagent',
|
|
669
|
+
description: 'Menghentikan paksa eksekusi sub-agent yang sedang berjalan.',
|
|
670
|
+
parameters: {
|
|
671
|
+
type: 'object',
|
|
672
|
+
properties: {
|
|
673
|
+
subagent_id: { type: 'string', description: 'ID sub-agent yang akan dihentikan' },
|
|
674
|
+
reason: { type: 'string', description: 'Alasan penghentian' }
|
|
675
|
+
},
|
|
676
|
+
required: ['subagent_id'],
|
|
677
|
+
additionalProperties: false
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
]
|
|
682
|
+
|
|
683
|
+
// Injeksi parameter reason ke seluruh core tools agar model selalu memberikan alasan natural
|
|
684
|
+
for (const t of core_tools_schema) {
|
|
685
|
+
if (t.function?.parameters?.properties) {
|
|
686
|
+
if (!t.function.parameters.properties.reason) {
|
|
687
|
+
t.function.parameters.properties.reason = {
|
|
688
|
+
type: 'string',
|
|
689
|
+
description:
|
|
690
|
+
'Penjelasan ringkas dalam bahasa manusia mengenai alasan atau tujuan aksi ini (contoh: "Membuka tab Instagram di browser").'
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
if (Array.isArray(t.function.parameters.required)) {
|
|
694
|
+
if (!t.function.parameters.required.includes('reason')) {
|
|
695
|
+
t.function.parameters.required.push('reason')
|
|
696
|
+
}
|
|
697
|
+
} else {
|
|
698
|
+
t.function.parameters.required = ['reason']
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
// Legacy dictionary representation for backwards-compatibility
|
|
704
|
+
export const core_tools = core_tools_schema.reduce((acc, t) => {
|
|
705
|
+
acc[t.function.name] = t.function.description
|
|
706
|
+
return acc
|
|
707
|
+
}, {})
|