@omercnet/paseo-tell-agent 1.1.0 → 1.2.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/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 +4 -4
- package/paseo-plugin.json +1 -1
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",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Send messages to agents in other workspaces on the same Paseo host.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@biomejs/biome": "^2.5.10",
|
|
46
|
-
"@getpaseo/client": "0.
|
|
47
|
-
"@getpaseo/plugin": "0.
|
|
48
|
-
"@getpaseo/protocol": "0.
|
|
46
|
+
"@getpaseo/client": "0.11.0-beta.3",
|
|
47
|
+
"@getpaseo/plugin": "0.11.0-beta.3",
|
|
48
|
+
"@getpaseo/protocol": "0.11.0-beta.3",
|
|
49
49
|
"@tanstack/react-query": "^5.102.3",
|
|
50
50
|
"@types/node": "^24.10.1",
|
|
51
51
|
"@types/react": "^19.2.18",
|
package/paseo-plugin.json
CHANGED