tileflow 0.1.0-alpha.14 → 0.1.0-alpha.16

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.
@@ -9,6 +9,7 @@ Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/ma
9
9
  | Local evidence | `setup capture`, `capture`, `visual compare`, `visual analyze`, `visual diff`, `visual update` |
10
10
  | Data and assets | `tileset inspect`, `tileset publish/list/status/purge`, `inspect features`, `icons list/diff` |
11
11
  | Team Icon Sets | `icon-set publish/list/status/versions/uses/archive/unarchive/purge` |
12
+ | Team 3D models | `models publish/list/status/restore/purge` |
12
13
  | Repository locks | `icons install`, `icons update`, `icons pin` |
13
14
  | Account | `login`, `logout`, `whoami` |
14
15
  | Hosted delivery | `deploy`, `status` |
@@ -28,5 +29,8 @@ authority when resolving revisions and are the only commands that select revisio
28
29
  `tileflow.icons.lock.json`. See the
29
30
  [Team Icon Set workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/team-icon-sets.md).
30
31
 
32
+ `models` publishes and manages the Team 3D models that maps place by name; see
33
+ [Team 3D models](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/team-3d-models.md).
34
+
31
35
  The hidden `projects` command family lists and manages the internal application destinations of an
32
36
  account for support. It is not part of the ordinary workflow or the product catalog.
@@ -30,8 +30,41 @@ account or hosted command stops with a clear message and asks you to run `tilefl
30
30
  Project API and CI keys are independent project credentials and are not removed by a personal
31
31
  password change.
32
32
 
33
- The dashboard creates the Map and browser-access policy before repository setup. Keep that exact
34
- Map ID in the deploy action. If the config contains several maps, select the authored map explicitly:
33
+ ## Create the Map from the terminal
34
+
35
+ After `tileflow login`, the CLI can create the Map itself; nothing has to be copied from the
36
+ dashboard. Run `deploy` without `--map-id`, or create the Map first with `maps create`:
37
+
38
+ ```sh
39
+ npx tileflow login
40
+ npx tileflow deploy --origin https://www.example.com
41
+ npx tileflow maps create --any-website --json
42
+ ```
43
+
44
+ The new Map belongs to a Team you administer. When you administer exactly one Team that can add a
45
+ Map, the CLI uses it; when several can, it asks, or takes `--team @team`; when none can, it stops
46
+ and says why (no administered Team, or every Team has reached its Map limit).
47
+
48
+ Browser access is always an explicit choice: `--origin` with an exact website origin such as
49
+ `https://www.example.com` (repeat it for up to 20 sites), or `--any-website`. Paths, wildcards and
50
+ bare host names are rejected. On a terminal the CLI asks; without one (for example when an agent
51
+ runs it), a missing choice stops before anything is created and names the flags. Browser access
52
+ is stored with the Map in Tileflow and can be changed in the dashboard; it is never written to the
53
+ repository.
54
+
55
+ `deploy` creates the Map only after the local config, assets and styles pass, then publishes to it
56
+ in the same run and prints `tileflow deploy --map-id <mapId>` for later deploys. If the manifest
57
+ already records a Map for that repository map, `deploy` stops and shows that command instead of
58
+ creating another Map. Each creation prints a setup key; rerunning an interrupted command with
59
+ `--setup-key <key>` returns the same Map instead of a second one.
60
+
61
+ Map creation uses only the personal session. With `TILEFLOW_API_KEY`, `--api-key`, `--with-native`,
62
+ or in CI, `deploy` requires `--map-id`.
63
+
64
+ ## Deploy to an existing Map
65
+
66
+ A Map created in the dashboard, or by an earlier CLI run, is deployed with its exact Map ID. If the
67
+ config contains several maps, select the authored map explicitly:
35
68
 
36
69
  ```sh
37
70
  npx tileflow deploy \
@@ -184,15 +217,17 @@ Hosted deploy currently rejects local or package-owned web fonts before authenti
184
217
  writes. Use self-hosted delivery or an explicit public glyph provider. Enabling managed font bundles
185
218
  requires a separately deployed ownership, quota, retention, and immutable-delivery contract.
186
219
 
187
- A map's own 3D building models (the building models of its `models` directories) deploy as one
188
- model bundle per map. Deploy prepares them as `build` does, uploads the bundle with
189
- `PUT /v1/model-bundles/:contentHash` after authentication and before the first style write, compiles
190
- each placement's `url` at the bundle's hosted address and publishes the style with the bundle's
191
- content hash. Byte-identical bundles are reused by content hash. A bundle holds at most 64 models,
192
- 16 MiB a prepared file and 32 MiB together, and shares the organization's hosted-storage pool like
193
- icon packages. Upload success must confirm the submitted `contentHash`, model count and byte total,
194
- one opaque `mdb_<id>` and the query-free `/model-bundles/<id>` base URL. A deploy with
195
- `--with-native` rejects a map's own building models, because MapLibre Native draws no models.
220
+ A map's own 3D building models (the building models of its `models` directories) are its Team's
221
+ 3D models, which `tileflow models publish` publishes by name. Deploy uploads no model files: it
222
+ compiles each placement's `url` as the placeholder `tileflow://team-models/<name>`, leaves the
223
+ building models out of the build's assets and model source identities, so the map's revision binds
224
+ their names and not their bytes, and sends `teamModelSources`, the SHA-256 and size of each glTF
225
+ binary a model was prepared from. Hosted replaces each placeholder with the model's address in the
226
+ map's Team, which follows the model's current version, and fails the deploy for a model the Team has
227
+ not published. The response's `teamModels` names each placed model's current version and whether it
228
+ was prepared from the same files (`match`, `differ` or `unknown`); the CLI warns on `differ`. A
229
+ deploy with `--with-native` rejects a map's own building models, because MapLibre Native draws no
230
+ models.
196
231
 
197
232
  For every managed resource kind, `assetSetSha256` remains a separate per-map output identity. It
198
233
  hashes each generated file's exact portable name, media type, byte count, and SHA-256 using Core's
@@ -82,8 +82,8 @@ Browser-only selections fail before config execution in native mode. In particul
82
82
  compiler-inspection sidecars, or the dev handler's status/event control routes. Use ordinary/default
83
83
  web preview for those workflows.
84
84
 
85
- The `native-lowering-v1` preparation policy records fixed globe-to-Mercator normalization and
86
- finite cap/dash layer partitioning in `native-build.json`; it does not change web artifacts.
85
+ The `native-lowering-v1` preparation policy records fixed globe-to-Mercator normalization, removal
86
+ of a browser sky and finite cap/dash layer partitioning in `native-build.json`; it does not change web artifacts.
87
87
  Native preparation rejects adaptive/unknown projections, terrain, browser PMTiles/contour protocols,
88
88
  missing text providers and unsupported style values rather than degrading them silently. It preserves
89
89
  shared icon inheritance and independent sprite densities, and maps verified licensed TTF/OTF faces
@@ -0,0 +1,36 @@
1
+ # Team 3D models
2
+
3
+ A Team publishes its own 3D building models, such as a store or a kiosk, once, under their names,
4
+ and every map of the Team places them by name. Hosted maps follow each model's current version, so
5
+ publishing an improvement changes every map that places the model on its next load, without
6
+ deploying the maps again. Locally, maps draw their own `.glb` files and need no account.
7
+
8
+ ```sh
9
+ npx tileflow models publish ./models/flagship-store.glb --team @acme --json
10
+ npx tileflow models list --team @acme
11
+ npx tileflow models status flagship-store --team @acme
12
+ npx tileflow models restore flagship-store --team @acme
13
+ ```
14
+
15
+ - `publish [paths...]` prepares each building model as `build` does (its levels of detail, its
16
+ footprint and meshoptimizer compression) and publishes it as the model's new current version.
17
+ Paths are `.glb` files or directories; with none, it publishes the building models of every map in
18
+ the config. Publishing the bytes of the current version again changes nothing.
19
+ - `list` and `status <name>` read the Team's models, their versions and the maps that place them.
20
+ - `restore <name>` makes the previous version current again. A model keeps its current and previous
21
+ versions.
22
+ - `purge <name> --confirm <name>` deletes a model and its versions, and is refused while a map
23
+ places it.
24
+
25
+ Each command needs Team authority: an account session with access to the Team, or a Team API key
26
+ with the 3D models permission (`--api-key`). Pass `--team @team` when the account has several Teams.
27
+
28
+ `tileflow deploy` uploads no model files. It writes each placement of a building model as the
29
+ placeholder `tileflow://team-models/<name>`, which Hosted replaces with the model's address in the
30
+ map's Team; a model the Team has not published fails the deploy, and the deploy warns when a placed
31
+ model's published version was prepared from other files than the map's. Models are served publicly
32
+ and may be cached, so they must not hold secrets or restricted personal data. MapLibre Native draws
33
+ no models, so a deploy with `--with-native` does not take them.
34
+
35
+ See [3D buildings](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/buildings-3d.md#building-models)
36
+ for how to prepare a model.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileflow",
3
- "version": "0.1.0-alpha.14",
3
+ "version": "0.1.0-alpha.16",
4
4
  "license": "Apache-2.0",
5
5
  "description": "CLI-only tools for Tileflow config, capture, visual testing, and deploy.",
6
6
  "type": "module",
@@ -36,14 +36,14 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@hono/node-server": "2.1.3",
39
- "@tileflow/capture": ">=0.1.0-alpha.31 <0.1.0-beta.0",
39
+ "@tileflow/capture": ">=0.1.0-alpha.33 <0.1.0-beta.0",
40
40
  "@tileflow/coordinates": ">=0.1.0-alpha.2 <0.1.0-beta.0",
41
41
  "@tileflow/coordinates-runtime": ">=0.1.0-alpha.5 <0.1.0-beta.0",
42
- "@tileflow/core": ">=0.1.0-alpha.36 <0.1.0-beta.0",
43
- "@tileflow/dev": ">=0.1.0-alpha.33 <0.1.0-beta.0",
44
- "@tileflow/maps": ">=0.1.0-alpha.10 <0.1.0-beta.0",
42
+ "@tileflow/core": ">=0.1.0-alpha.39 <0.1.0-beta.0",
43
+ "@tileflow/dev": ">=0.1.0-alpha.36 <0.1.0-beta.0",
44
+ "@tileflow/maps": ">=0.1.0-alpha.13 <0.1.0-beta.0",
45
45
  "commander": "^15.0.0",
46
- "hono": "4.13.7",
46
+ "hono": "4.13.13",
47
47
  "picocolors": "^1.1.1",
48
48
  "zod": "^4.4.3"
49
49
  },