@kendoo.agentdesk/agentdesk 0.6.4 → 0.6.6
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/cli/login.mjs +5 -5
- package/cli/team.mjs +3 -1
- package/package.json +1 -1
- package/prompts/team.md +7 -0
package/cli/login.mjs
CHANGED
|
@@ -104,8 +104,8 @@ export async function runLogin() {
|
|
|
104
104
|
|
|
105
105
|
if (apiKey) {
|
|
106
106
|
// Save credentials
|
|
107
|
-
if (!existsSync(CONFIG_DIR)) mkdirSync(CONFIG_DIR, { recursive: true });
|
|
108
|
-
writeFileSync(CREDENTIALS_PATH, JSON.stringify({ apiKey, name, savedAt: Date.now() }, null, 2));
|
|
107
|
+
if (!existsSync(CONFIG_DIR)) mkdirSync(CONFIG_DIR, { recursive: true, mode: 0o700 });
|
|
108
|
+
writeFileSync(CREDENTIALS_PATH, JSON.stringify({ apiKey, name, savedAt: Date.now() }, null, 2), { mode: 0o600 });
|
|
109
109
|
|
|
110
110
|
res.writeHead(200, { "Content-Type": "text/html" });
|
|
111
111
|
res.end(`<html><body style="background:#0f172a;color:#e2e8f0;font-family:system-ui;display:flex;align-items:center;justify-content:center;height:100vh;margin:0"><div style="text-align:center"><h2 style="color:#2dd4bf">Logged in to AgentDesk</h2><p>You can close this tab and return to your terminal.</p></div></body></html>`);
|
|
@@ -145,11 +145,11 @@ export async function runLogin() {
|
|
|
145
145
|
console.log("");
|
|
146
146
|
console.log(" Waiting for authentication...");
|
|
147
147
|
|
|
148
|
-
// Open browser
|
|
149
|
-
const {
|
|
148
|
+
// Open browser (use execFile to avoid shell injection)
|
|
149
|
+
const { execFile } = await import("child_process");
|
|
150
150
|
const platform = process.platform;
|
|
151
151
|
const cmd = platform === "darwin" ? "open" : platform === "win32" ? "start" : "xdg-open";
|
|
152
|
-
|
|
152
|
+
execFile(cmd, [loginUrl], () => {});
|
|
153
153
|
|
|
154
154
|
// Timeout after 5 minutes
|
|
155
155
|
setTimeout(() => {
|
package/cli/team.mjs
CHANGED
|
@@ -158,9 +158,11 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
158
158
|
const AGENTDESK_URL = process.env.AGENTDESK_URL || "wss://agentdesk.live/ws/agent";
|
|
159
159
|
const sessionId = `${taskId}-${randomUUID().slice(0, 8)}`;
|
|
160
160
|
const inboxUrl = `${agentdeskServer}/api/sessions/${sessionId}/inbox`;
|
|
161
|
+
const sessionUrl = `${agentdeskServer}/sessions/${sessionId}`;
|
|
161
162
|
|
|
162
|
-
// Inject
|
|
163
|
+
// Inject URLs into prompt
|
|
163
164
|
prompt = prompt.replace(/\{\{AGENTDESK_INBOX_URL\}\}/g, inboxUrl);
|
|
165
|
+
prompt = prompt.replace(/\{\{SESSION_URL\}\}/g, sessionUrl);
|
|
164
166
|
|
|
165
167
|
// Merge declared agents from config into project for context generation
|
|
166
168
|
if (config.projectAgents?.length) {
|
package/package.json
CHANGED
package/prompts/team.md
CHANGED
|
@@ -274,8 +274,11 @@ Post updates as comments on the Linear task using this format:
|
|
|
274
274
|
■■ DENNIS ■■
|
|
275
275
|
Status : [status]
|
|
276
276
|
Task : [description]
|
|
277
|
+
Session : {{SESSION_URL}}
|
|
277
278
|
---
|
|
278
279
|
```
|
|
280
|
+
|
|
281
|
+
IMPORTANT: The first comment on any task MUST include the session link: {{SESSION_URL}}
|
|
279
282
|
{{/LINEAR}}
|
|
280
283
|
|
|
281
284
|
{{#JIRA}}
|
|
@@ -289,6 +292,8 @@ Fetch the task from Jira using curl:
|
|
|
289
292
|
Post updates as comments on the Jira task:
|
|
290
293
|
- Endpoint: {{JIRA_BASE_URL}}/rest/api/3/issue/{{TASK_ID}}/comment
|
|
291
294
|
- Body: { "body": { "type": "doc", "version": 1, "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "..." }] }] } }
|
|
295
|
+
|
|
296
|
+
IMPORTANT: The first comment on any task MUST include the session link: {{SESSION_URL}}
|
|
292
297
|
{{/JIRA}}
|
|
293
298
|
|
|
294
299
|
{{#GITHUB}}
|
|
@@ -299,6 +304,8 @@ Fetch the task from GitHub Issues:
|
|
|
299
304
|
|
|
300
305
|
Post updates as comments:
|
|
301
306
|
- Run: gh issue comment {{TASK_ID}} --body "..."
|
|
307
|
+
|
|
308
|
+
IMPORTANT: The first comment on any task MUST include the session link: {{SESSION_URL}}
|
|
302
309
|
{{/GITHUB}}
|
|
303
310
|
|
|
304
311
|
---
|