@percher/shared 1.0.0 → 1.0.2
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/platform.d.ts
CHANGED
|
@@ -26,6 +26,6 @@ export declare const DEFAULT_MCP_HTTP_PORT = 8787;
|
|
|
26
26
|
* drifted to three different values (51/52/53), and one shipped artifact
|
|
27
27
|
* disagreed with itself on two lines.
|
|
28
28
|
*/
|
|
29
|
-
export declare const MCP_TOOL_COUNT_LOCAL =
|
|
30
|
-
export declare const MCP_TOOL_COUNT_HOSTED =
|
|
29
|
+
export declare const MCP_TOOL_COUNT_LOCAL = 54;
|
|
30
|
+
export declare const MCP_TOOL_COUNT_HOSTED = 23;
|
|
31
31
|
//# sourceMappingURL=platform.d.ts.map
|
package/dist/platform.js
CHANGED
|
@@ -26,6 +26,6 @@ export const DEFAULT_MCP_HTTP_PORT = 8787;
|
|
|
26
26
|
* drifted to three different values (51/52/53), and one shipped artifact
|
|
27
27
|
* disagreed with itself on two lines.
|
|
28
28
|
*/
|
|
29
|
-
export const MCP_TOOL_COUNT_LOCAL =
|
|
30
|
-
export const MCP_TOOL_COUNT_HOSTED =
|
|
29
|
+
export const MCP_TOOL_COUNT_LOCAL = 54;
|
|
30
|
+
export const MCP_TOOL_COUNT_HOSTED = 23;
|
|
31
31
|
//# sourceMappingURL=platform.js.map
|
package/dist/signup-invite.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/** Request header the signup form uses to carry the code through BetterAuth. */
|
|
12
12
|
export declare const SIGNUP_INVITE_HEADER = "x-percher-invite-code";
|
|
13
13
|
export declare const SIGNUP_INVITE_CODE_PREFIX = "beta-";
|
|
14
|
-
/**
|
|
14
|
+
/** Legacy code shape. Previously issued codes retain their exact hash. */
|
|
15
15
|
export declare const SIGNUP_INVITE_CODE_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
16
16
|
export declare const SIGNUP_INVITE_CODE_LENGTH = 24;
|
|
17
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signup-invite.d.ts","sourceRoot":"","sources":["../src/signup-invite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,eAAO,MAAM,yBAAyB,UAAU,CAAC;AAEjD,
|
|
1
|
+
{"version":3,"file":"signup-invite.d.ts","sourceRoot":"","sources":["../src/signup-invite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,eAAO,MAAM,yBAAyB,UAAU,CAAC;AAEjD,0EAA0E;AAC1E,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAClF,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAK5C;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAOvF"}
|
package/dist/signup-invite.js
CHANGED
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
/** Request header the signup form uses to carry the code through BetterAuth. */
|
|
12
12
|
export const SIGNUP_INVITE_HEADER = "x-percher-invite-code";
|
|
13
13
|
export const SIGNUP_INVITE_CODE_PREFIX = "beta-";
|
|
14
|
-
/**
|
|
14
|
+
/** Legacy code shape. Previously issued codes retain their exact hash. */
|
|
15
15
|
export const SIGNUP_INVITE_CODE_ALPHABET = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
16
16
|
export const SIGNUP_INVITE_CODE_LENGTH = 24;
|
|
17
17
|
const CODE_RE = /^beta-[a-z0-9]{24}$/;
|
|
18
|
+
const WORD_CODE_RE = /^beta[- ][a-z]{3,8}(?:[- ][a-z]{3,8}){3}$/;
|
|
18
19
|
/**
|
|
19
20
|
* Canonical form of a code as a user might have typed it: whitespace trimmed,
|
|
20
21
|
* case folded. Returns null for anything that is not shaped like a code, so
|
|
@@ -24,6 +25,10 @@ export function normalizeSignupInviteCode(raw) {
|
|
|
24
25
|
if (typeof raw !== "string")
|
|
25
26
|
return null;
|
|
26
27
|
const code = raw.trim().toLowerCase();
|
|
27
|
-
|
|
28
|
+
if (CODE_RE.test(code))
|
|
29
|
+
return code;
|
|
30
|
+
// Four complete words, with single spaces or hyphens as spoken separators.
|
|
31
|
+
// The private API owns the vocabulary; only a stored hash authorizes signup.
|
|
32
|
+
return WORD_CODE_RE.test(code) ? code.replaceAll(" ", "-") : null;
|
|
28
33
|
}
|
|
29
34
|
//# sourceMappingURL=signup-invite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signup-invite.js","sourceRoot":"","sources":["../src/signup-invite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,
|
|
1
|
+
{"version":3,"file":"signup-invite.js","sourceRoot":"","sources":["../src/signup-invite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,gFAAgF;AAChF,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,yBAAyB,GAAG,OAAO,CAAC;AAEjD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,2BAA2B,GAAG,sCAAsC,CAAC;AAClF,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,MAAM,OAAO,GAAG,qBAAqB,CAAC;AACtC,MAAM,YAAY,GAAG,2CAA2C,CAAC;AAEjE;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAA8B;IACtE,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACtC,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,2EAA2E;IAC3E,6EAA6E;IAC7E,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percher/shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Shared constants and contracts (timeouts, etc.) used across the Percher CLI, API, MCP, and worker. Internal — values change in lockstep across packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|