@brmbh/tack 0.1.0 → 0.1.1

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 (2) hide show
  1. package/README.md +32 -11
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -14,7 +14,12 @@ HTML, Vite, Next, Astro, WordPress, PHP. It runs only on your machine.
14
14
 
15
15
  ## Install
16
16
 
17
- **With your agent** (Claude Code, Codex, Cursor, Gemini CLI, Copilot…): paste this into it, in your project.
17
+ **Which agent:** the coding agent that works **in your project folder**, the one that can read and
18
+ change your files and knows your codebase (Claude Code, Codex, Cursor, Gemini CLI, Copilot,
19
+ opened in that folder). Not a browser chat like claude.ai or ChatGPT: it can't see your code, so
20
+ it can't act on the notes. Tack points; that agent finds the right place in your code or CMS.
21
+
22
+ **With your agent:** paste this into it, in your project.
18
23
 
19
24
  ```text
20
25
  Set me up to use Tack in this project. Run `npx -y @brmbh/tack@latest init` in the project root;
@@ -61,7 +66,8 @@ Feedback is written to `<project>/.tack/`, as `notes.json` (the source of truth)
61
66
 
62
67
  1. **Skill** (Claude Code, Codex, Cursor and every agent that reads `.agents/skills`): run
63
68
  `tack init` in the project, or `tack init --global`, then tell the agent "do the tack notes".
64
- 2. **MCP**: `claude mcp add tack -- tack mcp`. Tools: `tack_list`, `tack_get`,
69
+ 2. **MCP**: `claude mcp add tack -- tack mcp` (without a global install:
70
+ `claude mcp add tack -- npx -y @brmbh/tack mcp`). Tools: `tack_list`, `tack_get`,
65
71
  `tack_resolve`, `tack_reply`.
66
72
  3. **CLI** (any agent that can run shell commands):
67
73
  ```bash
@@ -123,6 +129,14 @@ in the project). Point it at notes outside the repo with `.tack/config.json`:
123
129
  It never writes files, and refuses `.env*`, keys and `.git/`. What it reads is sent to the
124
130
  model provider you chose.
125
131
 
132
+ **Security.** tack listens on `127.0.0.1` only and answers only requests addressed to
133
+ `localhost` / `127.0.0.1` (a foreign site re-resolved to your machine, "DNS rebinding", gets
134
+ `421`). Every write to its API must come from tack's own pages, or from a tool without a
135
+ browser such as the CLI, and be JSON, so other sites open in your browser can't change
136
+ settings or spend your tokens. The key file is plain text with mode 600, like `~/.npmrc`:
137
+ any program running as your user can read it. Prefer the env vars if you keep keys in a
138
+ secrets manager. `--host 0.0.0.0` turns the host check off (you're exposing tack on purpose).
139
+
126
140
  ## Options
127
141
 
128
142
  ```
@@ -154,8 +168,15 @@ model provider you chose.
154
168
  (`is-*`, `split-*`, `line`, `word`…) never go into selectors, and a pin is only drawn if the
155
169
  element's tag and text still match. Otherwise tack looks for the element by text.
156
170
  - **Redirects** pass through with their `Location` (rewritten when it points back at the
157
- target). A redirect to another host (apex → `www`, locale subdomains) leaves the proxy: use
158
- the final URL as `--target`.
171
+ target). If the target's root redirects to another host at startup (apex → `www`,
172
+ http → https), tack proxies the final host instead. A later redirect to another host
173
+ (e.g. a locale subdomain) leaves the proxy; tack prints and logs the `--target` to use.
174
+ - **One tack per project**: starting tack again for the same project with another `--target`
175
+ switches the running proxy (same port, notes kept) instead of starting a second one.
176
+ Tools can do the same with `POST /__tack/api/target {"target": "…"}`.
177
+ - **For tools on the page**: `window.__tack` carries `version` and `contract` (the page-event
178
+ contract version); `/__tack/api/status` reports both. Nothing is added to `<html>` and the
179
+ console bridge removes its own `<script>`, so SSR hydration (React, Next) sees the server's markup.
159
180
  - **Revalidation**: conditional request headers are stripped, so every request gets a full
160
181
  response. A passed-through 304 had turned into an empty 200 (a broken web manifest).
161
182
 
@@ -172,12 +193,12 @@ Requires [Bun](https://bun.sh) ≥ 1.2 to develop; users get a compiled binary.
172
193
  ## Release
173
194
 
174
195
  ```bash
175
- bun run build # dist/npm/tack + dist/npm/tack-<platform> (5 binaries)
176
- npm login # once, account with publish rights on @brmbh
177
- for d in dist/npm/tack-*; do (cd "$d" && npm publish --access public); done
178
- (cd dist/npm/tack && npm publish --access public) # last: it depends on the binaries
196
+ # bump "version" in package.json, commit
197
+ bun run release --dry-run # checks, build of all 5 binaries, smoke test of this platform
198
+ bun run release # the same, then publish (platform packages first), wait for npm, tag vX.Y.Z
179
199
  ```
180
200
 
181
- Bump `version` in `package.json` first; every package gets the same version.
182
- Known limit: the darwin-x64 binary crashes under Rosetta (x64 Node on Apple Silicon), real
183
- Intel Macs are fine. Use an arm64 Node on Apple Silicon.
201
+ Run it in a real terminal: with a passkey, npm confirms each package in the browser
202
+ (`--auth-type=web`). A granular npm token with publish rights on `@brmbh/tack*` and 2FA bypass
203
+ (in `NPM_TOKEN` or `~/.npmrc`) skips the confirmations. CI (`release-smoke`) builds and
204
+ smoke-tests every platform on its own runner on each push.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brmbh/tack",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Point at your running site, comment or edit text in place, and hand the feedback to your coding agent.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/brmbh/tack",
@@ -26,10 +26,10 @@
26
26
  "node": ">=18"
27
27
  },
28
28
  "optionalDependencies": {
29
- "@brmbh/tack-darwin-arm64": "0.1.0",
30
- "@brmbh/tack-darwin-x64": "0.1.0",
31
- "@brmbh/tack-linux-x64": "0.1.0",
32
- "@brmbh/tack-linux-arm64": "0.1.0",
33
- "@brmbh/tack-windows-x64": "0.1.0"
29
+ "@brmbh/tack-darwin-arm64": "0.1.1",
30
+ "@brmbh/tack-darwin-x64": "0.1.1",
31
+ "@brmbh/tack-linux-x64": "0.1.1",
32
+ "@brmbh/tack-linux-arm64": "0.1.1",
33
+ "@brmbh/tack-windows-x64": "0.1.1"
34
34
  }
35
35
  }