agent-relay-codex 0.4.17 → 0.4.19
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 +19 -0
- package/bin/agent-relay-codex.ts +32 -11
- package/package.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/skills/agent-relay/SKILL.md +7 -4
- package/plugin/skills/disconnect/SKILL.md +16 -0
- package/plugin/skills/label/SKILL.md +23 -0
- package/plugin/skills/message/SKILL.md +24 -0
- package/plugin/skills/pair/SKILL.md +26 -0
- package/plugin/skills/send-claimable/SKILL.md +24 -0
- package/plugin/skills/status/SKILL.md +16 -0
- package/plugin/skills/tags/SKILL.md +25 -0
package/README.md
CHANGED
|
@@ -134,6 +134,25 @@ agent-relay-codex uninstall --purge # also remove runtime state and PATH entrie
|
|
|
134
134
|
|
|
135
135
|
Message delivery adapts to thread state: `turn/start` when idle, `turn/steer` when active, `turn/interrupt` for urgent messages.
|
|
136
136
|
|
|
137
|
+
## Command Skills
|
|
138
|
+
|
|
139
|
+
The Codex plugin ships command skills for Agent Relay slash commands:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
/pair codex "Debug flaky tests"
|
|
143
|
+
/message codex "Can you look at that failing action?"
|
|
144
|
+
/send-claimable tag:backend "Please claim and fix the failing API test"
|
|
145
|
+
/disconnect
|
|
146
|
+
/status
|
|
147
|
+
/label backend-fixer
|
|
148
|
+
/tags backend tests urgent
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If another installed skill uses the same name, invoke the prefixed form such as
|
|
152
|
+
`/agent-relay:pair`, `/agent-relay:message`,
|
|
153
|
+
`/agent-relay:send-claimable`, `/agent-relay:disconnect`,
|
|
154
|
+
`/agent-relay:status`, `/agent-relay:label`, or `/agent-relay:tags`.
|
|
155
|
+
|
|
137
156
|
## Development
|
|
138
157
|
|
|
139
158
|
```bash
|
package/bin/agent-relay-codex.ts
CHANGED
|
@@ -118,7 +118,15 @@ function isAgentRelaySessionStartCommand(command: string): boolean {
|
|
|
118
118
|
return /agent-relay.*hooks\/session-start\.ts/.test(command);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
function
|
|
121
|
+
function isSessionStartGroupHeader(header: string | null | undefined): boolean {
|
|
122
|
+
return header?.trim() === "[[hooks.SessionStart]]";
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function isSessionStartHookHeader(header: string | null | undefined): boolean {
|
|
126
|
+
return header?.trim() === "[[hooks.SessionStart.hooks]]";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function removeAgentRelaySessionStartToml(input: string): string {
|
|
122
130
|
const lines = input.split(/\r?\n/);
|
|
123
131
|
const blocks: Array<{ header: string | null; text: string }> = [];
|
|
124
132
|
|
|
@@ -136,15 +144,26 @@ function removeAgentRelaySessionStartToml(input: string): string {
|
|
|
136
144
|
let output = "";
|
|
137
145
|
for (let index = 0; index < blocks.length; ) {
|
|
138
146
|
const block = blocks[index];
|
|
139
|
-
if (block?.header
|
|
140
|
-
const group
|
|
141
|
-
|
|
142
|
-
|
|
147
|
+
if (isSessionStartGroupHeader(block?.header)) {
|
|
148
|
+
const group = block!;
|
|
149
|
+
const hooks: typeof blocks = [];
|
|
150
|
+
index += 1;
|
|
151
|
+
while (index < blocks.length && isSessionStartHookHeader(blocks[index]?.header)) {
|
|
152
|
+
hooks.push(blocks[index]!);
|
|
143
153
|
index += 1;
|
|
144
154
|
}
|
|
145
155
|
|
|
146
|
-
const
|
|
147
|
-
|
|
156
|
+
const keptHooks = hooks.filter((hook) => !isAgentRelaySessionStartCommand(hook.text));
|
|
157
|
+
const groupIsAgentRelay = isAgentRelaySessionStartCommand(group.text) || (hooks.length > 0 && keptHooks.length === 0);
|
|
158
|
+
if (!groupIsAgentRelay || keptHooks.length > 0) {
|
|
159
|
+
output += `${group.text}\n`;
|
|
160
|
+
for (const hook of keptHooks) output += `${hook.text}\n`;
|
|
161
|
+
}
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (isSessionStartHookHeader(block?.header) && isAgentRelaySessionStartCommand(block?.text ?? "")) {
|
|
166
|
+
index += 1;
|
|
148
167
|
continue;
|
|
149
168
|
}
|
|
150
169
|
|
|
@@ -987,7 +1006,9 @@ async function main(): Promise<void> {
|
|
|
987
1006
|
return start(command ? [command, ...args] : []);
|
|
988
1007
|
}
|
|
989
1008
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1009
|
+
if (import.meta.main) {
|
|
1010
|
+
main().catch((error) => {
|
|
1011
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
1012
|
+
process.exit(1);
|
|
1013
|
+
});
|
|
1014
|
+
}
|
package/package.json
CHANGED
|
@@ -29,13 +29,16 @@ Targets can be an agent id, `broadcast`, `cap:<capability>`, `tag:<tag>`, or `la
|
|
|
29
29
|
Use pair sessions for focused, two-agent live collaboration. Pairing is exclusive: one agent can have only one pending or active pair.
|
|
30
30
|
|
|
31
31
|
When the user types a slash-style relay instruction such as `/pair codex`,
|
|
32
|
-
`/
|
|
33
|
-
`/
|
|
34
|
-
|
|
35
|
-
provider state in normal
|
|
32
|
+
`/message codex ...`, `/send-claimable tag:backend ...`, `/pair status`,
|
|
33
|
+
`/pair send <pair-id> ...`, `/disconnect`, `/status`, `/label ...`, or
|
|
34
|
+
`/tags ...`, run the matching `agent-relay` CLI command instead of explaining
|
|
35
|
+
the API. The CLI auto-detects the current agent id from provider state in normal
|
|
36
|
+
plugin installs.
|
|
36
37
|
|
|
37
38
|
```bash
|
|
38
39
|
agent-relay /pair codex "Debug flaky tests"
|
|
40
|
+
agent-relay /message codex "Can you look at that failing action?"
|
|
41
|
+
agent-relay /send-claimable tag:backend "Please claim and fix the failing API test"
|
|
39
42
|
agent-relay /pair status
|
|
40
43
|
agent-relay /pair send PAIR_ID "What do you see?"
|
|
41
44
|
agent-relay /disconnect
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: disconnect
|
|
3
|
+
description: End the current Agent Relay pair session. Use when the user invokes /disconnect or asks to hang up, unpair, or disconnect from a paired agent.
|
|
4
|
+
argument-hint: "[PAIR_ID]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Disconnect
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /disconnect $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
If no pair id is supplied, the CLI ends the active pair for this session. Report the result briefly.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: label
|
|
3
|
+
description: Read, set, or clear the current Agent Relay agent label. Use when the user invokes /label or asks to rename this relay agent.
|
|
4
|
+
argument-hint: "[LABEL|--clear]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Label
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /label $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agent-relay /label backend-fixer
|
|
20
|
+
agent-relay /label --clear
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Report the new label or current label briefly.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: message
|
|
3
|
+
description: Send a normal Agent Relay message to another agent, label, tag, capability, or broadcast target. Use when the user invokes /message or asks to send a one-off relay message.
|
|
4
|
+
argument-hint: "<target> <message> [--subject TEXT] [--channel NAME]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Message
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /message $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agent-relay /message codex "Can you look at that failing action?"
|
|
20
|
+
agent-relay /message tag:backend "Does anyone see the regression?"
|
|
21
|
+
agent-relay /message broadcast "Standup in five minutes"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Report the sent message id briefly.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pair
|
|
3
|
+
description: Start, inspect, accept, reject, or send messages in an Agent Relay two-agent pair session. Use when the user invokes /pair or asks to pair this agent with Codex, Claude, or another relay agent.
|
|
4
|
+
argument-hint: "<target|status|accept|reject|send> [args]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Pair
|
|
9
|
+
|
|
10
|
+
Run the Agent Relay CLI with the user's arguments:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /pair $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use this for pair-session commands such as:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agent-relay /pair codex "Debug flaky tests"
|
|
20
|
+
agent-relay /pair status
|
|
21
|
+
agent-relay /pair accept PAIR_ID
|
|
22
|
+
agent-relay /pair reject PAIR_ID
|
|
23
|
+
agent-relay /pair send PAIR_ID "What do you see?"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Report the command output briefly. If the CLI cannot detect this session's agent id, rerun with `--agent AGENT_ID` or `--from AGENT_ID` using the Agent Relay ID shown in session context.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: send-claimable
|
|
3
|
+
description: Send a claimable Agent Relay work item so one matching agent can claim and handle it. Use when the user invokes /send-claimable or wants to enqueue work for another agent.
|
|
4
|
+
argument-hint: "<target> <message> [--subject TEXT] [--channel NAME]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Send Claimable
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /send-claimable $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agent-relay /send-claimable codex "Claim this and inspect the failing action"
|
|
20
|
+
agent-relay /send-claimable tag:backend "Fix the failing API test"
|
|
21
|
+
agent-relay /send-claimable cap:review "Review the migration patch"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Report the sent claimable message id briefly.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: status
|
|
3
|
+
description: Show Agent Relay status for this session, including relay health, current agent id, label, tags, readiness, and active pair state. Use when the user invokes /status or asks for relay connection status.
|
|
4
|
+
argument-hint: "[--json]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Status
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /status $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Summarize the current relay connection, agent identity, label, tags, and active pair state.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tags
|
|
3
|
+
description: List or update Agent Relay tags for the current session. Use when the user invokes /tags or asks to set, add, remove, or inspect relay tags.
|
|
4
|
+
argument-hint: "[TAG ...|--list|--add TAGS|--remove TAGS]"
|
|
5
|
+
allowed-tools: [Bash]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Agent Relay Tags
|
|
9
|
+
|
|
10
|
+
Run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
agent-relay /tags $ARGUMENTS
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agent-relay /tags
|
|
20
|
+
agent-relay /tags backend tests urgent
|
|
21
|
+
agent-relay /tags --add backend,tests
|
|
22
|
+
agent-relay /tags --remove urgent
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Report the resulting tags briefly.
|