@cookiepal-oss/agent 0.0.0-stage → 0.2.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 cookiepal-oss
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,33 @@
1
- # Temporary Holding Version
1
+ # @cookiepal-oss/agent
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The local steps of the CookiePal agent plugin. An AI coding agent (Claude Code, Codex or Cursor) runs them on the user's machine around the CookiePal MCP server's tools: preparing a page for `plan_check`, loading it in a fresh browser profile, crawling a site for `start_scan`, and checking what goes back to the server. Nothing here is meant to be typed by hand.
4
+
5
+ In Codex and Cursor, the plugin's skills run it through npx, pinned to the exact version the plugin was built with:
6
+
7
+ ```bash
8
+ npx -y @cookiepal-oss/agent@<version> prepare <<'URL'
9
+ https://example.com/
10
+ URL
11
+ ```
12
+
13
+ npx needs no plugin folder, which is the point: Codex and Cursor never tell a skill where a plugin lives. Claude Code runs the copy the plugin carries in its `dist/`, from both its skills and its hooks, so it works offline and never calls npx.
14
+
15
+ ## Where it keeps its files
16
+
17
+ In Claude Code, `COOKIEPAL_DATA_DIR`, which the plugin sets to its data folder; the check refuses to run without it. Codex's hooks always use `~/.cookiepal/plugin-data`, whatever `COOKIEPAL_DATA_DIR` says, so they share one folder with the skills. Everywhere else, `COOKIEPAL_DATA_DIR` when it is set, and `~/.cookiepal/plugin-data` when it is empty or unset.
18
+
19
+ ## Cursor's hooks
20
+
21
+ Cursor never runs a plugin's hooks, so `cursor-hooks install` adds two user hooks to `~/.cursor/hooks.json`, after the user agrees. Install copies `dist/` to `~/.cookiepal/agent/<version>/`, and writes a small launcher next to `hooks.json`: `cookiepal-hook.sh`, or `cookiepal-hook.cmd` on Windows. Each hook runs the launcher. It starts the copy with the Node that ran the install, or else with the first Node 18 or later it finds on `PATH` or in the usual install places. If it finds no usable Node, or the copy is gone, it refuses calls to CookiePal's server and allows every other server's. `cursor-hooks status` reports whether the hooks are installed for the running version and Node. `cursor-hooks uninstall` removes the hooks, the launcher and the copy, and keeps every other hook.
22
+
23
+ ## What it bundles
24
+
25
+ `pnpm build` writes `dist/check.mjs` (the command), `dist/scan.mjs` (the detached crawl), `dist/tldts.mjs` and the `@cookiepal-oss/cookie-db` catalogue as `dist/cookies.json`. The package has no runtime dependencies. A scan installs `@cookiepal-oss/cli`'s crawl engine into the data folder on first use rather than bundling Crawlee or Puppeteer.
26
+
27
+ ## Tests
28
+
29
+ ```bash
30
+ pnpm --filter @cookiepal-oss/agent test
31
+ ```
32
+
33
+ Building and testing need Node 22.18 or later: the build script is TypeScript run directly by Node, and the tests spawn the built `dist/check.mjs`, so `test` builds first. The published package runs on Node 18 or later.