relaymessenger 0.1.20-staging.0 → 0.1.20
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 +1 -1
- package/dist/agents.js +3 -3
- package/dist/connect.js +1 -1
- package/dist/interactive.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -340,7 +340,7 @@ relay agents create \
|
|
|
340
340
|
--image-url https://images.example.com/helper.png
|
|
341
341
|
```
|
|
342
342
|
|
|
343
|
-
A handle is one word, such as `my_helper`:
|
|
343
|
+
A handle is one word, such as `my_helper`: 2 to 32 lowercase letters, numbers
|
|
344
344
|
or underscores. A dotted handle is rejected, not
|
|
345
345
|
reinterpreted. Names are at most 30 characters. A collision is
|
|
346
346
|
an error, never a request for a different handle. Interactive creation asks `Handle (optional)`, `Name (optional)`, and `Image
|
package/dist/agents.js
CHANGED
|
@@ -52,8 +52,8 @@ const safeAPIFailure = (message, error) => error instanceof RelayAPIError
|
|
|
52
52
|
: error instanceof ConsoleRefusal ? new ConsoleRefusal(message, error.status, error.code) : new Error(message);
|
|
53
53
|
/** The handle a person asked for, checked before anything is created or asked. */
|
|
54
54
|
export const validateHandle = (handle) => {
|
|
55
|
-
if (!/^[a-z][a-z0-9_]{
|
|
56
|
-
throw new Error("A handle is one word using
|
|
55
|
+
if (!/^[a-z][a-z0-9_]{1,31}$/u.test(handle)) {
|
|
56
|
+
throw new Error("A handle is one word using 2–32 lowercase letters, numbers, or underscores.");
|
|
57
57
|
}
|
|
58
58
|
return handle;
|
|
59
59
|
};
|
|
@@ -137,7 +137,7 @@ export async function createAgent(input, deps) {
|
|
|
137
137
|
return safeMetadata({ profile, ...agentRecord(result.agent), share_url: savedAgentShareURL(apiURL, result.agent.handle), api_url: apiURL, token: "stored" }, [token]);
|
|
138
138
|
}
|
|
139
139
|
catch {
|
|
140
|
-
const rawHandle = typeof result.agent?.handle === "string" && /^[a-z][a-z0-9_]{
|
|
140
|
+
const rawHandle = typeof result.agent?.handle === "string" && /^[a-z][a-z0-9_]{1,31}(?:\.[a-z0-9][a-z0-9_-]{1,62})?$/u.test(result.agent.handle) ? result.agent.handle : "(unavailable)";
|
|
141
141
|
const assigned = safeMetadata(rawHandle, typeof result.token === "string" ? [result.token] : []);
|
|
142
142
|
let outcome = "Relay could not check whether its token was saved on this computer";
|
|
143
143
|
let present = false;
|
package/dist/connect.js
CHANGED
|
@@ -53,7 +53,7 @@ export const handleFromName = (name) => {
|
|
|
53
53
|
.replace(/_+$/u, "")
|
|
54
54
|
.slice(0, 32)
|
|
55
55
|
.replace(/_+$/u, "");
|
|
56
|
-
return body.length >=
|
|
56
|
+
return body.length >= 2 ? body : undefined;
|
|
57
57
|
};
|
|
58
58
|
/** The avatar's path when it is a PNG or JPEG that exists; undefined otherwise. */
|
|
59
59
|
export const avatarFile = (input, context) => {
|
package/dist/interactive.js
CHANGED
|
@@ -108,7 +108,7 @@ export async function chooseInteractiveCommand(entry, prefix, deps, ui) {
|
|
|
108
108
|
return chosen ? ["--profile", chosen.profile, "watch", chosen.handle] : undefined;
|
|
109
109
|
}
|
|
110
110
|
if (action === "create") {
|
|
111
|
-
ui.info("Press Enter to skip any of these. Enter the handle: one word,
|
|
111
|
+
ui.info("Press Enter to skip any of these. Enter the handle: one word, 2 to 32 lowercase letters, numbers or underscores. A picture can be a file on this computer or an https:// address.");
|
|
112
112
|
const chosenHandle = (await ui.text("Handle (optional)", "")).trim();
|
|
113
113
|
const displayName = (await ui.text("Name (optional)", "")).trim();
|
|
114
114
|
const image = (await ui.text("Image (optional)", "")).trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relaymessenger",
|
|
3
|
-
"version": "0.1.20
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"description": "Official command-line client for Relay v1 resources.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
32
32
|
"@anthropic-ai/claude-agent-sdk": "0.3.278",
|
|
33
33
|
"@clack/prompts": "1.8.1",
|
|
34
|
-
"@relaymessenger/pi": "0.1.9
|
|
35
|
-
"@relaymessenger/sdk": "0.5.3
|
|
34
|
+
"@relaymessenger/pi": "0.1.9",
|
|
35
|
+
"@relaymessenger/sdk": "0.5.3",
|
|
36
36
|
"@vercel/detect-agent": "1.2.5",
|
|
37
37
|
"commander": "^15.0.0",
|
|
38
38
|
"smol-toml": "^1.8.0",
|