@props-labs/mesh-os 0.1.14 → 0.1.17
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/core/client.js +3 -5
- package/package.json +1 -1
package/dist/core/client.js
CHANGED
@@ -12,7 +12,7 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
12
12
|
const boxen_1 = __importDefault(require("boxen"));
|
13
13
|
const taxonomy_1 = require("./taxonomy");
|
14
14
|
// Constants
|
15
|
-
const SLUG_PATTERN = /^[a-
|
15
|
+
const SLUG_PATTERN = /^[a-zA-Z0-9_-]+$/;
|
16
16
|
/**
|
17
17
|
* GraphQL error class.
|
18
18
|
*/
|
@@ -100,8 +100,7 @@ class MeshOS {
|
|
100
100
|
*/
|
101
101
|
async registerAgent(name, description, metadata, slug) {
|
102
102
|
if (slug && !this.validateSlug(slug)) {
|
103
|
-
throw new InvalidSlugError("Slug must
|
104
|
-
"numbers, hyphens, and underscores");
|
103
|
+
throw new InvalidSlugError("Slug must contain only URL-safe characters (letters, numbers, hyphens, and underscores)");
|
105
104
|
}
|
106
105
|
// First check if agent with slug exists
|
107
106
|
if (slug) {
|
@@ -141,8 +140,7 @@ class MeshOS {
|
|
141
140
|
*/
|
142
141
|
async getAgentBySlug(slug) {
|
143
142
|
if (!this.validateSlug(slug)) {
|
144
|
-
throw new InvalidSlugError("Slug must
|
145
|
-
"numbers, hyphens, and underscores");
|
143
|
+
throw new InvalidSlugError("Slug must contain only URL-safe characters (letters, numbers, hyphens, and underscores)");
|
146
144
|
}
|
147
145
|
const query = `
|
148
146
|
query GetAgentBySlug($slug: String!) {
|