taggor 0.0.0-stage → 0.1.0
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/EXIT_CODES.md +20 -0
- package/LICENSE +21 -0
- package/README.md +51 -2
- package/bin/taggor.js +8 -0
- package/dist/taggor.mjs +25917 -0
- package/package.json +63 -3
- package/schemas/agent-install.json +131 -0
- package/schemas/attach.json +109 -0
- package/schemas/check.json +200 -0
- package/schemas/data-collections.json +102 -0
- package/schemas/data-export.json +82 -0
- package/schemas/detach.json +80 -0
- package/schemas/dev.json +81 -0
- package/schemas/init.json +139 -0
- package/schemas/login.json +100 -0
- package/schemas/logout.json +73 -0
- package/schemas/logs.json +133 -0
- package/schemas/metrics.json +218 -0
- package/schemas/projects-clean.json +106 -0
- package/schemas/projects-list.json +102 -0
- package/schemas/promote.json +182 -0
- package/schemas/publish.json +426 -0
- package/schemas/pull.json +120 -0
- package/schemas/rollback.json +182 -0
- package/schemas/sites-create.json +128 -0
- package/schemas/sites-domains-set.json +80 -0
- package/schemas/sites-list.json +96 -0
- package/schemas/sites-props-set.json +95 -0
- package/schemas/sites-protection-set.json +79 -0
- package/schemas/sites-server-keys-create.json +102 -0
- package/schemas/sites-server-keys-list.json +92 -0
- package/schemas/sites-server-keys-revoke.json +106 -0
- package/schemas/sites-snippet.json +76 -0
- package/schemas/usage.json +227 -0
- package/schemas/versions.json +125 -0
- package/schemas/whoami.json +121 -0
- package/schemas/workspaces-use.json +74 -0
package/EXIT_CODES.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Exit codes of `taggor`
|
|
2
|
+
|
|
3
|
+
Stable: scripts and agents may branch on them. A code is never renumbered or reused; new ones are
|
|
4
|
+
added at the end. The table is `EXIT` in `src/domain/exit-codes.ts`; a test (`exit-codes.test.ts`)
|
|
5
|
+
fails when this file and the code disagree, and `CliError` refuses a code that is not in the table.
|
|
6
|
+
|
|
7
|
+
| Code | Name | When |
|
|
8
|
+
| ---- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| 0 | ok | The command did what it was asked. |
|
|
10
|
+
| 1 | generic | Any other failure: API 5xx, an unexpected error, a file the CLI could not write, a `promote` or `rollback` the person did not confirm (nothing changed), an API answer that is not the change asked for, `taggor logs --follow` past its `--timeout` or interrupted by SIGINT/SIGTERM before the build ended (the build keeps running; never 0, so `logs --follow && promote` stops). `taggor pull` whose downloaded source does not match its hash or came without one, or is over the size limit (`pull.hashMismatch`, `pull.noHash`, `pull.tooLarge`; nothing is written). |
|
|
11
|
+
| 2 | usage | Invalid use: unknown flag or command, missing argument, invalid value (tag, workspace, API URL, config file), or an input the run could not ask for (no TTY, `CI=true`, `--no-input`, `--json`): the message names the flag to pass. API 400, 413, 415 and 422. `taggor pull` with both `--version` and `--channel`, or a source the validator refuses (`pull.packageRefused`); `taggor projects clean` with an invalid `--older-than`. |
|
|
12
|
+
| 3 | unauthenticated | No credential, or the API did not accept it or does not allow it (401, 403), or the login was denied in the browser or expired before approval. `taggor data export` as a viewer or member (HTTP 403: only owner and admins export; `data.forbidden`). |
|
|
13
|
+
| 4 | not_found | The API answered 404, or `promote`/`rollback` decided locally (no API 404) that the version is not in the component's list (`versionNotFound`) or `staging` has nothing to promote (`stagingEmpty`). `taggor data export` with a collection name that is not in the workspace (`data.collectionNotFound`). `taggor pull` of a component with no versions, a channel that points to nothing, or a version the API does not have. |
|
|
14
|
+
| 5 | conflict | Something already exists: files `init` would overwrite (use `--force`), a file whose `<!-- taggor:start -->`/`<!-- taggor:end -->` markers `taggor agent install` cannot read (`agent.markers`, nothing changed), API 409, or `rollback` decided locally (no API 409) that the channel points to nothing (`nothingToRollBack`), or a `promote` that moved the channel but left a site on its previous version because the site's saved props do not fit the new one (`site_props` with `held_back`; the result is printed first). `taggor data export --out` onto a file that exists (use `--force`; `data.outExists`). `taggor pull` into a folder that is not empty or over existing files without `--force` (`pull.notEmpty`), and `taggor projects clean` that kept a folder because it holds unpublished changes (the result is printed first). |
|
|
15
|
+
| 6 | build_failed | The build or the publication gates failed (`build_not_publishable`, `version_not_ready`), `taggor publish` found a secret in the package before sending it, `taggor logs` read a build that ended `failed`, or `taggor check` found a component that fails a publication gate. `taggor pull` of a source that holds a credential (`pull.secrets`; nothing is written). |
|
|
16
|
+
| 7 | rate_limited | Rate limit or quota: API 429, `rate_limited`, `build_quota_exceeded`. |
|
|
17
|
+
| 8 | network | The API could not be reached, or `taggor logs --follow` lost the stream 8 times in a row. `taggor data export` whose stream dropped mid-way (nothing is kept; `data.streamLost`). |
|
|
18
|
+
|
|
19
|
+
API errors become codes from the problem's HTTP status and `code` (`exitCodeForProblem`); the
|
|
20
|
+
problem `code` wins when it is a build, gate or quota one.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Taggor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
#
|
|
1
|
+
# taggor
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command line of [Taggor](https://taggor.dev/docs/). Taggor is where AI agents publish components for
|
|
4
|
+
websites: an agent writes a component with [`@taggor/component`](https://www.npmjs.com/package/@taggor/component),
|
|
5
|
+
and Taggor builds, hosts, versions and delivers it to a site through one snippet. This CLI is how you, or
|
|
6
|
+
your agent, drive all of that from a terminal.
|
|
7
|
+
|
|
8
|
+
Requires Node.js 20 or newer. The package is one bundled file with no runtime dependencies.
|
|
9
|
+
|
|
10
|
+
## The first component
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx taggor login # browser sign-in (device authorization); the CLI never asks for a password
|
|
14
|
+
npx taggor whoami # your user, workspace and role
|
|
15
|
+
npx taggor init . # write a component project in this folder (no network, no sign-in needed)
|
|
16
|
+
npm install
|
|
17
|
+
npx taggor publish # build it remotely and publish a version to a channel
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`login` prints a code and a URL, waits, and you approve it in the browser. `logout` revokes the saved login
|
|
21
|
+
and deletes it from the machine.
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
| Group | Commands |
|
|
26
|
+
| ----------------- | ----------------------------------------------------------------------------------------- |
|
|
27
|
+
| Account | `login`, `logout`, `whoami`, `workspaces` |
|
|
28
|
+
| Projects | `init`, `pull` (recreate a project from a published version), `projects` |
|
|
29
|
+
| Build and release | `publish`, `logs`, `versions`, `promote`, `rollback`, and `dev`, `check` (see below) |
|
|
30
|
+
| Sites | `sites` (list, create, show the snippet), `attach`, `detach` |
|
|
31
|
+
| What happened | `data` (what your components collected), `metrics`, `usage` (limits of your plan) |
|
|
32
|
+
| AI agents | `agent install` (teach Claude Code, Codex or Cursor to write and publish components here) |
|
|
33
|
+
|
|
34
|
+
`dev` (a local preview with hot reload) and `check` (the publication gates, offline) run an engine that
|
|
35
|
+
the npm build does not ship yet, and the npm build never loads an engine from your project. Today they need
|
|
36
|
+
the CLI your Taggor portal serves; `publish` always builds and checks remotely, so it does not need them.
|
|
37
|
+
|
|
38
|
+
Channels are `staging` and `production`: `promote` points a channel at a version and `rollback` points it
|
|
39
|
+
back at the previous one. Versions are immutable, so a rollback is instant.
|
|
40
|
+
|
|
41
|
+
Run `taggor <command> --help` for the flags of each command. Every command takes `--json` for scripts and
|
|
42
|
+
agents, and every exit code is documented in [`EXIT_CODES.md`](./EXIT_CODES.md), shipped in this package.
|
|
43
|
+
|
|
44
|
+
## Docs
|
|
45
|
+
|
|
46
|
+
- [Quickstart](https://taggor.dev/docs/quickstart/): from an empty folder to a component on a test site
|
|
47
|
+
- [The snippet](https://taggor.dev/docs/snippet/) and [forms and data](https://taggor.dev/docs/forms-and-data/)
|
|
48
|
+
- [Errors](https://taggor.dev/docs/errors/) and [build diagnostics](https://taggor.dev/docs/diagnostics/), one page per code
|
|
49
|
+
- Working with an agent: [Claude Code](https://taggor.dev/docs/agents/claude-code/),
|
|
50
|
+
[Codex](https://taggor.dev/docs/agents/codex/), [Cursor](https://taggor.dev/docs/agents/cursor/)
|
|
51
|
+
|
|
52
|
+
License: MIT
|
package/bin/taggor.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Launcher of the taggor CLI (TAG-1001): checks the Node version, then loads the bundle.
|
|
3
|
+
const [major] = process.versions.node.split(".").map(Number);
|
|
4
|
+
if (major < 20) {
|
|
5
|
+
process.stderr.write("taggor needs Node.js 20 or newer.\n");
|
|
6
|
+
process.exit(1);
|
|
7
|
+
}
|
|
8
|
+
await import("../dist/taggor.mjs");
|