@omercnet/paseo-tell-agent 1.1.0 → 1.2.0-next.227.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/OVERVIEW.md +11 -0
- package/README.md +9 -1
- package/client/message-agent.tsx +5 -3
- package/client/messaging.ts +12 -5
- package/client/tell-command.ts +13 -3
- package/package.json +6 -5
- package/paseo-plugin.json +1 -1
package/OVERVIEW.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Tell Agent lets one agent pass a message to another agent on the same Paseo host. From an agent's composer, run `/tell [--interrupt] <agent or workspace> :: <message>`. The target matches an active agent's title or ID, or a project or workspace name, and the command fails if a name matches more than one agent. Running `/tell` with no arguments opens a panel for choosing a target and writing the message.
|
|
2
|
+
|
|
3
|
+
## How it works
|
|
4
|
+
|
|
5
|
+
The plugin does not write into the target's session. It asks the agent you are typing in (the source agent) to forward your message to the target, and the source agent carries that out. If the source agent is busy, the request is added to its running turn. Put `--interrupt` first to replace its current turn instead.
|
|
6
|
+
|
|
7
|
+
## Reads and sends
|
|
8
|
+
|
|
9
|
+
- Reads the titles, workspace and project names and IDs of agents on the host you are connected to.
|
|
10
|
+
- Sends your message and the target agent's ID to the source agent over the existing host connection.
|
|
11
|
+
- Only agents on the same host are reachable. It reads no files and contacts no other service.
|
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ Paseo 0.9 and 0.10 use the reviewed update flow to show the current and proposed
|
|
|
43
43
|
Run the slash command from an agent composer:
|
|
44
44
|
|
|
45
45
|
```text
|
|
46
|
-
/tell <agent or workspace> :: <message>
|
|
46
|
+
/tell [--interrupt] <agent or workspace> :: <message>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
For example:
|
|
@@ -58,6 +58,14 @@ The target can match an active agent's title or ID, or its project or workspace
|
|
|
58
58
|
|
|
59
59
|
The plugin asks the source agent to forward the message to the resolved target. The source agent remains responsible for executing that instruction; the plugin does not inject the text directly into the target session.
|
|
60
60
|
|
|
61
|
+
If the source agent is busy, `/tell` and the Tell agent panel send that instruction with `activeTurnBehavior: "steer"`. Paseo tries to add it to the running turn instead of interrupting it, and the agent picks it up at its next step, which can be after its current tool call finishes. Steering is best effort: Paseo still replaces the turn when the provider cannot steer. Put `--interrupt` first to replace the source agent's current turn instead:
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
/tell --interrupt Payments :: Stop and review the authentication change.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Either choice only applies to the source agent. Its later message to the target is a separate send and can still interrupt the target. Paseo 0.9 and later hosts accept both behaviors.
|
|
68
|
+
|
|
61
69
|
## Trust
|
|
62
70
|
|
|
63
71
|
Paseo plugins run as trusted, unsandboxed code. Installing this package trusts its code, dependencies, and future updates. Review the package and update preview before approving an installation or update.
|
package/client/message-agent.tsx
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
stateLabel,
|
|
19
19
|
title,
|
|
20
20
|
} from "./agents";
|
|
21
|
-
import { formatTellInstruction, messageTargets } from "./messaging";
|
|
21
|
+
import { formatTellInstruction, messageTargets, sourceSendOptions } from "./messaging";
|
|
22
22
|
import { handleTellCommand } from "./tell-command";
|
|
23
23
|
|
|
24
24
|
const VISIBLE_TARGETS = 8;
|
|
@@ -55,7 +55,9 @@ function MessageAgentForm({ sourceAgentId, theme, host, close }: MessageAgentFor
|
|
|
55
55
|
}, [targetId]);
|
|
56
56
|
const send = useMutation({
|
|
57
57
|
mutationFn: async ({ entry, text }: { entry: AgentEntry; text: string }) => {
|
|
58
|
-
await paseo.agents
|
|
58
|
+
await paseo.agents
|
|
59
|
+
.ref(sourceAgentId)
|
|
60
|
+
.send(formatTellInstruction(entry.agent.id, text), sourceSendOptions());
|
|
59
61
|
return entry;
|
|
60
62
|
},
|
|
61
63
|
onSuccess(entry) {
|
|
@@ -345,7 +347,7 @@ export function contributeAgentMessaging(client: PluginClientContext) {
|
|
|
345
347
|
const removeTellCommand = client.addSlashCommand({
|
|
346
348
|
name: "tell",
|
|
347
349
|
description: "Open the agent picker or message another session",
|
|
348
|
-
argumentHint: "[agent or workspace :: message]",
|
|
350
|
+
argumentHint: "[--interrupt] [agent or workspace :: message]",
|
|
349
351
|
context: "agent",
|
|
350
352
|
onSubmit: handleTellCommand,
|
|
351
353
|
});
|
package/client/messaging.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type AgentEntry, matches, title } from "./agents";
|
|
2
2
|
|
|
3
|
-
export type TellArguments = { target: string; message: string };
|
|
3
|
+
export type TellArguments = { target: string; message: string; interrupt: boolean };
|
|
4
|
+
|
|
5
|
+
// Best effort: the host may still replace the active turn when the provider cannot steer.
|
|
6
|
+
export function sourceSendOptions(interrupt = false) {
|
|
7
|
+
return { activeTurnBehavior: interrupt ? "interrupt" : "steer" } as const;
|
|
8
|
+
}
|
|
4
9
|
|
|
5
10
|
export type TargetResolution =
|
|
6
11
|
| { kind: "match"; entry: AgentEntry }
|
|
@@ -51,11 +56,13 @@ export function resolveMessageTarget(
|
|
|
51
56
|
}
|
|
52
57
|
|
|
53
58
|
export function parseTellArguments(args: string): TellArguments | null {
|
|
54
|
-
const
|
|
59
|
+
const flag = /^\s*--interrupt(?=\s)/.exec(args);
|
|
60
|
+
const rest = flag ? args.slice(flag[0].length) : args;
|
|
61
|
+
const separator = rest.indexOf("::");
|
|
55
62
|
if (separator < 1) return null;
|
|
56
|
-
const target =
|
|
57
|
-
const message =
|
|
58
|
-
return target && message ? { target, message } : null;
|
|
63
|
+
const target = rest.slice(0, separator).trim();
|
|
64
|
+
const message = rest.slice(separator + 2).trim();
|
|
65
|
+
return target && message ? { target, message, interrupt: Boolean(flag) } : null;
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
export function formatTellInstruction(targetAgentId: string, message: string): string {
|
package/client/tell-command.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { PluginAgentCommandContext } from "@getpaseo/plugin/client";
|
|
2
2
|
import { loadAgents, placement, title } from "./agents";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
formatTellInstruction,
|
|
5
|
+
parseTellArguments,
|
|
6
|
+
resolveMessageTarget,
|
|
7
|
+
sourceSendOptions,
|
|
8
|
+
} from "./messaging";
|
|
4
9
|
|
|
5
10
|
export async function handleTellCommand({
|
|
6
11
|
args,
|
|
@@ -14,7 +19,7 @@ export async function handleTellCommand({
|
|
|
14
19
|
}
|
|
15
20
|
const parsed = parseTellArguments(args);
|
|
16
21
|
if (!parsed) {
|
|
17
|
-
throw new Error("Usage: /tell <agent or workspace> :: <message>");
|
|
22
|
+
throw new Error("Usage: /tell [--interrupt] <agent or workspace> :: <message>");
|
|
18
23
|
}
|
|
19
24
|
const { entries } = await loadAgents(paseo);
|
|
20
25
|
const resolution = resolveMessageTarget(entries, agent.id, parsed.target);
|
|
@@ -29,5 +34,10 @@ export async function handleTellCommand({
|
|
|
29
34
|
throw new Error(`More than one agent matches “${parsed.target}”: ${examples}. Refine it.`);
|
|
30
35
|
}
|
|
31
36
|
const target = resolution.entry;
|
|
32
|
-
await paseo.agents
|
|
37
|
+
await paseo.agents
|
|
38
|
+
.ref(agent.id)
|
|
39
|
+
.send(
|
|
40
|
+
formatTellInstruction(target.agent.id, parsed.message),
|
|
41
|
+
sourceSendOptions(parsed.interrupt),
|
|
42
|
+
);
|
|
33
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omercnet/paseo-tell-agent",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-next.227.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Send messages to agents in other workspaces on the same Paseo host.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"client",
|
|
34
34
|
"paseo-plugin.json",
|
|
35
35
|
"README.md",
|
|
36
|
-
"LICENSE"
|
|
36
|
+
"LICENSE",
|
|
37
|
+
"OVERVIEW.md"
|
|
37
38
|
],
|
|
38
39
|
"scripts": {
|
|
39
40
|
"check": "biome check .",
|
|
@@ -43,9 +44,9 @@
|
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@biomejs/biome": "^2.5.10",
|
|
46
|
-
"@getpaseo/client": "0.
|
|
47
|
-
"@getpaseo/plugin": "0.
|
|
48
|
-
"@getpaseo/protocol": "0.
|
|
47
|
+
"@getpaseo/client": "0.11.0-beta.5",
|
|
48
|
+
"@getpaseo/plugin": "0.11.0-beta.5",
|
|
49
|
+
"@getpaseo/protocol": "0.11.0-beta.5",
|
|
49
50
|
"@tanstack/react-query": "^5.102.3",
|
|
50
51
|
"@types/node": "^24.10.1",
|
|
51
52
|
"@types/react": "^19.2.18",
|
package/paseo-plugin.json
CHANGED