tileflow 0.1.0-alpha.6 → 0.1.0-alpha.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/README.md +38 -0
- package/dist/index.js +1346 -475
- package/docs/agent-icon-composition.md +27 -12
- package/docs/command-families.md +8 -0
- package/docs/team-icon-sets.md +121 -0
- package/package.json +4 -4
|
@@ -9,21 +9,35 @@ npx tileflow icons list --json
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
The successful stdout contract is one deterministic JSON document followed by exactly one newline.
|
|
12
|
-
Its top-level fields, in order, are `schemaVersion:
|
|
13
|
-
Schema version
|
|
12
|
+
Its top-level fields, in order, are `schemaVersion: 3`, `pathBase: "cwd"`, and `maps`.
|
|
13
|
+
Schema version 3 is a compatibility boundary: removing or renaming a field or changing an enum's
|
|
14
14
|
meaning requires a new schema version. Additive optional fields require corresponding documentation
|
|
15
|
-
and tests.
|
|
15
|
+
and tests. It replaces version 2's directory-only shape so a locked `iconSet('@team/set')`
|
|
16
|
+
contributor can be represented without inventing a local path.
|
|
16
17
|
|
|
17
18
|
Each sorted map entry has one `id` and an `icons` value. `icons.kind` is `none` for `icons: []`, or
|
|
18
|
-
`
|
|
19
|
+
`sources` for a prepared ordered composition. A `sources` entry contains:
|
|
19
20
|
|
|
20
|
-
- `
|
|
21
|
-
`npm:<package>/<path>`
|
|
21
|
+
- `contributors`, in the exact left-to-right authoring order. Each has a `kind` of `local`,
|
|
22
|
+
`package` or `icon-set`, a `label` (a config-relative path, a safe `npm:<package>/<path>`
|
|
23
|
+
descriptor, or the canonical `@team/set` reference) and the `iconIds` it declares. Filesystem
|
|
24
|
+
contributors also report `insideWorkingTree`; shared contributors report their exact locked
|
|
25
|
+
`reference` and integer `version`.
|
|
22
26
|
- `finalIds`, the sorted canonical lower-kebab IDs in the resulting sprite;
|
|
23
|
-
- `replacements`,
|
|
24
|
-
|
|
25
|
-
- `
|
|
26
|
-
- the
|
|
27
|
+
- `replacements`, naming the replaced and winning contributor export for every later exact-ID
|
|
28
|
+
replacement, by authored file for filesystem contributors and by `@team/set` for shared ones;
|
|
29
|
+
- `sources`, one entry for each winning ID. A `file` entry carries the cwd-relative `path`, format,
|
|
30
|
+
byte length and intrinsic dimensions; an `icon-set` entry carries the exact `reference` and
|
|
31
|
+
`version` and deliberately has no path, because a shared revision publishes verified generated
|
|
32
|
+
cells rather than original artwork. Both carry the winning `contributor` ordinal.
|
|
33
|
+
- `composition`, the exact ordered `tileflow-icon-composition-v1` receipt when the map declares a
|
|
34
|
+
shared set, and `null` otherwise; and
|
|
35
|
+
- `insideWorkingTree` and the deterministic generated `packageHash`.
|
|
36
|
+
|
|
37
|
+
Listing reads the exact `tileflow.icons.lock.json` beside the selected config. It never resolves a
|
|
38
|
+
catalog head, so a newly published revision does not change this output until `tileflow icons
|
|
39
|
+
install`, `update` or `pin` changes the lock. `--cache-dir` selects the verified artifact cache root
|
|
40
|
+
and `--offline` fails a cache miss instead of hydrating it.
|
|
27
41
|
|
|
28
42
|
There is deliberately no parallel catalog registry, provider kind, semantic mapping, external
|
|
29
43
|
sprite branch, or arbitrary source-to-runtime renaming. `<id>.<ext>` publishes `<id>` and the
|
|
@@ -37,8 +51,9 @@ uses `../` and `insideWorkingTree: false`; no absolute path is emitted. Listing
|
|
|
37
51
|
authoring semantics. Run `npx tileflow validate --target hosted` separately before a
|
|
38
52
|
hosted deploy to check containment, portable IDs, SVG safety, and hosted limits.
|
|
39
53
|
|
|
40
|
-
The Tileflow command performs no authentication,
|
|
41
|
-
|
|
54
|
+
The Tileflow command performs no authentication, browser/server launch, or file write. It performs
|
|
55
|
+
no network request when every locked artifact is already in the verified cache, and `--offline`
|
|
56
|
+
forbids hydration entirely. It removes an ambient `TILEFLOW_API_KEY` before importing config. As with every config-aware
|
|
42
57
|
command, loading `tileflow.config.ts` executes repository code and is not a sandbox; side effects in
|
|
43
58
|
that code remain the repository's responsibility. Success emits no ANSI or progress prose. Usage,
|
|
44
59
|
config, source, decode, and render failures exit 1, write diagnostics to stderr, and leave stdout
|
package/docs/command-families.md
CHANGED
|
@@ -8,11 +8,19 @@ Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/ma
|
|
|
8
8
|
| Map authoring | `init`, `validate`, `inspect`, `explain`, `semantic-diff`, `build`, `preview` (`dev` alias) |
|
|
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
|
+
| Team Icon Sets | `icon-set publish/list/status/versions/uses/archive/unarchive/purge` |
|
|
12
|
+
| Repository locks | `icons install`, `icons update`, `icons pin` |
|
|
11
13
|
| Account | `login`, `logout`, `whoami` |
|
|
12
14
|
| Hosted delivery | `deploy`, `status` |
|
|
13
15
|
|
|
14
16
|
Run `tileflow <command> --help` (or the family help, such as `tileflow icons --help`) for the exact
|
|
15
17
|
arguments and bounded JSON modes.
|
|
16
18
|
|
|
19
|
+
`icon-set` and `icons` are deliberately separate. `icon-set` needs Team authority and changes the
|
|
20
|
+
remote catalog. `icons list` and `icons diff` are keyless local inspection, and
|
|
21
|
+
`icons install|update|pin` are the only commands that resolve `latest` or write
|
|
22
|
+
`tileflow.icons.lock.json`. See the
|
|
23
|
+
[Team Icon Set workflow](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/docs/team-icon-sets.md).
|
|
24
|
+
|
|
17
25
|
The CLI retains the hidden `projects` command family as a compatibility and support surface for the
|
|
18
26
|
internal application boundary. It is not part of the ordinary workflow or the product catalog.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Team Icon Sets and repository locks
|
|
2
|
+
|
|
3
|
+
Start with the [tileflow guide](https://github.com/tileflow/tileflow-sdk/blob/main/packages/cli/README.md) for installation and a complete first example.
|
|
4
|
+
|
|
5
|
+
A Team Icon Set is a named catalog resource such as `@acme/brand`. Publishing creates an immutable
|
|
6
|
+
integer revision of the four generated sprite files. Maps in different repositories consume
|
|
7
|
+
independently pinned revisions through `iconSet('@acme/brand')` without copying original artwork.
|
|
8
|
+
|
|
9
|
+
Two command families cover this, and the split is deliberate. `icon-set` is a networked Team
|
|
10
|
+
authority that changes the catalog. `icons list` stays local and needs no credential. `icons diff`
|
|
11
|
+
compares prepared output with an active Hosted Map baseline, so it requires `--map-id` and a Map
|
|
12
|
+
credential but never mutates that Map. `install`, `update` and `pin` maintain the exact
|
|
13
|
+
`tileflow.icons.lock.json` beside the selected config.
|
|
14
|
+
|
|
15
|
+
Availability depends on your deployment and your Team's enabled features. Check
|
|
16
|
+
`npx tileflow icon-set --help` for the installed command surface.
|
|
17
|
+
|
|
18
|
+
## Authorize a Team
|
|
19
|
+
|
|
20
|
+
Catalog commands need Team authority. Either sign in and let the CLI exchange your account session
|
|
21
|
+
for a short-lived Team capability, or pass a Team data key:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npx tileflow login
|
|
25
|
+
npx tileflow icon-set list --team @acme --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Reads request `icons:read`; publication, archive state and purge request `icons:write`. A
|
|
29
|
+
Map-scoped deploy key never gains catalog authority, and `--team` is rejected together with
|
|
30
|
+
`--api-key` because a Team data key already selects its Team.
|
|
31
|
+
|
|
32
|
+
## Publish a revision
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx tileflow icon-set publish ./icons --id brand --team @acme --idempotency-key brand-2026-09-14 --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`publish` compiles exactly one repository-relative directory into `sprite.json`, `sprite.png`,
|
|
39
|
+
`sprite@2x.json` and `sprite@2x.png`, then uploads those four files under one durable retry key.
|
|
40
|
+
The first successful publication creates the set. Republishing identical bytes reports
|
|
41
|
+
`"publication": "unchanged"` and returns the same revision rather than a new integer. Repeating an
|
|
42
|
+
uncertain request with the same `--idempotency-key` returns its original result instead of creating
|
|
43
|
+
extra history.
|
|
44
|
+
|
|
45
|
+
`--name` and `--description` set bounded catalog display metadata after the immutable revision is
|
|
46
|
+
confirmed. If that metadata update fails, the revision remains published; rerun the same command to
|
|
47
|
+
retry the display update.
|
|
48
|
+
|
|
49
|
+
The JSON receipt reports the Team, the canonical reference, the immutable revision and version ID,
|
|
50
|
+
the package identity, the content hash, the byte count and whether the publication changed
|
|
51
|
+
anything. It contains no credential, source path, or original artwork.
|
|
52
|
+
|
|
53
|
+
## Inspect and manage the catalog
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
npx tileflow icon-set list --team @acme --json
|
|
57
|
+
npx tileflow icon-set status brand --team @acme --json
|
|
58
|
+
npx tileflow icon-set versions brand --team @acme --json
|
|
59
|
+
npx tileflow icon-set uses brand --team @acme --json
|
|
60
|
+
npx tileflow icon-set archive brand --team @acme --json
|
|
61
|
+
npx tileflow icon-set unarchive brand --team @acme --json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Reads follow bounded cursors and reject a repeated page, a duplicate row or an unsafe page count.
|
|
65
|
+
`uses` reports the known hosted deployments that retain a revision; its
|
|
66
|
+
`includesUndeployedRepositoryLocks` field is always `false`, because a repository lock that was
|
|
67
|
+
never deployed is not discoverable by the catalog. Archiving prevents new publication and implicit
|
|
68
|
+
discovery while retained consumers keep working.
|
|
69
|
+
|
|
70
|
+
## Purge an exact revision
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npx tileflow icon-set purge brand --version 3 --team @acme \
|
|
74
|
+
--idempotency-key purge-brand-3 --confirm '@acme/brand@3' --acknowledge-unknown-locks --json
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Purge needs all four guards: an exact positive `--version`, a durable `--idempotency-key`, a
|
|
78
|
+
`--confirm` value repeating the exact `@team/set@version`, and `--acknowledge-unknown-locks`.
|
|
79
|
+
The acknowledgement is not a formality. Purge tombstones the publication hold and keeps retained
|
|
80
|
+
deployment holds, including fully shadowed dependencies; it cannot discover undeployed repository
|
|
81
|
+
locks and cannot revoke public bytes that were already downloaded.
|
|
82
|
+
|
|
83
|
+
## Maintain the repository lock
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
npx tileflow icons install --team @acme --json
|
|
87
|
+
npx tileflow icons update @acme/brand --team @acme --json
|
|
88
|
+
npx tileflow icons pin @acme/brand --version 3 --team @acme --json
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
These commands read the `iconSet()` references your config declares. `install` resolves the current
|
|
92
|
+
latest revision for every declared reference that has no pin yet and leaves existing pins alone.
|
|
93
|
+
`update` moves the selected references to their current latest revision; omit the references to
|
|
94
|
+
select every declared one. `pin` selects one exact revision and never resolves a head.
|
|
95
|
+
|
|
96
|
+
They are the only build-adjacent commands that resolve `latest` or write the lock. Every requested
|
|
97
|
+
reference is resolved before a single compare-and-swap write of the whole snapshot, so a partial
|
|
98
|
+
lock is never produced and a concurrent writer fails the command rather than losing its pins. An
|
|
99
|
+
undeclared reference is rejected before any request. No lock command rewrites `tileflow.config.ts`;
|
|
100
|
+
add `iconSet('@team/set')` to your config first.
|
|
101
|
+
|
|
102
|
+
The JSON receipt lists each locked reference with its revision, version ID, package identity and
|
|
103
|
+
content hash, plus any declared reference that is still missing a pin.
|
|
104
|
+
|
|
105
|
+
## Build, preview and deploy against the lock
|
|
106
|
+
|
|
107
|
+
`validate`, `build`, `preview`, `deploy`, `icons list` and `icons diff` read the lock and compose
|
|
108
|
+
one effective sprite. They never resolve a catalog head, so publishing a newer revision changes
|
|
109
|
+
nothing in a repository until an explicit lock command runs. `--cache-dir` chooses the verified
|
|
110
|
+
artifact cache root; `--offline` fails a cache miss instead of hydrating it.
|
|
111
|
+
|
|
112
|
+
Hydration downloads only the four public files of the exact pinned artifact, from the trusted
|
|
113
|
+
delivery origin, without credentials and without following redirects. Every file's length,
|
|
114
|
+
checksum, sprite index, PNG geometry and per-icon pixel hashes are verified before use.
|
|
115
|
+
|
|
116
|
+
Deploy uploads the effective composed package and sends the same ordered composition receipt in the
|
|
117
|
+
build manifest and the request body, bound to that package's content hash. A referenced source
|
|
118
|
+
revision is never re-uploaded by a deploy.
|
|
119
|
+
|
|
120
|
+
Offline composition is not an offline map. Remote tiles, glyphs and other external resources keep
|
|
121
|
+
their own requirements.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tileflow",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
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,11 +36,11 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@hono/node-server": "2.0.10",
|
|
39
|
-
"@tileflow/capture": ">=0.1.0-alpha.
|
|
39
|
+
"@tileflow/capture": ">=0.1.0-alpha.24 <0.1.0-beta.0",
|
|
40
40
|
"@tileflow/coordinates": ">=0.1.0-alpha.1 <0.1.0-beta.0",
|
|
41
41
|
"@tileflow/coordinates-runtime": ">=0.1.0-alpha.3 <0.1.0-beta.0",
|
|
42
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
43
|
-
"@tileflow/dev": ">=0.1.0-alpha.
|
|
42
|
+
"@tileflow/core": ">=0.1.0-alpha.26 <0.1.0-beta.0",
|
|
43
|
+
"@tileflow/dev": ">=0.1.0-alpha.25 <0.1.0-beta.0",
|
|
44
44
|
"@tileflow/maps": ">=0.1.0-alpha.4 <0.1.0-beta.0",
|
|
45
45
|
"commander": "^15.0.0",
|
|
46
46
|
"hono": "4.13.5",
|