@monoflake/sdk 2026.1004.1 → 2026.1004.3

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.
@@ -2,7 +2,7 @@ import * as v from "valibot";
2
2
  import { unwrap, unwrap as unwrap$1 } from "@canmi/response";
3
3
  //#region artifacts/src/api.ts
4
4
  /**
5
- * The envelope lives in lib/pkgs/response, beside its Rust half; these are its re-exports for the
5
+ * The envelope lives in @canmi/response, beside its Rust half; these are its re-exports for the
6
6
  * readers that already take their contracts from here.
7
7
  */
8
8
  /**
@@ -41,7 +41,7 @@ export declare function best(image: ImageLayer, want: number): ImageVariant | un
41
41
  * side: these bytes were encoded by somebody else's server and arrive as SVG or ICO, neither of
42
42
  * which a ladder ever produces -- and the ladder's table answers `avif` for anything it does not
43
43
  * recognise, which would be an address to a file nobody wrote. The twin of `icon_mime` in
44
- * services/apps/local/src/extension.rs, held to it by a test here.
44
+ * web's apps/local/src/extension.rs, held to it by a test here.
45
45
  */
46
46
  export declare const ICON_EXTENSION: Record<string, string>;
47
47
  /**
@@ -60,7 +60,7 @@ export declare function toned(icon: IconLayer, want?: Tone): ImageVariant | unde
60
60
  * Beside `ICON_EXTENSION` rather than folded into it, for the reason that table gives: a ladder
61
61
  * produces these four and never an SVG or an ICO, and answering `avif` for a mime it does not
62
62
  * recognise would be a guess an icon cannot afford. Held to `for_variant` in
63
- * services/apps/local/src/extension.rs by a test, the two being one fact in two languages.
63
+ * web's apps/local/src/extension.rs by a test, the two being one fact in two languages.
64
64
  */
65
65
  export declare const VARIANT_EXTENSION: Record<string, string>;
66
66
  /**
@@ -64,7 +64,7 @@ function best(image, want) {
64
64
  * side: these bytes were encoded by somebody else's server and arrive as SVG or ICO, neither of
65
65
  * which a ladder ever produces -- and the ladder's table answers `avif` for anything it does not
66
66
  * recognise, which would be an address to a file nobody wrote. The twin of `icon_mime` in
67
- * services/apps/local/src/extension.rs, held to it by a test here.
67
+ * web's apps/local/src/extension.rs, held to it by a test here.
68
68
  */
69
69
  const ICON_EXTENSION = {
70
70
  "image/svg+xml": "svg",
@@ -90,7 +90,7 @@ function toned(icon, want) {
90
90
  * Beside `ICON_EXTENSION` rather than folded into it, for the reason that table gives: a ladder
91
91
  * produces these four and never an SVG or an ICO, and answering `avif` for a mime it does not
92
92
  * recognise would be a guess an icon cannot afford. Held to `for_variant` in
93
- * services/apps/local/src/extension.rs by a test, the two being one fact in two languages.
93
+ * web's apps/local/src/extension.rs by a test, the two being one fact in two languages.
94
94
  */
95
95
  const VARIANT_EXTENSION = {
96
96
  "image/avif": "avif",
@@ -359,7 +359,7 @@ export declare const ClipLayerSchema: v.ObjectSchema<{
359
359
  *
360
360
  * The nine locale bodies are what the document is made of rather than nine things, so they bind
361
361
  * here and none of them has a rid. `slug` is the identity and the address is the root's to say.
362
- * See spec/architecture/resource.md, "The catalogue".
362
+ * See spec/architecture/resource.md, "The catalog".
363
363
  */
364
364
  export declare const DocumentLayerSchema: v.ObjectSchema<{
365
365
  readonly version: v.NumberSchema<undefined>;
@@ -1321,7 +1321,7 @@ export declare function isLayerName(value: string): value is LayerName;
1321
1321
  *
1322
1322
  * An absolute URL here would bake a hostname into every record, so changing one would mean
1323
1323
  * rewriting all of them. A scheme is expanded by whoever answers, from `@monoflake/sdk`, which is
1324
- * the one place a hostname is declared. `services/libs/fonts` already does this with `__CDN_URL__`.
1324
+ * the one place a hostname is declared. web's `libs/fonts` already does this with `__CDN_URL__`.
1325
1325
  */
1326
1326
  export declare const CANONICAL_PATTERN: RegExp;
1327
1327
  /**
@@ -117,7 +117,7 @@ const ImageLayerSchema = v.object({
117
117
  * decoding, and `address` is not in the file at all -- it is looked up offline from `location`.
118
118
  * See web's spec/architecture/media.md, "Where a photograph was taken is worked out offline".
119
119
  *
120
- * Spread into two layers rather than named as one, because `services/apps/local/src/image/exif.rs`
120
+ * Spread into two layers rather than named as one, because web's `apps/local/src/image/exif.rs`
121
121
  * is flattened into both and a wrapper here would be a key the Rust side never writes.
122
122
  */
123
123
  const exif = {
@@ -295,7 +295,7 @@ const ClipLayerSchema = v.object({
295
295
  *
296
296
  * The nine locale bodies are what the document is made of rather than nine things, so they bind
297
297
  * here and none of them has a rid. `slug` is the identity and the address is the root's to say.
298
- * See spec/architecture/resource.md, "The catalogue".
298
+ * See spec/architecture/resource.md, "The catalog".
299
299
  */
300
300
  const DocumentLayerSchema = v.object({
301
301
  ...layered,
@@ -393,7 +393,7 @@ function isLayerName(value) {
393
393
  *
394
394
  * An absolute URL here would bake a hostname into every record, so changing one would mean
395
395
  * rewriting all of them. A scheme is expanded by whoever answers, from `@monoflake/sdk`, which is
396
- * the one place a hostname is declared. `services/libs/fonts` already does this with `__CDN_URL__`.
396
+ * the one place a hostname is declared. web's `libs/fonts` already does this with `__CDN_URL__`.
397
397
  */
398
398
  const CANONICAL_PATTERN = /^(?:cid:[0-9a-f]{32}\.[a-z0-9]+|slug:[a-z0-9][a-z0-9-]*)$/;
399
399
  /**
@@ -197,7 +197,7 @@ export type Block = {
197
197
  /**
198
198
  * What every sample of this clip is multiplied by, so two clips play at one level.
199
199
  *
200
- * Computed in the build from the loudness and true peak services/apps/local measured. `1` for
200
+ * Computed in the build from the loudness and true peak web's apps/local measured. `1` for
201
201
  * a clip nothing has measured, which plays as it always did. See `assets.ts`.
202
202
  */
203
203
  gain?: number;
@@ -1,4 +1,4 @@
1
- import { GITHUB_OWNER, LOOPBACK_HOST, Normalized, PORT_OFFSET, isDevHost, loopbackUrl, normalizePath, normalizedLocation } from "@canmi/me/urls";
1
+ import { GITHUB_OWNER, LOOPBACK_HOST, Normalized, isDevHost, loopbackUrl, normalizePath, normalizedLocation } from "@canmi/me/urls";
2
2
  //#region src/index.d.ts
3
3
  /**
4
4
  * The repositories whose deploy runs the hook passes to the nodes, as GitHub names them: the two
@@ -12,7 +12,7 @@ export declare const DEPLOY_SOURCES: readonly string[];
12
12
  * Pinned, and bound by exactly one checkout at a time. The gaps are the inspector ports, which
13
13
  * wrangler takes as port + 1, and they keep clear of LOCAL_PORT (mise.toml). A second copy of an
14
14
  * app collides here rather than drifting to a free port, which is the cheapest mutex there is.
15
- * See spec/toolchain.md.
15
+ * See web's spec/toolchain.md.
16
16
  */
17
17
  export declare const PINNED_PORTS: {
18
18
  readonly site: 26511;
@@ -25,14 +25,14 @@ export declare const PINNED_PORTS: {
25
25
  export declare const BOUND_PORTS: {
26
26
  readonly quota: 26523;
27
27
  };
28
- /** The ports this checkout's servers bind: the pinned ones, shifted in the sandbox. */
28
+ /** The ports this checkout's servers bind: the pinned ones and the bound ones together. */
29
29
  export declare const DEVELOPMENT_PORTS: { readonly [App in keyof typeof PINNED_PORTS | keyof typeof BOUND_PORTS]: number; };
30
30
  export type AppName = keyof typeof PINNED_PORTS;
31
31
  export type DevelopmentUrls = Readonly<Record<AppName | 'symlink', string>>;
32
32
  /**
33
33
  * Where the alias layer and the CDN are reached *from a page* in development: through the site.
34
34
  *
35
- * A page carries no host of its own for either prefix -- see spec/toolchain.md, "They bind
35
+ * A page carries no host of its own for either prefix -- see web's spec/toolchain.md, "They bind
36
36
  * every interface, and the other two are reached through the site", for why that is what
37
37
  * makes the site work from a phone on the same network. The site's API needs no proxy: the
38
38
  * site's Worker answers it under `/api/` itself.
@@ -214,4 +214,4 @@ export declare function pickUrls(isDev: boolean): UrlMap;
214
214
  */
215
215
  export declare function pageUrls(isDev: boolean): UrlMap;
216
216
  //#endregion
217
- export { GITHUB_OWNER, LOOPBACK_HOST, type Normalized, PORT_OFFSET, isDevHost, loopbackUrl, normalizePath, normalizedLocation };
217
+ export { GITHUB_OWNER, LOOPBACK_HOST, type Normalized, isDevHost, loopbackUrl, normalizePath, normalizedLocation };
package/dist/src/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { CONTACT, EXTERNAL, GITHUB_OWNER, LOOPBACK_HOST, PORT_OFFSET, SITE, SITE_PORT, SOURCE, isDevHost, loopbackUrl, normalizePath, normalizedLocation } from "@canmi/me/urls";
1
+ import { CONTACT, EXTERNAL, GITHUB_OWNER, LOOPBACK_HOST, SITE, SITE_PORT, SOURCE, isDevHost, loopbackUrl, normalizePath, normalizedLocation } from "@canmi/me/urls";
2
2
  import { INFRA, PANEL_PORT } from "@monoflake/urls";
3
3
  //#region src/index.ts
4
4
  /**
5
5
  * The platform's addresses, and the whole map as everything above infra reads it: the platform's
6
6
  * own declared here, the author's from `canmi` and infra's from `@monoflake/urls`, composed into
7
7
  * one shape so a caller asks one place and the Rust mirror has one source. See
8
- * spec/architecture/layers.md, "Addresses are split by who owns the name".
8
+ * web's spec/architecture/layers.md, "Addresses are split by who owns the name".
9
9
  */
10
10
  /**
11
11
  * The repositories whose deploy runs the hook passes to the nodes, as GitHub names them: the two
@@ -19,7 +19,7 @@ const DEPLOY_SOURCES = ["monoflake/infra", "monoflake/platform"];
19
19
  * Pinned, and bound by exactly one checkout at a time. The gaps are the inspector ports, which
20
20
  * wrangler takes as port + 1, and they keep clear of LOCAL_PORT (mise.toml). A second copy of an
21
21
  * app collides here rather than drifting to a free port, which is the cheapest mutex there is.
22
- * See spec/toolchain.md.
22
+ * See web's spec/toolchain.md.
23
23
  */
24
24
  const PINNED_PORTS = {
25
25
  site: SITE_PORT,
@@ -30,17 +30,17 @@ const PINNED_PORTS = {
30
30
  };
31
31
  /** Workers reached by binding alone: a port that is the mutex, and no address. */
32
32
  const BOUND_PORTS = { quota: 26523 };
33
- /** The ports this checkout's servers bind: the pinned ones, shifted in the sandbox. */
34
- const DEVELOPMENT_PORTS = Object.fromEntries(Object.entries({
33
+ /** The ports this checkout's servers bind: the pinned ones and the bound ones together. */
34
+ const DEVELOPMENT_PORTS = {
35
35
  ...PINNED_PORTS,
36
36
  ...BOUND_PORTS
37
- }).map(([app, port]) => [app, port + PORT_OFFSET]));
37
+ };
38
38
  /** The site's scope of the API host, which is the service's name, `site`. */
39
39
  const SITE_SCOPE = "site";
40
40
  /**
41
41
  * Where the alias layer and the CDN are reached *from a page* in development: through the site.
42
42
  *
43
- * A page carries no host of its own for either prefix -- see spec/toolchain.md, "They bind
43
+ * A page carries no host of its own for either prefix -- see web's spec/toolchain.md, "They bind
44
44
  * every interface, and the other two are reached through the site", for why that is what
45
45
  * makes the site work from a phone on the same network. The site's API needs no proxy: the
46
46
  * site's Worker answers it under `/api/` itself.
@@ -211,4 +211,4 @@ function pageUrls(isDev) {
211
211
  } : URLS.apps.production;
212
212
  }
213
213
  //#endregion
214
- export { BOUND_PORTS, DEPLOY_SOURCES, DEVELOPMENT_PORTS, DEVELOPMENT_PROXY_PATHS, GATEWAY, GATEWAY_HOSTS, GATEWAY_NAMES, GITHUB_OWNER, LOOPBACK_HOST, PAGE_ORIGINS, PINNED_PORTS, PORT_OFFSET, URLS, developmentUrl, developmentUrls, isDevHost, loopbackUrl, normalizePath, normalizedLocation, pageUrls, pickUrls };
214
+ export { BOUND_PORTS, DEPLOY_SOURCES, DEVELOPMENT_PORTS, DEVELOPMENT_PROXY_PATHS, GATEWAY, GATEWAY_HOSTS, GATEWAY_NAMES, GITHUB_OWNER, LOOPBACK_HOST, PAGE_ORIGINS, PINNED_PORTS, URLS, developmentUrl, developmentUrls, isDevHost, loopbackUrl, normalizePath, normalizedLocation, pageUrls, pickUrls };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoflake/sdk",
3
- "version": "2026.1004.1",
3
+ "version": "2026.1004.3",
4
4
  "description": "The platform's addresses, and every client of its services and its policies behind a subpath",
5
5
  "license": "MIT",
6
6
  "repository": {