@markusylisiurunen/tau 0.3.91 → 0.3.92

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.
Files changed (61) hide show
  1. package/dist/core/cli.js +0 -3
  2. package/dist/core/cli.js.map +1 -1
  3. package/dist/core/code_mode/sdk.js +0 -1
  4. package/dist/core/code_mode/sdk.js.map +1 -1
  5. package/dist/core/config/content_loader.js +1 -3
  6. package/dist/core/config/content_loader.js.map +1 -1
  7. package/dist/core/config/index.js +1 -1
  8. package/dist/core/config/index.js.map +1 -1
  9. package/dist/core/config/schema.js +0 -67
  10. package/dist/core/config/schema.js.map +1 -1
  11. package/dist/core/index.js +0 -1
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/core/personas.js +1 -2
  14. package/dist/core/personas.js.map +1 -1
  15. package/dist/core/static/tau_docs/config-reference.md +0 -24
  16. package/dist/core/static/tau_docs/configuration.md +1 -1
  17. package/dist/core/static/tau_docs/credentials.md +3 -18
  18. package/dist/core/static/tau_docs/index.md +0 -1
  19. package/dist/core/static/tau_docs/manifest.json +0 -1
  20. package/dist/core/static/tau_docs/personas.md +3 -3
  21. package/dist/core/static/tau_docs/security.md +6 -18
  22. package/dist/core/static/tau_docs/subagents.md +0 -1
  23. package/dist/core/static/tau_docs/tools.md +6 -8
  24. package/dist/core/static/tau_docs/troubleshooting.md +10 -12
  25. package/dist/core/static/tau_docs/tui.md +1 -0
  26. package/dist/core/subagents/claude_code_runner.mjs +43 -43
  27. package/dist/core/subagents/registry.js +1 -2
  28. package/dist/core/subagents/registry.js.map +1 -1
  29. package/dist/core/subagents/types.js +1 -2
  30. package/dist/core/subagents/types.js.map +1 -1
  31. package/dist/core/tools/code.js +0 -3
  32. package/dist/core/tools/code.js.map +1 -1
  33. package/dist/core/tools/presentation.js +1 -2
  34. package/dist/core/tools/presentation.js.map +1 -1
  35. package/dist/core/tools/tool_names.js +1 -3
  36. package/dist/core/tools/tool_names.js.map +1 -1
  37. package/dist/core/utils/speech.js +6 -2
  38. package/dist/core/utils/speech.js.map +1 -1
  39. package/dist/core/version.js +1 -1
  40. package/dist/main.js +0 -23
  41. package/dist/main.js.map +1 -1
  42. package/package.json +3 -4
  43. package/dist/core/code_mode/nook.js +0 -226
  44. package/dist/core/code_mode/nook.js.map +0 -1
  45. package/dist/core/nook/cli.js +0 -258
  46. package/dist/core/nook/cli.js.map +0 -1
  47. package/dist/core/nook/client.js +0 -372
  48. package/dist/core/nook/client.js.map +0 -1
  49. package/dist/core/nook/deploy.js +0 -152
  50. package/dist/core/nook/deploy.js.map +0 -1
  51. package/dist/core/nook/index.js +0 -5
  52. package/dist/core/nook/index.js.map +0 -1
  53. package/dist/core/nook/setup.js +0 -429
  54. package/dist/core/nook/setup.js.map +0 -1
  55. package/dist/core/nook/validation.js +0 -164
  56. package/dist/core/nook/validation.js.map +0 -1
  57. package/dist/core/static/code_mode/nook/documentation.md +0 -144
  58. package/dist/core/static/code_mode/nook/sandbox_runner.mjs +0 -1
  59. package/dist/core/static/tau_docs/nook.md +0 -270
  60. package/dist/nook/worker/index.js +0 -1175
  61. package/dist/nook/worker/index.js.map +0 -1
@@ -1,144 +0,0 @@
1
- # tau.nook
2
-
3
- Manage static sites, reusable source templates, and per-site JSON KV on the configured Nook deployment. Use absolute paths for file and directory arguments; these refer to files on your machine.
4
-
5
- ## Interface
6
-
7
- ```ts
8
- type NookApi = {
9
- skill(): Promise<string>;
10
- sites: SitesApi;
11
- templates: TemplatesApi;
12
- kv: KvApi;
13
- };
14
- ```
15
-
16
- ## `tau.nook.skill()`
17
-
18
- Takes no arguments and returns the app-authoring guide as a string, including the browser SDK and KV contract. When authoring or modifying an app, retrieve it in a separate documentation-only call and read it before subsequent work:
19
-
20
- ```js
21
- printText(await tau.nook.skill());
22
- ```
23
-
24
- Do not combine this retrieval with management operations. Reuse a guide already visible in the conversation. This reference describes management methods, not the API available inside a hosted app.
25
-
26
- ## Sites
27
-
28
- ```ts
29
- type Visibility = "private" | "public";
30
- type Site = {
31
- slug: string;
32
- url: string;
33
- createdAt?: string;
34
- updatedAt?: string;
35
- latestDeploymentId?: string;
36
- visibility?: Visibility;
37
- kv?: { keyCount: number; bytesUsed: number; maxKeys: number; maxBytes: number };
38
- };
39
- type Deployment = {
40
- site: string;
41
- url: string;
42
- visibility: Visibility;
43
- deploymentId: string;
44
- fileCount: number;
45
- byteCount: number;
46
- };
47
- type SiteCopy = Omit<Deployment, "url"> & { directory: string };
48
-
49
- type SitesApi = {
50
- list(): Promise<Site[]>;
51
- copy(site: string, directory: string): Promise<SiteCopy>;
52
- deploy(site: string, directory: string, options: { visibility: Visibility }): Promise<Deployment>;
53
- delete(site: string): Promise<{ site: string; deleted: boolean }>;
54
- };
55
- ```
56
-
57
- These methods are called on `tau.nook.sites`:
58
-
59
- - `list()`: list site summaries. Deployment and KV metadata may be absent for an undeployed site.
60
- - `copy(site, directory)`: copy the active deployment into an existing empty directory. Downloads are verified against the manifest before writing. Interruption during file writes can leave a partial destination; inspect it before retrying.
61
- - `deploy(site, directory, { visibility })`: publish the directory as the new active deployment, creating the site if needed. Visibility is required, never implicit. KV survives redeploys. The result's `url` is the link to return to the user.
62
- - `delete(site)`: delete the site and its managed state. This is destructive; `deleted` reports whether anything was deleted.
63
-
64
- Site slugs are 2–63 lowercase letters, digits, or hyphens, starting and ending with a letter or digit. Reserved slugs are `admin`, `api`, `assets`, `login`, `logout`, `nook`, `quick`, `static`, and `www`.
65
-
66
- Deploy built static output, not an editable source tree unless it is already the complete artifact. A deployment requires root `index.html`. Limits: 1,000 files, 10 MiB per file, 100 MiB total, paths up to 512 characters. Hidden paths, symlinks, traversal, and `/__nook` or its descendants are rejected. Build relative asset URLs or use the site's `/<slug>/` base path.
67
-
68
- ```js
69
- const deployed = await tau.nook.sites.deploy("demo", "/absolute/path/to/built-app", {
70
- visibility: "private",
71
- });
72
- printText(`${deployed.url} (${deployed.visibility})`);
73
- ```
74
-
75
- Replace the example directory with the absolute path of an existing built artifact. Nook uploads files; it does not run a build command.
76
-
77
- ## Templates
78
-
79
- Templates are reusable editable directory snapshots, separate from deployed sites.
80
-
81
- ```ts
82
- type Template = {
83
- name: string;
84
- revisionId: string;
85
- createdAt: string;
86
- updatedAt: string;
87
- fileCount: number;
88
- byteCount: number;
89
- };
90
- type TemplatesApi = {
91
- list(): Promise<Template[]>;
92
- copy(name: string, directory: string): Promise<Template & { directory: string }>;
93
- save(name: string, directory: string): Promise<Template>;
94
- delete(name: string): Promise<{ template: string; deleted: boolean }>;
95
- };
96
- ```
97
-
98
- These methods are called on `tau.nook.templates`:
99
-
100
- - `list()`: discover available templates and revisions.
101
- - `copy(name, directory)`: copy a verified revision into an existing empty directory. The result includes its summary and the destination.
102
- - `save(name, directory)`: save the directory as the template's new active revision. File/path limits match deployments, but `index.html` is not required.
103
- - `delete(name)`: delete a template, not sites built from it.
104
-
105
- Template names follow the same 2–63-character format as site slugs, without the site reserved-name list. A copied template is a source snapshot, not necessarily a built static artifact. Saving a template does not deploy it.
106
-
107
- ## Per-site KV
108
-
109
- Values are JSON, not files or arbitrary JavaScript objects. Keys are 1–256 characters, each encoded value is at most 64 KiB, and each site permits up to 1,000 keys and 5 MiB total storage.
110
-
111
- ```ts
112
- type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
113
- type KvEntry = { key: string; sizeBytes: number; updatedAt: string };
114
- type KvApi = {
115
- get(site: string, key: string): Promise<Json>;
116
- getToFile(site: string, key: string, file: string): Promise<{
117
- site: string; key: string; file: string; bytes: number;
118
- }>;
119
- put(site: string, key: string, value: Json): Promise<{ site: string; key: string }>;
120
- putFromFile(site: string, key: string, file: string): Promise<{
121
- site: string; key: string; file: string;
122
- }>;
123
- delete(site: string, key: string): Promise<{ site: string; key: string; deleted: boolean }>;
124
- list(site: string, options?: { prefix?: string }): Promise<KvEntry[]>;
125
- };
126
- ```
127
-
128
- These methods are called on `tau.nook.kv`:
129
-
130
- - `get`: returns the stored value directly, not an envelope. Missing keys return `null`, indistinguishable from a stored JSON null; use `list` when existence matters. Inspect the value before accessing fields.
131
- - `getToFile`: writes JSON to the specified file, creating parent directories as needed. It may overwrite an existing file.
132
- - `put`: stores or replaces one key's JSON value.
133
- - `putFromFile`: parses UTF-8 JSON from a file of at most 64 KiB and stores its value.
134
- - `delete`: removes one key; check `deleted` if existence matters.
135
- - `list`: returns key metadata, not values; optional `prefix` restricts matching keys. There is no pagination argument.
136
-
137
- ```js
138
- const keys = await tau.nook.kv.list("demo", { prefix: "todos/" });
139
- for (const entry of keys) printText(`${entry.key}: ${entry.sizeBytes} bytes`);
140
- ```
141
-
142
- ## Limits and failures
143
-
144
- Invalid arguments, failed requests, invalid artifacts, and exceeded quotas throw. Mutations and local file writes are not rolled back when a program fails or is interrupted. Inspect current site, template, KV, or file state before retrying an uncertain mutation.
@@ -1 +0,0 @@
1
- import "../sandbox_runner.mjs";
@@ -1,270 +0,0 @@
1
- # Nook
2
-
3
- Nook is Tau's optional platform for publishing small static apps, each at its own path under one hostname. Each site has its built front-end files and its own JSON KV store. Tau deploys and manages sites with its own authenticated client.
4
-
5
- Nook V0 is deliberately small. It hosts static files on Cloudflare only and does not run applications. Build an app before deploying it. Nook does not run server code for a site, set up custom domains per app, keep a rollback history, or build a source repository for you.
6
-
7
- ## V0 at a glance
8
-
9
- A Nook deployment has one configured hostname and many sites:
10
-
11
- ```text
12
- https://apps.example.net/roadmap/
13
- https://apps.example.net/release-notes/
14
- ```
15
-
16
- Each site has one active deployment of static files, a visibility of `private` or `public`, and its own JSON KV store that survives redeploys. Templates are stored copies of editable directories. You can copy one into a working directory, change and build it with your usual tools, and then deploy it.
17
-
18
- V0 has no dashboards, subdomain site URLs, deploy rollback, audit logs, ownership roles, realtime APIs, AI proxy APIs, ignore files, or support for providers other than Cloudflare. `.gitignore` and `.nookignore` have no effect, so the deploy directory must contain only the files you mean to publish.
19
-
20
- ## Ownership and apply boundaries
21
-
22
- Nook involves three parties:
23
-
24
- - Cloudflare runs the deployed Worker and holds its route, R2 files, Durable Object state, DNS, and Access application.
25
- - The Tau CLI, or the session host, holds the Nook credentials and makes the authenticated management requests.
26
- - The session's execution environment holds the files that the `tau.nook` capability reads or writes.
27
-
28
- Paths given to the `tau nook` CLI are on the machine running the command. Paths used by the agent are in the session's execution environment, even when the host is on another machine. The model's code never receives the Access secret, files, environment variables, network access, or `fetch`.
29
-
30
- The `nook` config block can be set at global or project level, and the most specific complete object wins. A session reads it when created and on `/reload`. CLI commands read the configuration for the directory they are started in. See [configuration](configuration.md) and [ownership and scope](ownership-and-scope.md) before operating Nook from an attached or hosted session.
31
-
32
- ## Set up the Cloudflare deployment
33
-
34
- Before setup, prepare:
35
-
36
- - a Cloudflare account and zone for the chosen hostname
37
- - Wrangler installed on `PATH`
38
- - `CLOUDFLARE_API_TOKEN` available, so Wrangler authenticates without prompts
39
- - npm and network access, so Tau can prepare the Worker package it ships
40
- - a plan for a Cloudflare Access self-hosted application that protects the control plane
41
-
42
- Run:
43
-
44
- ```sh
45
- tau nook setup \
46
- --domain apps.example.net \
47
- --zone-name example.net \
48
- --access-team-domain https://engineering.cloudflareaccess.com \
49
- --access-aud 7f20d9d8c3a14f1fa8c3a5513b91d440
50
- ```
51
-
52
- The command deploys the Worker as `tau-nook`, creates or reuses the `tau-nook-assets` R2 bucket, and adds a route for `apps.example.net/*`. It writes the Access team domain and application audience into the Worker's configuration so the Worker can validate Access identities.
53
-
54
- The same values can come from `NOOK_DOMAIN`, `NOOK_ZONE_NAME`, `NOOK_ACCESS_TEAM_DOMAIN`, and `NOOK_ACCESS_AUD`. Flags win over these variables.
55
-
56
- Setup does **not** create DNS records, an Access application, Access policies, or a service token. Complete those steps in Cloudflare after deployment.
57
-
58
- ## Configure the Access topology
59
-
60
- Create one self-hosted Cloudflare Access application for exactly:
61
-
62
- ```text
63
- https://apps.example.net/__nook/*
64
- ```
65
-
66
- Do not protect the whole hostname. Requests for public sites must reach the Worker without signing in, while management stays behind Access.
67
-
68
- For that Access application:
69
-
70
- 1. Use the audience passed to `--access-aud`.
71
- 2. Disable the **Cookie Path Attribute**, so the Access cookie applies to the whole hostname and not only to `/__nook/*`.
72
- 3. Add user Allow policies for people who may open private sites.
73
- 4. Add a Service Auth policy for a Cloudflare Access service token used by Tau.
74
- 5. Configure DNS for the chosen hostname and verify it routes to the Worker.
75
-
76
- This gives two kinds of paths:
77
-
78
- - `/__nook/*` is the control plane for management and sign-in, protected by Access.
79
- - `/<site>/*` serves the sites. Public sites need no sign-in. A browser opening a private site is sent through `/__nook/auth` to sign in, and then uses the Access identity that is valid for the whole hostname.
80
-
81
- Tau sends service-token headers only to get past Cloudflare Access. The Worker decides what a request may do by validating the Access JWT, never by trusting those headers.
82
-
83
- ## Configure Tau
84
-
85
- Create the Access service token, then add one Nook target to your Tau config:
86
-
87
- ```json
88
- {
89
- "nook": {
90
- "domain": "apps.example.net",
91
- "accessClientId": "service-token-id.access",
92
- "accessClientSecretEnv": "NOOK_ACCESS_CLIENT_SECRET"
93
- }
94
- }
95
- ```
96
-
97
- `domain` is required and must be a DNS hostname without a path, port, query, or fragment. The other fields are optional in the schema, but because the control plane is behind Access you normally need both a client ID and a secret.
98
-
99
- The secret resolves in this order:
100
-
101
- 1. a non-empty environment variable named by `accessClientSecretEnv`
102
- 2. inline `accessClientSecret`
103
-
104
- No fixed environment variable overrides these for ordinary Nook operations. `NOOK_ACCESS_CLIENT_SECRET` is used only when the config names it, and by the destroy command described below. Keep the secret on the process that performs the operation: the CLI process for `tau nook`, or the session host for the agent's capability. See [credentials](credentials.md).
105
-
106
- A new CLI command picks up environment changes. For a running session, run `/reload` while idle after changing the config that applies to its working directory.
107
-
108
- ## Deploy and inspect sites
109
-
110
- Deploy a finished static directory:
111
-
112
- ```sh
113
- tau nook deploy ./dist --site roadmap
114
- tau nook list
115
- ```
116
-
117
- CLI deployments are private by default. Add `--public` only when anyone should be able to open the site, which also lets anyone write its browser KV:
118
-
119
- ```sh
120
- tau nook deploy ./dist --site roadmap --public
121
- ```
122
-
123
- Every successful deploy replaces all of the site's files and sets its visibility from that command. Leaving out `--public` on the next deploy makes the site private again. The site's KV survives either change.
124
-
125
- Site slugs are 2 to 63 lowercase letters, digits, or hyphens, and must start and end with a letter or digit. Tau reserves `admin`, `api`, `assets`, `login`, `logout`, `nook`, `quick`, `static`, and `www`.
126
-
127
- A site is served at `https://<domain>/<slug>/`, and `/<slug>` redirects to that URL. For a missing path without a file extension, Nook serves the root `index.html`, so single-page apps work. A missing path with a file extension returns not found. Use relative asset URLs, or build the app with the base path `/<slug>/`.
128
-
129
- To download a site's current files into a local directory:
130
-
131
- ```sh
132
- mkdir restored-roadmap
133
- tau nook copy roadmap ./restored-roadmap
134
- ```
135
-
136
- The destination must already exist and be empty. Tau downloads every file and checks sizes and hashes before writing. The site's KV data is not included.
137
-
138
- Delete a site only when you no longer need its files or its stored state:
139
-
140
- ```sh
141
- tau nook delete roadmap
142
- ```
143
-
144
- Deleting a site cannot be undone, and V0 keeps no earlier versions.
145
-
146
- ## Artifact rules and limits
147
-
148
- A deploy directory must contain `index.html` at its root. Tau checks every path in the directory and rejects the deploy if any breaks these rules:
149
-
150
- - hidden files or directories are forbidden, including `.env`, `.git`, and `.DS_Store`
151
- - symlinks are forbidden
152
- - paths under `/__nook` are reserved
153
- - traversal, absolute filesystem paths, null bytes, duplicate paths, and non-normalized paths are forbidden
154
- - at most 1,000 files may be deployed
155
- - each file may be at most 10 MiB
156
- - total content may be at most 100 MiB
157
- - each deployed path may be at most 512 characters
158
-
159
- Tau sets common content types from file extensions and uses `application/octet-stream` for the rest. Each upload is checked against its declared size and SHA-256 digest. Browsers must revalidate cached files, so a new deployment shows up even when file names do not contain content hashes.
160
-
161
- Nook ignores ignore files. Build into a clean output directory instead of deploying a repository root. Never work around the hidden-file rule by copying credentials into files without a leading dot.
162
-
163
- ## Templates
164
-
165
- Templates are reusable directory copies stored in your Nook deployment. They are not sites. Tau does not fill in placeholders or run installs or builds for them.
166
-
167
- ```sh
168
- tau nook template save vite-static ./starter
169
- tau nook template list
170
- mkdir next-app
171
- tau nook template copy vite-static ./next-app
172
- ```
173
-
174
- `save` creates or replaces the named template. `copy` needs an existing empty destination and checks all downloaded files before writing. Templates follow the same rules and limits as deployments for paths, hidden files, symlinks, file count, and size, but do not need a root `index.html`.
175
-
176
- Template names follow the same format as site slugs. The names reserved for sites are allowed for templates.
177
-
178
- Delete a template only when you no longer need it:
179
-
180
- ```sh
181
- tau nook template delete vite-static
182
- ```
183
-
184
- Deleting a template does not delete sites that were built from it.
185
-
186
- ## Manage per-site KV
187
-
188
- Each site has its own KV store of JSON values. The CLI can read and change it directly:
189
-
190
- ```sh
191
- tau nook kv put roadmap settings '{"theme":"dark"}'
192
- tau nook kv get roadmap settings
193
- tau nook kv list roadmap --prefix releases/
194
- tau nook kv delete roadmap settings
195
- ```
196
-
197
- The `put` value must be valid JSON. Keys are 1 to 256 characters. Each value is limited to 64 KiB, and each site is limited to 1,000 keys and 5 MiB total JSON storage.
198
-
199
- Apps in the browser use their site's KV from the same origin. On a public site, anyone can open the app and use its KV, so the KV is **writable by anyone**. Never store secrets, access tokens, private user data, or data whose integrity matters in a public site's KV. A private site requires a valid Cloudflare Access identity both to open the site and to use its KV.
200
-
201
- The CLI and the agent manage KV through the control plane behind Access, not through the browser path. The browser API and its examples are documented in the Nook skill that each deployment provides, so they match that deployment's version.
202
-
203
- ## Use the agent capability
204
-
205
- The `tau.nook` capability in the agent's `code` tool is available only when:
206
-
207
- - the current persona selects `nook`, and
208
- - the session's configuration contains a valid `nook` block.
209
-
210
- The host makes the authenticated Nook requests, outside the model's code. Files for deploys, copies, templates, and KV come from the session's execution environment. The agent uses the capability only when asked to work with Nook, publish or host a site, or manage Nook KV.
211
-
212
- The agent reads documentation in two separate steps:
213
-
214
- 1. Before using the management API, it reads the built-in `docs`. If it has not seen them, its first call only prints them, and later calls use the API. Documentation already in the conversation is reused.
215
- 2. Before writing an app, it makes a separate call that only prints `nook.skill()`, the authoring guide that the deployment provides, and reads it before writing files.
216
-
217
- This page does not describe either API. The deployed skill covers the browser API and app authoring, so it always matches that deployment's version. General tool eligibility and code-mode behavior are covered in [tools](tools.md).
218
-
219
- ## Verify a deployment
220
-
221
- Check both management and the browser:
222
-
223
- 1. Run `tau nook list` from a directory whose config contains the intended target.
224
- 2. Deploy a small private site with a root `index.html` and nothing sensitive in it.
225
- 3. Open its trailing-slash URL in a browser and complete Access login.
226
- 4. Confirm that its assets resolve beneath the site path.
227
- 5. Write a throwaway KV key through the app or the CLI, then delete it.
228
- 6. If public access is required, redeploy with `--public` and test from a browser without an Access session.
229
-
230
- A successful Worker deployment does not prove that DNS, the Access cookie scope, user policies, the service token policy, or Tau's credentials are right.
231
-
232
- ## Common errors
233
-
234
- **`nook is not configured`.** Add the `nook` block at a config level that applies to the command or session. For an agent session, run `/reload` while idle or create a new session.
235
-
236
- **A CLI command gets an Access login page or an authorization error.** Confirm that Access protects only `/__nook/*`, the service token has a Service Auth policy, both token fields are available to the process running the command, the configured domain matches the deployed hostname, and the Worker was set up with the right Access team domain and audience.
237
-
238
- **A private site keeps redirecting, or browser KV says authentication is required.** Disable the Access application's Cookie Path Attribute, and check the user Allow policy and the audience. The cookie must be valid for the whole hostname so the Worker can accept `/<site>/*` requests after `/__nook/auth`.
239
-
240
- **A public site still asks for Access.** The Access application probably covers the whole hostname instead of only `/__nook/*`, or the latest deploy left out `--public` and made the site private again.
241
-
242
- **Files load at `/` during local development but fail after deploy.** Build for the `/<site>/` base path or use relative URLs. Nook does not rewrite absolute asset URLs.
243
-
244
- **Deploy rejects hidden files or symlinks.** Use a clean build output. Ignore files have no effect on what Nook deploys.
245
-
246
- **Copy refuses the destination.** Create an empty directory first. Tau never merges downloaded files into existing content.
247
-
248
- **The agent does not have the capability.** Check both the persona's tools and the `nook` config in the session's execution environment, then `/reload` while idle and start a new turn. The config block alone is not enough if the persona does not select `nook`. Subagents get Nook only when the main persona has it.
249
-
250
- **The CLI works but the agent does not, or the other way around.** The CLI uses the configuration and credentials of the machine running it, and the agent's capability uses the session's configuration and the host's credentials. Start with `tau nook --help` and `tau nook list`, which shows URLs and visibility without printing secrets.
251
-
252
- **A site has the wrong visibility.** Check it with `tau nook list`, then redeploy reviewed content with or without `--public`. If something sensitive was public, rotate exposed credentials right away and remove sensitive KV entries with `tau nook kv delete`, because KV survives redeploys. Use `tau nook delete` only when you mean to take the site offline.
253
-
254
- **Setup or destroy fails before reaching Cloudflare.** Both need Wrangler on `PATH` and `CLOUDFLARE_API_TOKEN`, so Wrangler can sign in without prompts. Compare this page and `tau nook --help` with the deployed Worker's version before upgrading or changing infrastructure.
255
-
256
- ## Destroy the platform
257
-
258
- Destroy removes all Nook data and infrastructure, not just one site. It first calls the authenticated cleanup endpoint to delete every site's Durable Object data and Nook's R2 objects, then tries to delete the `tau-nook` Worker and the `tau-nook-assets` bucket.
259
-
260
- Pass the cleanup credentials as environment variables, so the secrets stay out of shell history:
261
-
262
- ```sh
263
- tau nook destroy --domain apps.example.net --yes
264
- ```
265
-
266
- The command reads `NOOK_ACCESS_CLIENT_ID` and `NOOK_ACCESS_CLIENT_SECRET`. Flags with the same names also work, but expose the values more easily. It accepts `NOOK_DOMAIN` instead of `--domain`, and needs `CLOUDFLARE_API_TOKEN` for Wrangler.
267
-
268
- This deletes data permanently. Before running it, make sure every site, template, and KV store is either disposable or saved elsewhere. If the data cleanup fails, Tau stops before deleting any infrastructure. Worker and bucket deletion failures are reported separately and can leave a partial deployment, so read every result line.
269
-
270
- Destroy does not remove DNS records, the Cloudflare Access application, its policies, or service tokens. Remove those yourself once the Nook hostname no longer serves anything you need, then remove the Tau config and credentials you no longer use.