@kendoo.agentdesk/agentdesk 0.11.0 → 0.11.2
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/bin/agentdesk.mjs +10 -3
- package/cli/prompt.mjs +13 -0
- package/package.json +1 -1
package/bin/agentdesk.mjs
CHANGED
|
@@ -181,10 +181,17 @@ else if (command === "daemon") {
|
|
|
181
181
|
|
|
182
182
|
else if (command === "update") {
|
|
183
183
|
const { execSync } = await import("child_process");
|
|
184
|
-
|
|
184
|
+
const currentVersion = pkg.version;
|
|
185
|
+
console.log(`\n Current version: ${currentVersion}`);
|
|
185
186
|
try {
|
|
186
|
-
execSync(`npm
|
|
187
|
-
|
|
187
|
+
const latest = execSync(`npm view ${pkg.name} version`, { encoding: "utf-8" }).trim();
|
|
188
|
+
if (latest === currentVersion) {
|
|
189
|
+
console.log(` Already up to date.\n`);
|
|
190
|
+
} else {
|
|
191
|
+
console.log(` Updating to ${latest}...\n`);
|
|
192
|
+
execSync(`npm i -g ${pkg.name}@latest`, { stdio: "inherit" });
|
|
193
|
+
console.log(`\n Updated: ${currentVersion} → ${latest}\n`);
|
|
194
|
+
}
|
|
188
195
|
} catch {
|
|
189
196
|
console.error(`\n Update failed. Try manually: npm i -g ${pkg.name}@latest\n`);
|
|
190
197
|
process.exit(1);
|
package/cli/prompt.mjs
CHANGED
|
@@ -76,6 +76,11 @@ export function buildPrompt({ taskId, taskLink, description, createTask, tracker
|
|
|
76
76
|
prompt = prompt.replace(/\{\{JIRA_BASE_URL\}\}/g, config.jira.baseUrl);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
// Explicit tracker lock — prevent the agent from switching to another tracker
|
|
80
|
+
if (tracker) {
|
|
81
|
+
prompt += `\n\n## TRACKER LOCK\n\nThis project is configured to use **${tracker.toUpperCase()}** as its tracker. Do NOT attempt to use any other tracker (Linear, GitHub, Jira, etc.) even if the API returns errors. If the ${tracker} API fails, troubleshoot the ${tracker} credentials and permissions — do not switch to a different tracker.\n`;
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
// Append custom instructions from config
|
|
80
85
|
if (config.instructions) {
|
|
81
86
|
prompt += `\n\n## ADDITIONAL INSTRUCTIONS\n\n${config.instructions}\n`;
|
|
@@ -138,6 +143,14 @@ export function buildSoloPrompt({ agentName, taskId, description, tracker, confi
|
|
|
138
143
|
|
|
139
144
|
// Extract and include tracker integration from team prompt
|
|
140
145
|
if (tracker) {
|
|
146
|
+
// Explicit tracker lock
|
|
147
|
+
lines.push(
|
|
148
|
+
`## Tracker: ${tracker.toUpperCase()}`,
|
|
149
|
+
``,
|
|
150
|
+
`This project uses **${tracker}** as its tracker. Do NOT attempt to use any other tracker even if the API returns errors. If ${tracker} fails, troubleshoot credentials and permissions — do not switch to a different tracker.`,
|
|
151
|
+
``,
|
|
152
|
+
);
|
|
153
|
+
|
|
141
154
|
let teamPrompt = readFileSync(PROMPT_PATH, "utf-8");
|
|
142
155
|
|
|
143
156
|
// Extract the matching tracker block
|