@easbot/agent 0.2.15 → 0.2.18
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/dist/assets/txt/tool/agent-client-chat.txt +59 -39
- package/dist/cli.cjs +322 -322
- package/dist/cli.mjs +317 -317
- package/dist/index.cjs +287 -287
- package/dist/index.d.cts +37 -37
- package/dist/index.d.ts +37 -37
- package/dist/index.mjs +290 -290
- package/package.json +12 -12
|
@@ -1,52 +1,72 @@
|
|
|
1
1
|
Manage a full-duplex conversation channel with another easbot agent endpoint.
|
|
2
|
-
Use this as the single tool for connect, list, capabilities, send, status, config, interrupt, and close.
|
|
2
|
+
Use this as the single tool for connect, list, discover, capabilities, send, status, config, interrupt, and close.
|
|
3
3
|
|
|
4
4
|
Inputs (kept minimal):
|
|
5
|
-
- operation: connect | list | capabilities | send | status | config | interrupt | close
|
|
6
|
-
- baseUrl: target easbot service base URL (required
|
|
7
|
-
- connectionId: local
|
|
8
|
-
- prompt: message to send (required
|
|
5
|
+
- operation: connect | list | discover | capabilities | send | status | config | interrupt | close
|
|
6
|
+
- baseUrl: target easbot service base URL (required for connect, e.g. http://localhost:3000)
|
|
7
|
+
- connectionId: local connection id (required for remote ops: capabilities/send/interrupt/close/status; auto-resolved from baseUrl if not provided)
|
|
8
|
+
- prompt: message to send (required for send)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
10
|
+
Operations:
|
|
11
|
+
1. connect: Create or reuse a remote session, bind to local connectionId
|
|
12
|
+
- Required: baseUrl (connectionId not needed)
|
|
13
|
+
- Returns: connectionId, sessionId, remoteAgentId, channel
|
|
14
|
+
- No service registration required; pure URL connection is supported
|
|
15
|
+
2. list: List all locally managed connections (active sessions)
|
|
16
|
+
- Returns: array of connection info with connectionId, baseUrl, sessionId, remoteAgentId
|
|
17
|
+
3. discover: Discover available agent services from registry
|
|
18
|
+
- Data sources: local config file (.easbot/agent-services.json), Config.Info.acp.clients, Gateway
|
|
19
|
+
- Returns: array of AgentServiceInfo { id, name, baseUrl, agentId, capabilities, status, metadata }
|
|
20
|
+
4. capabilities: Query remote agent capabilities (ACP initialize)
|
|
21
|
+
- Required: connectionId (auto-resolved from baseUrl)
|
|
22
|
+
- Returns: protocolVersion, agentCapabilities, authMethods
|
|
23
|
+
5. send: Push one message to remote session
|
|
24
|
+
- Required: connectionId, prompt
|
|
25
|
+
- Automatically establishes event subscription on first send
|
|
26
|
+
- Remote responses are injected into local SessionPrompt asynchronously
|
|
27
|
+
- Returns: pending round info (waiting for remote response)
|
|
28
|
+
6. status: Inspect local managed connection state
|
|
29
|
+
- Required: connectionId (auto-resolved from baseUrl)
|
|
30
|
+
- Returns: connection state including sessionId, baseUrl, remoteAgentId, channel
|
|
31
|
+
7. config: Inspect local agent client config and managed connections count
|
|
32
|
+
- Returns: acp config object and managedConnections count
|
|
33
|
+
8. interrupt: Cancel remote session and cleanup local interaction state
|
|
34
|
+
- Required: connectionId (auto-resolved from baseUrl)
|
|
35
|
+
- Sends interrupt signal to remote server, cancels subscription
|
|
36
|
+
- Use when you need to abort an ongoing interaction
|
|
37
|
+
9. close: Release local connection state and cleanup all interaction resources
|
|
38
|
+
- Required: connectionId (auto-resolved from baseUrl)
|
|
39
|
+
- Always call close when done to prevent resource leaks
|
|
40
|
+
|
|
41
|
+
Connection Flow:
|
|
42
|
+
1. connect + baseUrl → creates connection, returns connectionId
|
|
43
|
+
2. Other operations use connectionId → auto-resolved from baseUrl if not provided
|
|
44
|
+
3. If baseUrl provided but no connectionId, searches existing connections by baseUrl
|
|
45
|
+
4. If no matching connection found, connect operation is required first
|
|
46
|
+
5. Use discover to find available services before connecting
|
|
47
|
+
|
|
48
|
+
Local vs Remote Operations:
|
|
49
|
+
- Local (no remote RPC): config, list, discover
|
|
50
|
+
- Remote (requires connectionId after connect): capabilities, send, status, interrupt, close
|
|
26
51
|
|
|
27
52
|
Round Control:
|
|
28
53
|
- Each connection has a maximum of 10 interaction rounds by default
|
|
29
54
|
- One round = one question (send) + one answer (received response)
|
|
30
|
-
- When round limit is reached,
|
|
31
|
-
- Use `close`
|
|
32
|
-
|
|
33
|
-
Interrupt Signal:
|
|
34
|
-
- The tool automatically listens for abort signals from the local agent
|
|
35
|
-
- When the local agent is interrupted (e.g., user cancels), the tool will:
|
|
36
|
-
1. Send an interrupt signal to the remote server
|
|
37
|
-
2. Cancel the local subscription
|
|
38
|
-
3. Cleanup the interaction state
|
|
39
|
-
- You can also manually trigger interrupt using the `interrupt` operation
|
|
55
|
+
- When round limit is reached, subscription is automatically cancelled
|
|
56
|
+
- Use `close` to manually cleanup when interaction is complete
|
|
40
57
|
|
|
41
58
|
Returns:
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
59
|
+
- Standard tool result: { title, metadata: { count, ... }, output: JSON }
|
|
60
|
+
- connectionId: local connection identifier
|
|
61
|
+
- remote sessionId: remote session identifier
|
|
62
|
+
- subscription: automatically established on first send
|
|
46
63
|
- round info: completedRounds, pendingRound, maxRounds, remaining rounds
|
|
47
64
|
|
|
48
65
|
Notes:
|
|
49
|
-
-
|
|
50
|
-
- The tool
|
|
51
|
-
-
|
|
52
|
-
-
|
|
66
|
+
- Send without prior connect will fail with explicit error
|
|
67
|
+
- The tool automatically establishes subscription on first send
|
|
68
|
+
- Remote responses flow back via subscription into local conversation
|
|
69
|
+
- IMPORTANT: Always call `close` when interaction is complete to cleanup resources
|
|
70
|
+
- Use `interrupt` to abort an ongoing interaction before completion
|
|
71
|
+
- Pure URL connection: no service registration needed, just provide baseUrl
|
|
72
|
+
- Use discover to find available agent services before connecting
|