@friendlyrobot/discord-pi-agent 0.1.0 → 0.1.1
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/README.md +4 -4
- package/dist/index.js +10 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,10 +11,10 @@ Reusable Discord DM bridge for persistent pi agent sessions.
|
|
|
11
11
|
- exposes built-in session commands
|
|
12
12
|
|
|
13
13
|
## Built-in commands
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
14
|
+
- `!help`
|
|
15
|
+
- `!status`
|
|
16
|
+
- `!compact`
|
|
17
|
+
- `!reset-session`
|
|
18
18
|
|
|
19
19
|
Any other DM text is sent to the persistent agent session.
|
|
20
20
|
|
package/dist/index.js
CHANGED
|
@@ -306,24 +306,24 @@ import {
|
|
|
306
306
|
// src/commands.ts
|
|
307
307
|
async function handleCommand(input, agentService, promptQueue) {
|
|
308
308
|
const trimmed = input.trim();
|
|
309
|
-
if (!trimmed.startsWith("
|
|
309
|
+
if (!trimmed.startsWith("!")) {
|
|
310
310
|
return { handled: false };
|
|
311
311
|
}
|
|
312
|
-
if (trimmed === "
|
|
312
|
+
if (trimmed === "!help") {
|
|
313
313
|
return {
|
|
314
314
|
handled: true,
|
|
315
315
|
response: [
|
|
316
316
|
"Commands:",
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
"
|
|
320
|
-
"
|
|
317
|
+
"!help - show this message",
|
|
318
|
+
"!status - show current session status",
|
|
319
|
+
"!compact - compact the persistent session",
|
|
320
|
+
"!reset-session - start a fresh persistent session",
|
|
321
321
|
"Any other DM text goes to the persistent agent session."
|
|
322
322
|
].join(`
|
|
323
323
|
`)
|
|
324
324
|
};
|
|
325
325
|
}
|
|
326
|
-
if (trimmed === "
|
|
326
|
+
if (trimmed === "!status") {
|
|
327
327
|
const agentStatus = agentService.getStatus();
|
|
328
328
|
const queueStatus = promptQueue.getSnapshot();
|
|
329
329
|
return {
|
|
@@ -339,7 +339,7 @@ async function handleCommand(input, agentService, promptQueue) {
|
|
|
339
339
|
`)
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
if (trimmed === "
|
|
342
|
+
if (trimmed === "!compact") {
|
|
343
343
|
return {
|
|
344
344
|
handled: true,
|
|
345
345
|
response: await promptQueue.enqueue(async () => {
|
|
@@ -347,7 +347,7 @@ async function handleCommand(input, agentService, promptQueue) {
|
|
|
347
347
|
})
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
if (trimmed === "
|
|
350
|
+
if (trimmed === "!reset-session") {
|
|
351
351
|
return {
|
|
352
352
|
handled: true,
|
|
353
353
|
response: await promptQueue.enqueue(async () => {
|
|
@@ -357,7 +357,7 @@ async function handleCommand(input, agentService, promptQueue) {
|
|
|
357
357
|
}
|
|
358
358
|
return {
|
|
359
359
|
handled: true,
|
|
360
|
-
response: `Unknown command: ${trimmed}. Try
|
|
360
|
+
response: `Unknown command: ${trimmed}. Try !help.`
|
|
361
361
|
};
|
|
362
362
|
}
|
|
363
363
|
|