Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

#6434: keep wire.ts and package-format.ts under the 1,000-line cap

milind-soni1fad1ec07af4
diff --git a/packages/phone-protocol/src/wire.ts b/packages/phone-protocol/src/wire.ts
index 72e6c08b0b..98321ef86d 100644
--- a/packages/phone-protocol/src/wire.ts
+++ b/packages/phone-protocol/src/wire.ts
@@ -252,9 +252,7 @@ export interface ConnectorToolGrant {
/** Lowercased Composio service slug, e.g. `gmail`. */
export const CONNECTOR_SLUG_PATTERN = /^(?!__proto__$)[a-z0-9_][a-z0-9_-]{0,80}$/;
-/** Composio tool names are upper-snake, e.g. `GMAIL_SEND_EMAIL`. A toolkit
- * whose slug starts with `_` (such as `_1password`) names its tools the same
- * way: `_1PASSWORD_GET_ITEM`. */
+/** Composio tool names are upper-snake, e.g. `GMAIL_SEND_EMAIL`, or `_1PASSWORD_GET_ITEM` for a `_`-led toolkit. */
export const CONNECTOR_TOOL_NAME_PATTERN = /^(?:[A-Z][A-Z0-9_]{0,127}|_[A-Z0-9][A-Z0-9_]{0,126})$/;
/** Fails closed: only an absent switch or a strict true allows the helper model; a hand-edited "false" or 0 reads as never. */
diff --git a/shared/package-format.ts b/shared/package-format.ts
index f9c75dc29c..aded50c2f5 100644
--- a/shared/package-format.ts
+++ b/shared/package-format.ts
@@ -166,9 +166,7 @@ const playbookSchema = z.object({
});
const requirementsSchema = z.object({
apps: z.array(z.object({
- slug: requiredText(64).regex(/^(?!__proto__$)[a-z0-9_][a-z0-9_-]*$/, {
- message: "may only contain lowercase letters, numbers, - and _",
- }),
+ slug: requiredText(64).regex(/^(?!__proto__$)[a-z0-9_][a-z0-9_-]*$/, { message: "may only contain lowercase letters, numbers, - and _" }),
label: requiredText(100),
reason: requiredText(240),
optional: z.boolean().optional(),