@sightmap/sightkick 0.1.0 → 0.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sightmap/sightkick",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "sightkick — compile a webmcp.tools.yaml + sightmap corpus into WebMCP tool IR, and install the sightkick agent skills (native binary, no Go toolchain required)",
5
5
  "license": "MIT",
6
6
  "homepage": "https://sightmap.org",
@@ -34,11 +34,11 @@
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@sightmap/sightkick-darwin-arm64": "0.1.0",
38
- "@sightmap/sightkick-darwin-x64": "0.1.0",
39
- "@sightmap/sightkick-linux-arm64": "0.1.0",
40
- "@sightmap/sightkick-linux-x64": "0.1.0",
41
- "@sightmap/sightkick-win32-arm64": "0.1.0",
42
- "@sightmap/sightkick-win32-x64": "0.1.0"
37
+ "@sightmap/sightkick-darwin-arm64": "0.2.0",
38
+ "@sightmap/sightkick-darwin-x64": "0.2.0",
39
+ "@sightmap/sightkick-linux-arm64": "0.2.0",
40
+ "@sightmap/sightkick-linux-x64": "0.2.0",
41
+ "@sightmap/sightkick-win32-arm64": "0.2.0",
42
+ "@sightmap/sightkick-win32-x64": "0.2.0"
43
43
  }
44
44
  }
@@ -17,33 +17,36 @@ a page: `sightmap browser eval` injects the runtime bundle, then
17
17
 
18
18
  ## Prerequisites
19
19
 
20
- This skill is a thin layer over the sightmap toolchain it drives `sightmap
21
- browser` and reads a `.sightmap/` corpus so it does **not** vendor the sightmap
22
- skills; it depends on them. Make sure they're installed:
20
+ This skill uses two CLIs: **`sightkick`** (to build the IR and emit the runtime
21
+ bundle) and **`sightmap`** (to drive the live browser session). Install whichever
22
+ isn't already on your PATH, plus the supporting sightmap skills:
23
23
 
24
24
  ```sh
25
+ npm i -g @sightmap/sightkick # the sightkick CLI (build + runtime + skills)
25
26
  npx @sightmap/sightmap skills install # or: sightmap skills install (if already on PATH)
26
27
  sightmap browser install # Chrome-for-Testing; needs >=152 for native document.modelContext
27
28
  ```
28
29
 
29
30
  That installs the **`sightmap-browser`** skill (driving a live session) and
30
31
  **`sightmap-authoring`** skill (building the `.sightmap/` corpus) alongside this
31
- one — everything needed to build and test a `webmcp.tools.yaml`. Paths below are
32
- relative to the **sightkick repo root**.
32
+ one — everything needed to build and test a `webmcp.tools.yaml`. No repo checkout
33
+ is required; `<CORPUS_DIR>` below is any directory holding a `webmcp.tools.yaml`
34
+ + `.sightmap/` corpus.
33
35
 
34
36
  ## 1. Build the two artifacts
35
37
 
38
+ Both come straight from the installed `sightkick` CLI:
39
+
36
40
  ```sh
37
- # The payload: the standalone runtime bundle (exposes window.__sightkick.load).
38
- ( cd packages/runtime && node build.mjs ) # -> packages/runtime/dist/sightkick-runtime.js
41
+ # The payload: the runtime bundle (exposes window.__sightkick.load).
42
+ sightkick runtime -o /tmp/sightkick-runtime.js
39
43
 
40
44
  # The IR for the corpus you're testing (any dir with webmcp.tools.yaml + .sightmap/).
41
- ( cd generator && go run . build <CORPUS_DIR> -o /tmp/x.ir.json )
42
- # e.g. <CORPUS_DIR> = ../examples/search or ../../sites/netlify
45
+ sightkick build <CORPUS_DIR> -o /tmp/x.ir.json
43
46
  ```
44
47
 
45
- Rebuild the IR whenever the corpus/manifest changes; rebuild the bundle whenever
46
- runtime source changes.
48
+ Rebuild the IR whenever the corpus/manifest changes. The runtime bundle is
49
+ embedded in the CLI, so re-emit it after upgrading `sightkick`.
47
50
 
48
51
  ## 2. Pick a mode, start the session
49
52
 
@@ -61,13 +64,16 @@ sightmap browser start --detach --url <SITE_URL> --profile /tmp/sk-dbg
61
64
 
62
65
  ### Mode B — inspector/Gemini-driven (native WebMCP surface)
63
66
  Turn on the blink flags so Chrome exposes the real `document.modelContext`, and
64
- load the vendored **WebMCP inspector** (drive-with-Gemini sidebar). Our tools
65
- register on the native surface, so the inspector reads them like any site's own.
66
- See **`vendor/webmcp-tool/NOTES.md`** for the flag/CfT-version rationale:
67
+ load the **WebMCP inspector** (a drive-with-Gemini sidebar). Our tools register on
68
+ the native surface, so the inspector reads them like any site's own. The inspector
69
+ isn't shipped with the CLI — use the vendored copy in the sightkick repo
70
+ (`vendor/webmcp-tool/unpacked`, whose `NOTES.md` explains the flag/CfT-version
71
+ rationale) or install it from the Chrome Web Store. Point `<INSPECTOR_DIR>` at its
72
+ unpacked directory:
67
73
 
68
74
  ```sh
69
75
  sightmap browser start --detach --url <SITE_URL> --profile /tmp/sk-dbg \
70
- --extensions ~/.sightmap/extension,"$PWD/vendor/webmcp-tool/unpacked" \
76
+ --extensions ~/.sightmap/extension,<INSPECTOR_DIR> \
71
77
  --chrome-flag=--enable-blink-features=ModelContext,ModelContextTesting \
72
78
  --chrome-flag=--enable-features=DevToolsWebMCPSupport
73
79
  ```
@@ -85,8 +91,7 @@ sightmap browser eval "typeof document.modelContext" # object
85
91
  ## 3. Inject the runtime + IR
86
92
 
87
93
  ```sh
88
- BUNDLE="$PWD/packages/runtime/dist/sightkick-runtime.js"
89
- sightmap browser eval "$(cat "$BUNDLE")" # sets window.__sightkick
94
+ sightmap browser eval "$(cat /tmp/sightkick-runtime.js)" # sets window.__sightkick
90
95
  sightmap browser eval "window.__sightkick.load($(cat /tmp/x.ir.json))"
91
96
  ```
92
97
 
@@ -114,8 +119,8 @@ sleep 2; sightmap browser eval "window.__r" # the ToolResult
114
119
 
115
120
  The result envelope is `{content:[{type:'text',text:<ToolResult JSON>}]}`; the
116
121
  `ToolResult` carries `ok`, `value`/`items`, `skipped` (idempotency guard hit),
117
- and `guidance` (next-step breadcrumbs). See `packages/runtime/eval/run.mjs` for a
118
- full scripted example.
122
+ and `guidance` (next-step breadcrumbs). The sightkick repo's
123
+ `packages/runtime/eval/run.mjs` is a full scripted example of this loop.
119
124
 
120
125
  ### Mode B (native): drive via the inspector
121
126
  Open the inspector's sidebar and prompt Gemini — it enumerates