@percher/shared 0.1.5 → 0.1.7

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/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export { APP_NAME_RE } from "./app-name.js";
2
- export { MAX_TARBALL_BYTES } from "./limits.js";
2
+ export { INTERNAL_SIG_HEADER, INTERNAL_SIG_MAX_SKEW_MS, INTERNAL_SIG_VERSION, INTERNAL_TS_HEADER, type InternalSigParts, internalSigPayload, } from "./internal-sig.js";
3
+ export { MAX_INLINE_PUBLISH_BYTES, MAX_OPEN_UPLOAD_SESSIONS_PER_USER, MAX_TARBALL_BYTES, MAX_UPLOAD_CHUNK_BYTES, MAX_UPLOAD_SESSION_FILES, MIN_UPLOAD_CHUNK_BYTES, UPLOAD_SESSION_MAX_LIFETIME_MS, UPLOAD_SESSION_TTL_MS, } from "./limits.js";
3
4
  export { MAX_LOG_SEARCH_LENGTH } from "./logs.js";
5
+ export { DEFAULT_DOMAIN_SUFFIX, DEFAULT_MCP_HTTP_PORT, DEFAULT_POCKETBASE_IMAGE, } from "./platform.js";
4
6
  export { canonicalInjectedKey, isPercherInjected, PERCHER_INJECTED_ENV_KEYS, } from "./platform-env.js";
5
7
  export { DEFAULT_NODE_VERSION_LABEL, DEFAULT_NODE_VERSION_MAJOR } from "./runtime.js";
6
8
  export { TIMEOUTS, type TimeoutKey } from "./timeouts.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,iCAAiC,EACjC,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export { APP_NAME_RE } from "./app-name.js";
2
- export { MAX_TARBALL_BYTES } from "./limits.js";
2
+ export { INTERNAL_SIG_HEADER, INTERNAL_SIG_MAX_SKEW_MS, INTERNAL_SIG_VERSION, INTERNAL_TS_HEADER, internalSigPayload, } from "./internal-sig.js";
3
+ export { MAX_INLINE_PUBLISH_BYTES, MAX_OPEN_UPLOAD_SESSIONS_PER_USER, MAX_TARBALL_BYTES, MAX_UPLOAD_CHUNK_BYTES, MAX_UPLOAD_SESSION_FILES, MIN_UPLOAD_CHUNK_BYTES, UPLOAD_SESSION_MAX_LIFETIME_MS, UPLOAD_SESSION_TTL_MS, } from "./limits.js";
3
4
  export { MAX_LOG_SEARCH_LENGTH } from "./logs.js";
5
+ export { DEFAULT_DOMAIN_SUFFIX, DEFAULT_MCP_HTTP_PORT, DEFAULT_POCKETBASE_IMAGE, } from "./platform.js";
4
6
  export { canonicalInjectedKey, isPercherInjected, PERCHER_INJECTED_ENV_KEYS, } from "./platform-env.js";
5
7
  export { DEFAULT_NODE_VERSION_LABEL, DEFAULT_NODE_VERSION_MAJOR } from "./runtime.js";
6
8
  export { TIMEOUTS } from "./timeouts.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAElB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,iCAAiC,EACjC,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Wire contract for X-Internal-Secret HMAC request signing.
3
+ *
4
+ * The legacy scheme sends the shared internal secret verbatim in a header, so a
5
+ * single captured/logged request grants every `/internal/*` endpoint forever.
6
+ * Signing binds a credential to one (method, path, body, timestamp): a captured
7
+ * request can't be replayed against a different endpoint or outside the skew
8
+ * window, and the raw secret never has to ride on the wire once enforce is on.
9
+ *
10
+ * This module is the single source of truth for the canonical string both sides
11
+ * HMAC, so the API verifier and every signer (the dashboard today; the external
12
+ * CLABBE runner per docs/integrations/CLABBE_SECURITY_INGEST.md) can't drift. It
13
+ * is dependency-free on purpose — no crypto here — so it bundles cleanly into the
14
+ * dashboard (Node) as well as the API (Bun). Each side wraps it with its own
15
+ * `node:crypto` HMAC.
16
+ */
17
+ /** Hex HMAC-SHA256 of {@link internalSigPayload}, keyed with the shared secret. */
18
+ export declare const INTERNAL_SIG_HEADER = "X-Internal-Signature";
19
+ /** Unix-epoch milliseconds (as a decimal string) the signature was minted at. */
20
+ export declare const INTERNAL_TS_HEADER = "X-Internal-Timestamp";
21
+ /** Reject a signed request whose timestamp is more than this far from now. */
22
+ export declare const INTERNAL_SIG_MAX_SKEW_MS = 300000;
23
+ /** Canonical-form version. Bumps if the payload shape changes; a verifier can
24
+ * refuse a version it doesn't understand rather than mis-compare. */
25
+ export declare const INTERNAL_SIG_VERSION = "v1";
26
+ export interface InternalSigParts {
27
+ /** HTTP method, case-insensitive — normalized to upper-case in the payload. */
28
+ method: string;
29
+ /** Request path WITHOUT query string, exactly as it appears on the wire
30
+ * (already-percent-encoded; sign what you send). */
31
+ path: string;
32
+ /** The value placed in {@link INTERNAL_TS_HEADER}. Stringified verbatim so the
33
+ * verifier signs the exact header bytes — no Number round-trip. */
34
+ timestamp: number | string;
35
+ /** Lower-case hex SHA-256 of the raw request body ("" body → sha256 of ""). */
36
+ bodyHash: string;
37
+ }
38
+ /** The exact string both the signer and verifier feed to HMAC-SHA256. */
39
+ export declare function internalSigPayload(parts: InternalSigParts): string;
40
+ //# sourceMappingURL=internal-sig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-sig.d.ts","sourceRoot":"","sources":["../src/internal-sig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAC1D,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,SAAU,CAAC;AAEhD;sEACsE;AACtE,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf;yDACqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb;wEACoE;IACpE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,yEAAyE;AACzE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAQlE"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Wire contract for X-Internal-Secret HMAC request signing.
3
+ *
4
+ * The legacy scheme sends the shared internal secret verbatim in a header, so a
5
+ * single captured/logged request grants every `/internal/*` endpoint forever.
6
+ * Signing binds a credential to one (method, path, body, timestamp): a captured
7
+ * request can't be replayed against a different endpoint or outside the skew
8
+ * window, and the raw secret never has to ride on the wire once enforce is on.
9
+ *
10
+ * This module is the single source of truth for the canonical string both sides
11
+ * HMAC, so the API verifier and every signer (the dashboard today; the external
12
+ * CLABBE runner per docs/integrations/CLABBE_SECURITY_INGEST.md) can't drift. It
13
+ * is dependency-free on purpose — no crypto here — so it bundles cleanly into the
14
+ * dashboard (Node) as well as the API (Bun). Each side wraps it with its own
15
+ * `node:crypto` HMAC.
16
+ */
17
+ /** Hex HMAC-SHA256 of {@link internalSigPayload}, keyed with the shared secret. */
18
+ export const INTERNAL_SIG_HEADER = "X-Internal-Signature";
19
+ /** Unix-epoch milliseconds (as a decimal string) the signature was minted at. */
20
+ export const INTERNAL_TS_HEADER = "X-Internal-Timestamp";
21
+ /** Reject a signed request whose timestamp is more than this far from now. */
22
+ export const INTERNAL_SIG_MAX_SKEW_MS = 300_000;
23
+ /** Canonical-form version. Bumps if the payload shape changes; a verifier can
24
+ * refuse a version it doesn't understand rather than mis-compare. */
25
+ export const INTERNAL_SIG_VERSION = "v1";
26
+ /** The exact string both the signer and verifier feed to HMAC-SHA256. */
27
+ export function internalSigPayload(parts) {
28
+ return [
29
+ INTERNAL_SIG_VERSION,
30
+ parts.method.toUpperCase(),
31
+ parts.path,
32
+ String(parts.timestamp),
33
+ parts.bodyHash,
34
+ ].join("\n");
35
+ }
36
+ //# sourceMappingURL=internal-sig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-sig.js","sourceRoot":"","sources":["../src/internal-sig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,mFAAmF;AACnF,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAC1D,iFAAiF;AACjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;AAEhD;sEACsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAezC,yEAAyE;AACzE,MAAM,UAAU,kBAAkB,CAAC,KAAuB;IACxD,OAAO;QACL,oBAAoB;QACpB,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE;QAC1B,KAAK,CAAC,IAAI;QACV,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;QACvB,KAAK,CAAC,QAAQ;KACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
package/dist/limits.d.ts CHANGED
@@ -6,4 +6,50 @@
6
6
  * extractor, which guards against zip bombs.
7
7
  */
8
8
  export declare const MAX_TARBALL_BYTES: number;
9
+ /**
10
+ * Max accepted inline-source publish size in bytes (25 MB) — the sum of
11
+ * the decoded `content` bytes an assistant passes to `percher_publish` /
12
+ * `POST /apps/publish`. Much tighter than {@link MAX_TARBALL_BYTES}
13
+ * because inline source is small, hand-authored, and arrives as an
14
+ * untrusted tool argument (no `.gitignore`, no node_modules). Enforced
15
+ * BEFORE buffering on the curated publish endpoint (413 if over) and
16
+ * mirrored in the hosted `percher_publish` tool guard so an agent gets a
17
+ * clear "this is too large — use the connected-repo path" message before
18
+ * any upload. Large apps belong on the connected-repo deploy path
19
+ * (`percher_deploy`), not inline.
20
+ */
21
+ export declare const MAX_INLINE_PUBLISH_BYTES: number;
22
+ /**
23
+ * Chunked inline upload (publish sessions) — the multi-call variant of
24
+ * inline publish for apps too large to travel in ONE model-generated
25
+ * tool call (~100 KB practical per-turn ceiling). Bytes move as
26
+ * hash-verified chunks into a staging session; commit re-enters the
27
+ * standard inline-publish path.
28
+ */
29
+ /** Max RAW (decoded) bytes per uploaded chunk. Clients default lower
30
+ * (32 KB) and shrink on repeated hash mismatches; the server rejects
31
+ * anything over this cap. */
32
+ export declare const MAX_UPLOAD_CHUNK_BYTES: number;
33
+ /** Min RAW bytes per uploaded chunk, EXCEPT the final piece of a file.
34
+ * Enforced server-side because tiny chunks are a death spiral for the
35
+ * model-text transport (live dogfood 2026-07-08: an agent shrank
36
+ * 8→4→2 KB after one mismatch and hit the per-message output ceiling
37
+ * before finishing): every extra call costs a full model turn AND all
38
+ * payloads count against ONE assistant message's max length. */
39
+ export declare const MIN_UPLOAD_CHUNK_BYTES: number;
40
+ /** Idle TTL for an open upload session — refreshed on every accepted
41
+ * chunk, so it measures INACTIVITY, not total duration. Live dogfood
42
+ * 2026-07-08: a fixed 1 h total expired twice mid-upload because the
43
+ * chat channel's real cadence includes approval prompts, max-length
44
+ * "Continue" pauses, and the human walking away. */
45
+ export declare const UPLOAD_SESSION_TTL_MS: number;
46
+ /** Absolute cap on an upload session's lifetime from creation — bounds
47
+ * the rolling idle-refresh so periodically-pinged sessions can't hold
48
+ * staged bytes forever. */
49
+ export declare const UPLOAD_SESSION_MAX_LIFETIME_MS: number;
50
+ /** Max simultaneously-open upload sessions per user. A session stages up
51
+ * to MAX_INLINE_PUBLISH_BYTES, so this bounds per-user staged bytes. */
52
+ export declare const MAX_OPEN_UPLOAD_SESSIONS_PER_USER = 2;
53
+ /** Max files a single upload-session manifest may declare. */
54
+ export declare const MAX_UPLOAD_SESSION_FILES = 400;
9
55
  //# sourceMappingURL=limits.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QAAoB,CAAC"}
1
+ {"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,QAAoB,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,QAAmB,CAAC;AAEzD;;;;;;GAMG;AAEH;;8BAE8B;AAC9B,eAAO,MAAM,sBAAsB,QAAY,CAAC;AAEhD;;;;;iEAKiE;AACjE,eAAO,MAAM,sBAAsB,QAAY,CAAC;AAEhD;;;;qDAIqD;AACrD,eAAO,MAAM,qBAAqB,QAAqB,CAAC;AAExD;;4BAE4B;AAC5B,eAAO,MAAM,8BAA8B,QAAsB,CAAC;AAElE;yEACyE;AACzE,eAAO,MAAM,iCAAiC,IAAI,CAAC;AAEnD,8DAA8D;AAC9D,eAAO,MAAM,wBAAwB,MAAM,CAAC"}
package/dist/limits.js CHANGED
@@ -6,4 +6,50 @@
6
6
  * extractor, which guards against zip bombs.
7
7
  */
8
8
  export const MAX_TARBALL_BYTES = 500 * 1024 * 1024;
9
+ /**
10
+ * Max accepted inline-source publish size in bytes (25 MB) — the sum of
11
+ * the decoded `content` bytes an assistant passes to `percher_publish` /
12
+ * `POST /apps/publish`. Much tighter than {@link MAX_TARBALL_BYTES}
13
+ * because inline source is small, hand-authored, and arrives as an
14
+ * untrusted tool argument (no `.gitignore`, no node_modules). Enforced
15
+ * BEFORE buffering on the curated publish endpoint (413 if over) and
16
+ * mirrored in the hosted `percher_publish` tool guard so an agent gets a
17
+ * clear "this is too large — use the connected-repo path" message before
18
+ * any upload. Large apps belong on the connected-repo deploy path
19
+ * (`percher_deploy`), not inline.
20
+ */
21
+ export const MAX_INLINE_PUBLISH_BYTES = 25 * 1024 * 1024;
22
+ /**
23
+ * Chunked inline upload (publish sessions) — the multi-call variant of
24
+ * inline publish for apps too large to travel in ONE model-generated
25
+ * tool call (~100 KB practical per-turn ceiling). Bytes move as
26
+ * hash-verified chunks into a staging session; commit re-enters the
27
+ * standard inline-publish path.
28
+ */
29
+ /** Max RAW (decoded) bytes per uploaded chunk. Clients default lower
30
+ * (32 KB) and shrink on repeated hash mismatches; the server rejects
31
+ * anything over this cap. */
32
+ export const MAX_UPLOAD_CHUNK_BYTES = 64 * 1024;
33
+ /** Min RAW bytes per uploaded chunk, EXCEPT the final piece of a file.
34
+ * Enforced server-side because tiny chunks are a death spiral for the
35
+ * model-text transport (live dogfood 2026-07-08: an agent shrank
36
+ * 8→4→2 KB after one mismatch and hit the per-message output ceiling
37
+ * before finishing): every extra call costs a full model turn AND all
38
+ * payloads count against ONE assistant message's max length. */
39
+ export const MIN_UPLOAD_CHUNK_BYTES = 16 * 1024;
40
+ /** Idle TTL for an open upload session — refreshed on every accepted
41
+ * chunk, so it measures INACTIVITY, not total duration. Live dogfood
42
+ * 2026-07-08: a fixed 1 h total expired twice mid-upload because the
43
+ * chat channel's real cadence includes approval prompts, max-length
44
+ * "Continue" pauses, and the human walking away. */
45
+ export const UPLOAD_SESSION_TTL_MS = 6 * 60 * 60 * 1000;
46
+ /** Absolute cap on an upload session's lifetime from creation — bounds
47
+ * the rolling idle-refresh so periodically-pinged sessions can't hold
48
+ * staged bytes forever. */
49
+ export const UPLOAD_SESSION_MAX_LIFETIME_MS = 24 * 60 * 60 * 1000;
50
+ /** Max simultaneously-open upload sessions per user. A session stages up
51
+ * to MAX_INLINE_PUBLISH_BYTES, so this bounds per-user staged bytes. */
52
+ export const MAX_OPEN_UPLOAD_SESSIONS_PER_USER = 2;
53
+ /** Max files a single upload-session manifest may declare. */
54
+ export const MAX_UPLOAD_SESSION_FILES = 400;
9
55
  //# sourceMappingURL=limits.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"limits.js","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC"}
1
+ {"version":3,"file":"limits.js","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzD;;;;;;GAMG;AAEH;;8BAE8B;AAC9B,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhD;;;;;iEAKiE;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhD;;;;qDAIqD;AACrD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAExD;;4BAE4B;AAC5B,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAElE;yEACyE;AACzE,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAEnD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cross-process platform defaults. These are the fallback values used when the
3
+ * corresponding env var is unset; the authoritative production values live in
4
+ * infra/docker-compose.yml. Kept here (not in any one package) so the API, the
5
+ * worker daemon, and the MCP transport agree on a single source of truth
6
+ * without depending on each other.
7
+ */
8
+ /** Default PocketBase sidecar image when PERCHER_POCKETBASE_IMAGE is unset. */
9
+ export declare const DEFAULT_POCKETBASE_IMAGE = "percher/pocketbase:0.39.9";
10
+ /** Default app domain suffix when PERCHER_DOMAIN_SUFFIX is unset. */
11
+ export declare const DEFAULT_DOMAIN_SUFFIX = "percher.run";
12
+ /** Default hosted-MCP HTTP port when PERCHER_MCP_HTTP_PORT is unset. */
13
+ export declare const DEFAULT_MCP_HTTP_PORT = 8787;
14
+ //# sourceMappingURL=platform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAEpE,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAEnD,wEAAwE;AACxE,eAAO,MAAM,qBAAqB,OAAO,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Cross-process platform defaults. These are the fallback values used when the
3
+ * corresponding env var is unset; the authoritative production values live in
4
+ * infra/docker-compose.yml. Kept here (not in any one package) so the API, the
5
+ * worker daemon, and the MCP transport agree on a single source of truth
6
+ * without depending on each other.
7
+ */
8
+ /** Default PocketBase sidecar image when PERCHER_POCKETBASE_IMAGE is unset. */
9
+ export const DEFAULT_POCKETBASE_IMAGE = "percher/pocketbase:0.39.9";
10
+ /** Default app domain suffix when PERCHER_DOMAIN_SUFFIX is unset. */
11
+ export const DEFAULT_DOMAIN_SUFFIX = "percher.run";
12
+ /** Default hosted-MCP HTTP port when PERCHER_MCP_HTTP_PORT is unset. */
13
+ export const DEFAULT_MCP_HTTP_PORT = 8787;
14
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+EAA+E;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAEpE,qEAAqE;AACrE,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAEnD,wEAAwE;AACxE,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percher/shared",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
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",