wake-agents 0.0.0-stage → 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/README.md CHANGED
@@ -1,3 +1,118 @@
1
- # Temporary Holding Version
1
+ # wake-agents
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
+ Command line for [Wake](https://agent-observatory-desk-production.up.railway.app/wake/): see which AI agents (Claude, ChatGPT, Perplexity, curl/python bots…) reach your site, what they tried, where they got stuck, the ranked fixes, your readiness score, and the AEO listing plan. It is also a stdio MCP bridge so any MCP client can ask Wake directly.
4
+
5
+ Zero dependencies. Node 18+.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm i -g wake-agents # then: wake …
11
+ npx wake-agents status # or one-off
12
+ ```
13
+
14
+ ## Login
15
+
16
+ Mint a key on the desk's **Connect your AI** screen (format `wk_live_` + 40 hex chars), then:
17
+
18
+ ```sh
19
+ wake login # prompts for the key
20
+ wake login --key wk_live_… # or pass it
21
+ ```
22
+
23
+ The key is saved to `~/.config/wake/config.json` (mode 0600; honours `XDG_CONFIG_HOME`). Precedence everywhere: `--key` / `--url` flags, then `WAKE_API_KEY` / `WAKE_API_URL`, then the config file. The CLI never prints a key in full (`wk_live_ab12…`) unless you ask with `--show-key`.
24
+
25
+ ```sh
26
+ wake logout # delete the config file
27
+ ```
28
+
29
+ ## Commands
30
+
31
+ Every report takes `--window 24h|7d|30d` (default `7d`) and `--json` (raw API response on stdout, ideal for piping into `jq`).
32
+
33
+ | Command | What you get | Example |
34
+ | --- | --- | --- |
35
+ | `wake status` | host, verified / provisioned, last event, this window's headline | `wake status` |
36
+ | `wake overview` | events, sessions, agents, conversion, providers, funnel, top friction | `wake overview --window 24h` |
37
+ | `wake agents` | every agent nickname seen, with stage, conversion and friction | `wake agents --json \| jq '.agents[0]'` |
38
+ | `wake sessions` | recent sessions | `wake sessions --limit 20 --nickname quiet-otter` |
39
+ | `wake funnel` | discovered → read_docs → authenticated → attempted_action → converted, with the biggest drop | `wake funnel --window 30d` |
40
+ | `wake friction` | where agents get stuck (auth_wall, action_unauthorized, repeated_error, docs_dead_end…) and the fixes | `wake friction` |
41
+ | `wake fixes` | ranked fixes plus the readiness score and recommendations | `wake fixes` |
42
+ | `wake pages` | page classes and the most common paths through the site | `wake pages` |
43
+ | `wake alerts` | things worth a look right now | `wake alerts` |
44
+ | `wake series` | per-hour (24h) or per-day buckets | `wake series --json` |
45
+ | `wake readiness` | live readiness probe: access / information / measurement scores, `llms.txt` and robots suggestions | `wake readiness --json \| jq -r '.files["llms.txt"]'` |
46
+ | `wake listing` | AEO listing plan, arrivals verdict, discovery files | `wake listing` |
47
+ | `wake listing plan` | ask the desk to (re)plan the listing steps | `wake listing plan` |
48
+ | `wake benchmarks` | your numbers against the cohort medians (withheld while the cohort is small) | `wake benchmarks` |
49
+ | `wake install` | collector status; `--kit --out <dir>` writes `cloudflare-worker.js`, `express.js`, `nextjs-middleware.js`, `README.md` | `wake install --kit --out ./wake-kit` |
50
+ | `wake playbook` | deep-scans the site and writes `wake-playbook.md`: every change for agents and the collector, with exact files and a curl per task, for Claude Code / Cursor / Codex; `--prompt` prints the one-line prompt | `wake playbook --out wake-playbook.md` |
51
+ | `wake export sessions.csv` | sessions as CSV (stdout, or `--out file`) | `wake export sessions --out sessions.csv` |
52
+
53
+ Exit code is `1` on any API error, with a one-line message on stderr (`Not signed in. Run: wake login`, `Site not verified yet…`, `Rate limited…`).
54
+
55
+ ## Use Wake from your AI tools (MCP)
56
+
57
+ Wake exposes an MCP server at `<desk>/api/wake/v1/mcp` (streamable HTTP, bearer auth). `wake connect <client>` prints the exact snippet with your URL and key filled in; `--write` writes the file where the client supports it.
58
+
59
+ **Claude Code**
60
+
61
+ ```sh
62
+ wake connect claude-code
63
+ # → claude mcp add --transport http wake https://…/api/wake/v1/mcp --header "Authorization: Bearer wk_live_…"
64
+ ```
65
+
66
+ **Cursor** — writes/merges `./.cursor/mcp.json`:
67
+
68
+ ```sh
69
+ wake connect cursor --write
70
+ ```
71
+
72
+ **Codex** — add to `~/.codex/config.toml` and export the key:
73
+
74
+ ```sh
75
+ wake connect codex
76
+ ```
77
+
78
+ ```toml
79
+ [mcp_servers.wake]
80
+ url = "https://…/api/wake/v1/mcp"
81
+ bearer_token_env_var = "WAKE_API_KEY"
82
+ ```
83
+
84
+ **Claude Desktop** — stdio only, so it runs the bridge below via `npx`:
85
+
86
+ ```sh
87
+ wake connect claude-desktop --write # merges into claude_desktop_config.json, then restart Claude Desktop
88
+ ```
89
+
90
+ ```json
91
+ { "mcpServers": { "wake": { "command": "npx", "args": ["-y", "wake-agents", "mcp"],
92
+ "env": { "WAKE_API_KEY": "wk_live_…", "WAKE_API_URL": "https://agent-observatory-desk-production.up.railway.app" } } } }
93
+ ```
94
+
95
+ **ChatGPT** — ChatGPT connectors need a hosted MCP server with OAuth, which Wake does not offer yet. Use the bridge or the REST API in the meantime (`wake connect chatgpt` prints the details).
96
+
97
+ **curl / anything else**
98
+
99
+ ```sh
100
+ wake connect curl
101
+ # → curl -H "Authorization: Bearer wk_live_…" "https://…/api/wake/v1/overview?window=7d"
102
+ ```
103
+
104
+ ### `wake mcp` — the stdio bridge
105
+
106
+ Reads newline-delimited JSON-RPC 2.0 messages on stdin, POSTs each one unchanged to `<url>/api/wake/v1/mcp` with your bearer key, and writes each response as one line on stdout. Notifications (no `id`) produce no output; batches are forwarded as-is. Errors go to stderr only, so the stdout stream stays clean for the client.
107
+
108
+ ## Privacy
109
+
110
+ The API (and therefore this CLI) only ever exposes coarse data: daily HMAC nicknames for agents, page classes rather than URLs, HTTP status codes, operator families (Anthropic, OpenAI, …), and country codes. Raw IP addresses, user-agent strings, query strings and request bodies never leave the collector and are never available through any endpoint.
111
+
112
+ ## Development
113
+
114
+ ```sh
115
+ node --test test/wake-cli.test.mjs # from the repo root; spins up a fake API, no network
116
+ ```
117
+
118
+ MIT.
package/bin/wake.mjs ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import { main } from "../lib/cli.mjs";
3
+
4
+ main(process.argv.slice(2)).then(
5
+ (code) => process.exit(typeof code === "number" ? code : 0),
6
+ (err) => {
7
+ process.stderr.write(`wake: ${err?.message || err}\n`);
8
+ process.exit(1);
9
+ }
10
+ );
package/lib/cli.mjs ADDED
@@ -0,0 +1,541 @@
1
+ import fs from "node:fs";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ import readline from "node:readline";
5
+ import { createClient, WakeError, apiBase } from "./client.mjs";
6
+ import { resolveConfig, writeConfig, deleteConfig, configPath, maskKey, KEY_PATTERN, DEFAULT_URL } from "./config.mjs";
7
+ import * as f from "./format.mjs";
8
+
9
+ export const VERSION = "0.1.0";
10
+ const WINDOWS = new Set(["24h", "7d", "30d"]);
11
+ const BOOL_FLAGS = new Set(["json", "kit", "write", "show-key", "help", "version", "plan", "prompt"]);
12
+
13
+ const out = (s = "") => process.stdout.write(s + "\n");
14
+ const err = (s = "") => process.stderr.write(s + "\n");
15
+
16
+ export function parseArgs(argv) {
17
+ const flags = {};
18
+ const positional = [];
19
+ for (let i = 0; i < argv.length; i++) {
20
+ const a = argv[i];
21
+ if (a === "--") { positional.push(...argv.slice(i + 1)); break; }
22
+ if (!a.startsWith("--")) { positional.push(a); continue; }
23
+ const eq = a.indexOf("=");
24
+ const name = eq > -1 ? a.slice(2, eq) : a.slice(2);
25
+ if (eq > -1) { flags[name] = a.slice(eq + 1); continue; }
26
+ if (BOOL_FLAGS.has(name) || argv[i + 1] === undefined || argv[i + 1].startsWith("--")) { flags[name] = true; continue; }
27
+ flags[name] = argv[++i];
28
+ }
29
+ return { flags, positional };
30
+ }
31
+
32
+ const HELP = `wake ${VERSION} — see which AI agents reach your site, and what to fix
33
+
34
+ Usage: wake <command> [options]
35
+
36
+ Account
37
+ login [--key wk_live_…] [--url https://…] Save an API key (minted on the desk's "Connect your AI" screen)
38
+ logout Forget the saved key
39
+ status Site, verification, last event and this window's headline
40
+
41
+ Reports (all accept --window 24h|7d|30d and --json)
42
+ overview Events, sessions, agents, conversion, funnel, top friction
43
+ agents Every agent nickname seen, with stage and friction
44
+ sessions Recent sessions [--limit N] [--nickname X]
45
+ funnel discovered → read_docs → authenticated → attempted_action → converted
46
+ friction Where agents get stuck, with fixes
47
+ fixes Ranked fixes plus the readiness score
48
+ pages Page classes and common paths
49
+ alerts Things worth a look right now
50
+ series Per-hour / per-day buckets
51
+ readiness Readiness probe of the live site (needs a verified site)
52
+ listing AEO listing plan; "wake listing plan" asks the desk to plan it
53
+ benchmarks How your numbers compare to the cohort
54
+ install Collector status; --kit --out <dir> writes the install kit
55
+ playbook Deep-scan the site and write wake-playbook.md for your coding agent [--out file] [--prompt]
56
+ export sessions.csv [--out file] Download sessions as CSV
57
+
58
+ Agents / MCP
59
+ mcp stdio ⇄ HTTP MCP bridge (for Claude Desktop and other stdio-only clients)
60
+ connect <client> Print the config for claude-code | cursor | codex | claude-desktop | chatgpt | curl
61
+ [--write] writes the file for cursor / claude-desktop; [--show-key] prints the key unmasked
62
+
63
+ Options
64
+ --key, --url Override the saved key / desk URL (also WAKE_API_KEY, WAKE_API_URL)
65
+ --json Raw JSON to stdout
66
+ --version, --help`;
67
+
68
+ export async function main(argv) {
69
+ const { flags, positional } = parseArgs(argv);
70
+ const [cmd, ...rest] = positional;
71
+
72
+ if (flags.version || cmd === "--version" || cmd === "version") { out(VERSION); return 0; }
73
+ if (!cmd || cmd === "help" || flags.help) { out(HELP); return cmd || flags.help ? 0 : 1; }
74
+
75
+ const handler = COMMANDS[cmd];
76
+ if (!handler) { err(`Unknown command: ${cmd}\n`); out(HELP); return 1; }
77
+
78
+ try {
79
+ return (await handler({ flags, args: rest })) ?? 0;
80
+ } catch (e) {
81
+ if (e instanceof WakeError) { err(humanError(e, flags)); return 1; }
82
+ throw e;
83
+ }
84
+ }
85
+
86
+ function humanError(e, flags) {
87
+ const { url } = resolveConfig(flags);
88
+ if (e.status === 401 || e.code === "unauthorized") return "Not signed in. Run: wake login";
89
+ if (e.code === "unverified") return `Site not verified yet. Finish verification on the desk: ${url}/wake/`;
90
+ if (e.code === "not_provisioned") return `Collector not provisioned yet. Finish setup on the desk: ${url}/wake/`;
91
+ if (e.status === 429 || e.code === "rate_limited") return "Rate limited. Try again in a moment.";
92
+ return `${e.message}${e.code ? ` (${e.code})` : ""}`;
93
+ }
94
+
95
+ function windowOf(flags) {
96
+ const w = flags.window || "7d";
97
+ if (!WINDOWS.has(w)) throw new WakeError(`--window must be one of 24h, 7d, 30d (got ${w})`, { code: "bad_args" });
98
+ return w;
99
+ }
100
+
101
+ function clientFor(flags, { requireKey = true } = {}) {
102
+ const cfg = resolveConfig(flags);
103
+ if (requireKey && !cfg.key) throw new WakeError("Not signed in. Run: wake login", { status: 401, code: "unauthorized" });
104
+ return { cfg, api: createClient(cfg) };
105
+ }
106
+
107
+ // Fetches one endpoint and either dumps JSON or hands the body to a renderer.
108
+ function report(path, render, { windowed = true, params = () => ({}) } = {}) {
109
+ return async ({ flags, args }) => {
110
+ const { api } = clientFor(flags);
111
+ const p = { ...(windowed ? { window: windowOf(flags) } : {}), ...params(flags, args) };
112
+ const data = await api.get(path, p);
113
+ if (flags.json) { out(JSON.stringify(data, null, 2)); return 0; }
114
+ render(data, { flags, args });
115
+ return 0;
116
+ };
117
+ }
118
+
119
+ async function prompt(question) {
120
+ const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
121
+ try {
122
+ return await new Promise((resolve) => rl.question(question, resolve));
123
+ } finally {
124
+ rl.close();
125
+ }
126
+ }
127
+
128
+ // ---- commands -------------------------------------------------------------
129
+
130
+ async function login({ flags }) {
131
+ let key = flags.key || process.env.WAKE_API_KEY || "";
132
+ if (!key) key = (await prompt("Paste your Wake API key (wk_live_…): ")).trim();
133
+ if (!KEY_PATTERN.test(key)) throw new WakeError("That doesn't look like a Wake key (expected wk_live_ followed by 40 hex characters).", { code: "bad_key" });
134
+ const url = (flags.url || process.env.WAKE_API_URL || DEFAULT_URL).replace(/\/+$/, "");
135
+ const me = await createClient({ url, key }).get("/me");
136
+ const file = writeConfig({ url, key });
137
+ out(`Connected to ${f.bold(me.host || me.site || url)} ${f.dim(`(${maskKey(key)}${me.key?.label ? `, ${me.key.label}` : ""})`)}`);
138
+ if (me.verified === false) out(f.yellow(`Site not verified yet — finish verification at ${url}/wake/`));
139
+ out(f.dim(`Saved to ${file}`));
140
+ return 0;
141
+ }
142
+
143
+ async function logout() {
144
+ out(deleteConfig() ? `Signed out. Removed ${configPath()}` : "Nothing to remove.");
145
+ return 0;
146
+ }
147
+
148
+ async function status({ flags }) {
149
+ const { api, cfg } = clientFor(flags);
150
+ const window = windowOf(flags);
151
+ const me = await api.get("/me");
152
+ let ov = null;
153
+ try { ov = await api.get("/overview", { window }); } catch (e) { if (!(e instanceof WakeError) || !["unverified", "not_provisioned"].includes(e.code)) throw e; }
154
+ if (flags.json) { out(JSON.stringify({ me, overview: ov }, null, 2)); return 0; }
155
+ out(f.heading(me.host || me.site || "Wake"));
156
+ out(f.kv([
157
+ ["desk", cfg.url],
158
+ ["key", `${maskKey(cfg.key)}${me.key?.label ? ` (${me.key.label})` : ""}`],
159
+ ["verified", yn(me.verified)],
160
+ ["provisioned", yn(me.provisioned)],
161
+ ["last event", me.last_event_at ? `${f.ago(me.last_event_at)} ${f.dim(me.last_event_at)}` : f.yellow("none yet")],
162
+ ]));
163
+ if (ov) {
164
+ out(f.heading(`Last ${window}`));
165
+ out(f.kv([
166
+ ["agents", f.num(ov.unique_agents)],
167
+ ["sessions", f.num(ov.sessions)],
168
+ ["events", f.num(ov.events)],
169
+ ["converted", `${f.num(ov.converted)} ${f.dim(f.pct(ov.conversion_rate))}`],
170
+ ["with friction", f.num(ov.sessions_with_friction)],
171
+ ["providers", f.topCounts(ov.by_provider)],
172
+ ]));
173
+ }
174
+ if (me.mcp?.url) out(f.dim(`\nMCP: ${me.mcp.url} (wake connect <client>)`));
175
+ return 0;
176
+ }
177
+
178
+ const overview = report("/overview", (d) => {
179
+ out(f.heading(`${d.host} — last ${d.window}`) + (d.source ? f.dim(` source: ${d.source}`) : ""));
180
+ out(f.kv([
181
+ ["events", f.num(d.events)],
182
+ ["sessions", f.num(d.sessions)],
183
+ ["agents", f.num(d.unique_agents) + (d.inferred_agents ? f.dim(` (${f.num(d.inferred_agents)} inferred)`) : "")],
184
+ ["converted", `${f.num(d.converted)} ${f.dim(f.pct(d.conversion_rate))}`],
185
+ ["with friction", f.num(d.sessions_with_friction)],
186
+ ["providers", f.topCounts(d.by_provider)],
187
+ ["classes", f.topCounts(d.by_agent_class)],
188
+ ["intents", f.topCounts(d.by_intent)],
189
+ ["countries", f.topCounts(d.by_country)],
190
+ ["last event", f.ago(d.last_event_at)],
191
+ ]));
192
+ if (d.funnel) {
193
+ out(f.heading("Funnel"));
194
+ out(f.kv(Object.entries(d.funnel).map(([k, v]) => [k, f.num(v)])));
195
+ }
196
+ out(f.heading("Top friction"));
197
+ out(frictionTable(d.top_friction));
198
+ });
199
+
200
+ function frictionTable(rows) {
201
+ return f.table(rows || [], [
202
+ { key: "type", label: "type" },
203
+ { key: "path_class", label: "where" },
204
+ { key: "status", label: "status" },
205
+ { key: "sessions", label: "sessions", align: "right", render: f.num },
206
+ { key: "detail", label: "detail", render: (v) => v || "" },
207
+ ]);
208
+ }
209
+
210
+ const agents = report("/agents", (d) => {
211
+ out(f.heading(`${d.host} — agents, last ${d.window}`));
212
+ out(f.table(d.agents, [
213
+ { key: "nickname", label: "agent" },
214
+ { key: "provider", label: "provider" },
215
+ { key: "agent_class", label: "class" },
216
+ { key: "sessions", label: "sessions", align: "right", render: f.num },
217
+ { key: "events", label: "events", align: "right", render: f.num },
218
+ { key: "stage", label: "stage" },
219
+ { key: "converted", label: "conv", render: (v) => (v ? f.green("yes") : "") },
220
+ { key: "friction_types", label: "friction", render: (v) => (v || []).join(",") },
221
+ { key: "last_seen", label: "last seen", render: f.ago },
222
+ ]));
223
+ });
224
+
225
+ const sessions = report("/sessions", (d) => {
226
+ out(f.heading(`${d.host} — ${f.num(d.count)} sessions, last ${d.window}`));
227
+ out(f.table(d.sessions, [
228
+ { key: "started_at", label: "started", render: f.ago },
229
+ { key: "nickname", label: "agent" },
230
+ { key: "provider", label: "provider" },
231
+ { key: "duration_ms", label: "dur", align: "right", render: f.duration },
232
+ { key: "event_count", label: "ev", align: "right", render: f.num },
233
+ { key: "stage", label: "stage" },
234
+ { key: "intent", label: "intent", render: (v) => v || "" },
235
+ { key: "converted", label: "conv", render: (v) => (v ? f.green("yes") : "") },
236
+ { key: "friction", label: "friction", render: (v) => (v || []).map((x) => x.type).join(",") },
237
+ { key: "path_classes", label: "path", render: (v) => (v || []).join(" → ") },
238
+ ]));
239
+ }, { params: (flags) => ({ limit: flags.limit, nickname: flags.nickname }) });
240
+
241
+ const funnel = report("/funnel", (d) => {
242
+ out(f.heading(`${d.host} — funnel, last ${d.window} (${f.num(d.sessions)} sessions)`));
243
+ out(f.table(d.stages, [
244
+ { key: "label", label: "stage" },
245
+ { key: "sessions", label: "sessions", align: "right", render: f.num },
246
+ { key: "share", label: "share", align: "right", render: f.pct },
247
+ { key: "drop_from_previous", label: "lost", align: "right", render: (v) => (v == null ? "" : f.num(v)) },
248
+ ]));
249
+ if (d.biggest_drop) out(`\n ${f.yellow("Biggest drop:")} ${d.biggest_drop.prev} → ${d.biggest_drop.id} lost ${f.num(d.biggest_drop.lost)} sessions`);
250
+ });
251
+
252
+ function fixesList(fixes) {
253
+ if (!fixes?.length) return f.dim(" (nothing to fix right now)");
254
+ return fixes.map((x, i) => {
255
+ const head = ` ${i + 1}. ${f.bold(x.title)}${x.priority ? f.dim(` [${x.priority}]`) : ""}${x.inferred ? f.dim(" inferred") : ""}`;
256
+ const lines = [head];
257
+ if (x.do_this) lines.push(` ${f.cyan("do:")} ${x.do_this}`);
258
+ if (x.why) lines.push(` ${f.dim("why:")} ${x.why}`);
259
+ if (x.evidence?.sessions != null) lines.push(` ${f.dim(`evidence: ${f.num(x.evidence.sessions)} sessions`)}`);
260
+ return lines.join("\n");
261
+ }).join("\n");
262
+ }
263
+
264
+ const friction = report("/friction", (d) => {
265
+ out(f.heading(`${d.host} — friction, last ${d.window}`));
266
+ out(f.kv([["sessions", f.num(d.sessions)], ["with friction", f.num(d.sessions_with_friction)]]));
267
+ out(f.heading("Top friction"));
268
+ out(frictionTable(d.top_friction));
269
+ out(f.heading("Fixes"));
270
+ out(fixesList(d.fixes));
271
+ });
272
+
273
+ function readinessBlock(r) {
274
+ if (!r) return;
275
+ const scores = r.scores || r;
276
+ out(f.heading(`Readiness: ${scoreColor(scores.score ?? scores.total)}`));
277
+ const parts = ["access", "information", "measurement"].filter((k) => scores[k] != null).map((k) => [k, String(scores[k])]);
278
+ if (parts.length) out(f.kv(parts));
279
+ if (r.recommendations?.length) out(f.list(r.recommendations.map((x) => `${sev(x.severity)} ${x.title}${x.detail ? f.dim(` — ${x.detail}`) : ""}`)));
280
+ }
281
+ const scoreColor = (s) => (s == null ? "–" : s >= 80 ? f.green(s) : s >= 50 ? f.yellow(s) : f.red(s));
282
+ const sev = (s) => (s === "high" || s === "critical" ? f.red(`[${s}]`) : s === "medium" ? f.yellow(`[${s}]`) : f.dim(`[${s || "info"}]`));
283
+
284
+ const fixes = report("/fixes", (d) => {
285
+ out(f.heading(`${d.host} — fixes, last ${d.window}`));
286
+ out(fixesList(d.fixes));
287
+ readinessBlock(d.readiness);
288
+ });
289
+
290
+ const pages = report("/pages", (d) => {
291
+ out(f.heading(`${d.host} — page classes, last ${d.window}`));
292
+ out(f.table(d.page_classes, [
293
+ { key: "id", label: "class" },
294
+ { key: "sessions", label: "sessions", align: "right", render: f.num },
295
+ { key: "events", label: "events", align: "right", render: f.num },
296
+ ]));
297
+ out(f.heading("Common paths"));
298
+ out(f.table(d.sequences, [
299
+ { key: "path", label: "path", render: (v) => (v || []).join(" → ") },
300
+ { key: "sessions", label: "sessions", align: "right", render: f.num },
301
+ { key: "converted", label: "conv", align: "right", render: f.num },
302
+ { key: "friction", label: "friction", align: "right", render: (v) => (Array.isArray(v) ? v.length : f.num(v)) },
303
+ ]));
304
+ });
305
+
306
+ const alerts = report("/alerts", (d) => {
307
+ out(f.heading(`${d.host} — alerts, last ${d.window}`));
308
+ const lvl = (l) => (l === "critical" || l === "error" ? f.red : l === "warn" || l === "warning" ? f.yellow : f.dim);
309
+ out(f.list((d.alerts || []).map((a) => `${lvl(a.level)(`[${a.level || "info"}]`)} ${a.text}`)));
310
+ });
311
+
312
+ const series = report("/series", (d) => {
313
+ out(f.heading(`${d.host} — per ${d.bucket}, last ${d.window}`));
314
+ out(f.table(d.buckets, [
315
+ { key: "t", label: "bucket" },
316
+ { key: "events", label: "events", align: "right", render: f.num },
317
+ { key: "sessions", label: "sessions", align: "right", render: f.num },
318
+ { key: "agents", label: "agents", align: "right", render: f.num },
319
+ { key: "friction_sessions", label: "friction", align: "right", render: f.num },
320
+ { key: "converted", label: "conv", align: "right", render: f.num },
321
+ { key: "by_provider", label: "providers", render: (v) => f.topCounts(v, 3) },
322
+ ]));
323
+ });
324
+
325
+ const readiness = report("/readiness", (d) => {
326
+ out(f.heading(`${d.host} — checked ${f.ago(d.checked_at)}`));
327
+ readinessBlock(d);
328
+ if (d.files) out(f.dim(`\nDiscovery files available: ${Object.keys(d.files).join(", ")} (wake readiness --json to print them)`));
329
+ }, { windowed: false });
330
+
331
+ async function listing({ flags, args }) {
332
+ const { api } = clientFor(flags);
333
+ if (args[0] === "plan" || flags.plan) {
334
+ const r = await api.post("/listing/plan", {});
335
+ if (flags.json) { out(JSON.stringify(r, null, 2)); return 0; }
336
+ out(`${f.green("Planned")} ${f.num((r.steps || []).length)} listing steps.${r.note ? ` ${r.note}` : ""}`);
337
+ out(f.list((r.steps || []).map(stepLine)));
338
+ return 0;
339
+ }
340
+ const d = await api.get("/listing");
341
+ if (flags.json) { out(JSON.stringify(d, null, 2)); return 0; }
342
+ out(f.heading(`${d.host} — AEO listing`) + (d.listing?.status ? f.dim(` ${d.listing.status}`) : ""));
343
+ if (d.arrivals) {
344
+ out(f.kv([
345
+ ["identified agents", f.num(d.arrivals.identified_agents)],
346
+ ["crawler agents", f.num(d.arrivals.crawler_agents)],
347
+ ["unknown agents", f.num(d.arrivals.unknown_agents)],
348
+ ["verdict", d.arrivals.verdict || "–"],
349
+ ["note", d.arrivals.note],
350
+ ]));
351
+ }
352
+ out(f.heading(d.listing?.planned ? "Steps" : "Steps (not planned yet — run: wake listing plan)"));
353
+ out(f.list((d.listing?.steps || []).map(stepLine)));
354
+ if (d.listing?.publish_files?.length) out(f.dim(`\nFiles to publish: ${d.listing.publish_files.join(", ")}`));
355
+ if (d.how) out(f.dim(`\n${d.how}`));
356
+ return 0;
357
+ }
358
+ const stepLine = (s) => `${f.bold(s.title || s.id)}${s.mode ? f.dim(` (${s.mode})`) : ""}${s.why ? ` — ${s.why}` : ""}${s.last ? f.dim(` last: ${f.ago(s.last)}`) : ""}`;
359
+
360
+ const benchmarks = report("/benchmarks", (d) => {
361
+ if (d.withheld) { out(f.yellow(`Benchmarks withheld${d.reason ? `: ${d.reason}` : " (cohort too small to share safely)."}`)); return; }
362
+ out(f.heading(`Cohort of ${f.num(d.cohort_size)} sites — medians`));
363
+ out(f.kv(Object.entries(d.medians || {}).map(([k, v]) => [k, typeof v === "number" ? f.num(v) : String(v)])));
364
+ }, { windowed: false });
365
+
366
+ async function install({ flags }) {
367
+ const { api } = clientFor(flags);
368
+ const d = await api.get("/install", flags.kit ? { kit: 1 } : {});
369
+ if (flags.json) { out(JSON.stringify(d, null, 2)); return 0; }
370
+ out(f.heading(`${d.host} — collector`));
371
+ out(f.kv([
372
+ ["verified", yn(d.verified)],
373
+ ["provisioned", yn(d.provisioned)],
374
+ ["endpoint", d.collector_endpoint || d.endpoint || "–"],
375
+ ["kit", d.kit_available ? "available (wake install --kit --out ./wake-kit)" : "not available yet"],
376
+ ["last event", f.ago(d.last_event_at)],
377
+ ]));
378
+ if (flags.kit && d.files) {
379
+ const dir = path.resolve(flags.out || "./wake-kit");
380
+ fs.mkdirSync(dir, { recursive: true });
381
+ out(f.heading(`Kit written to ${dir}`));
382
+ for (const [name, body] of Object.entries(d.files)) {
383
+ const file = path.join(dir, path.basename(name));
384
+ fs.writeFileSync(file, body);
385
+ out(` ${file}`);
386
+ }
387
+ }
388
+ return 0;
389
+ }
390
+
391
+ async function playbook({ flags }) {
392
+ const { api } = clientFor(flags);
393
+ const d = await api.get("/playbook", {});
394
+ if (flags.json) { out(JSON.stringify(d, null, 2)); return 0; }
395
+ if (flags.prompt) { out(d.prompt); return 0; }
396
+ const file = path.resolve(flags.out || "./wake-playbook.md");
397
+ fs.writeFileSync(file, d.markdown);
398
+ out(f.heading(`${d.host} — playbook written to ${file}`));
399
+ out(f.kv([["tasks", String(d.tasks?.length || 0)], ["secrets inside", d.has_secrets ? f.yellow("yes (ingest key): keep it out of public repos") : "no (placeholders until ownership is verified)"]]));
400
+ for (const t of d.tasks || []) out(` ${t.n}. ${t.title}`);
401
+ out("");
402
+ out("Next: open the repository with Claude Code / Cursor / Codex and paste:");
403
+ out(` ${d.prompt}`);
404
+ return 0;
405
+ }
406
+
407
+ async function exportCmd({ flags, args }) {
408
+ // Accepts "export sessions --out x.csv", "export sessions.csv", "export sessions.csv --out x.csv".
409
+ const what = (args[0] || "sessions").replace(/\.csv$/, "");
410
+ if (what !== "sessions") throw new WakeError(`Only "sessions" can be exported (got ${args[0]})`, { code: "bad_args" });
411
+ const { api } = clientFor(flags);
412
+ const csv = await api.text("/sessions.csv", { window: windowOf(flags) });
413
+ const target = flags.out || (args[0]?.endsWith(".csv") ? args[0] : "");
414
+ if (!target || target === "-") { process.stdout.write(csv); return 0; }
415
+ const file = path.resolve(target);
416
+ fs.writeFileSync(file, csv);
417
+ const rows = Math.max(0, csv.trim().split("\n").length - 1);
418
+ err(`Wrote ${f.num(rows)} sessions to ${file}`);
419
+ return 0;
420
+ }
421
+
422
+ // stdio ⇄ HTTP bridge. Each stdin line is one JSON-RPC message (or batch) forwarded untouched.
423
+ async function mcp({ flags }) {
424
+ const { api } = clientFor(flags);
425
+ const rl = readline.createInterface({ input: process.stdin, crlfDelay: Infinity });
426
+ let chain = Promise.resolve();
427
+ rl.on("line", (line) => {
428
+ const trimmed = line.trim();
429
+ if (!trimmed) return;
430
+ chain = chain.then(() => forward(api, trimmed)).catch((e) => err(`wake mcp: ${e.message}`));
431
+ });
432
+ await new Promise((resolve) => rl.on("close", resolve));
433
+ await chain;
434
+ return 0;
435
+ }
436
+
437
+ async function forward(api, raw) {
438
+ let msg;
439
+ try { msg = JSON.parse(raw); } catch { err("wake mcp: skipped a line that was not JSON"); return; }
440
+ const expectsReply = Array.isArray(msg) ? msg.some((m) => m && m.id !== undefined) : msg && msg.id !== undefined;
441
+ let res;
442
+ try {
443
+ res = await api.postRaw("/mcp", raw, "application/json, text/event-stream");
444
+ } catch (e) {
445
+ if (expectsReply) out(JSON.stringify(rpcError(msg, e)));
446
+ err(`wake mcp: ${e.message}`);
447
+ return;
448
+ }
449
+ if (!expectsReply || res.status === 202 || !res.text.trim()) return;
450
+ out(res.contentType.includes("text/event-stream") ? sseToJson(res.text) : res.text.replace(/\s*\n\s*/g, " "));
451
+ }
452
+
453
+ // A server may answer with SSE even though we ask for JSON; keep the last data payload.
454
+ function sseToJson(text) {
455
+ const data = text.split(/\r?\n/).filter((l) => l.startsWith("data:")).map((l) => l.slice(5).trim());
456
+ return data.length ? data[data.length - 1] : "";
457
+ }
458
+
459
+ function rpcError(msg, e) {
460
+ const id = Array.isArray(msg) ? (msg.find((m) => m?.id !== undefined)?.id ?? null) : msg.id ?? null;
461
+ const code = e.status === 401 ? -32001 : -32000;
462
+ return { jsonrpc: "2.0", id, error: { code, message: `wake: ${e.message}` } };
463
+ }
464
+
465
+ const CLIENTS = ["claude-code", "cursor", "codex", "claude-desktop", "chatgpt", "curl"];
466
+
467
+ async function connect({ flags, args }) {
468
+ const client = args[0];
469
+ if (!CLIENTS.includes(client)) throw new WakeError(`wake connect <client> — client must be one of ${CLIENTS.join(", ")}`, { code: "bad_args" });
470
+ const { cfg } = clientFor(flags, { requireKey: false });
471
+ const mcpUrl = `${apiBase(cfg.url)}/mcp`;
472
+ const key = cfg.key || "wk_live_<your key>";
473
+ const shown = flags["show-key"] || flags.write || !cfg.key ? key : maskKey(key);
474
+ const masked = shown !== key;
475
+
476
+ const cursorCfg = { mcpServers: { wake: { url: mcpUrl, headers: { Authorization: `Bearer ${shown}` } } } };
477
+ const desktopCfg = { mcpServers: { wake: { command: "npx", args: ["-y", "wake-agents", "mcp"], env: { WAKE_API_KEY: shown, WAKE_API_URL: cfg.url } } } };
478
+
479
+ const note = masked ? f.dim("\nKey is masked; add --show-key to print it, or --write to write the real value to the file.") : "";
480
+
481
+ switch (client) {
482
+ case "claude-code":
483
+ out(`claude mcp add --transport http wake ${mcpUrl} --header "Authorization: Bearer ${shown}"${note}`);
484
+ break;
485
+ case "cursor": {
486
+ const file = path.resolve(".cursor/mcp.json");
487
+ if (flags.write) { out(`Wrote ${writeMcpJson(file, cursorCfg.mcpServers.wake)}`); }
488
+ else out(`${JSON.stringify(cursorCfg, null, 2)}\n\nSave as ${file} (or run: wake connect cursor --write)${note}`);
489
+ break;
490
+ }
491
+ case "codex":
492
+ out(`# ~/.codex/config.toml\n[mcp_servers.wake]\nurl = "${mcpUrl}"\nbearer_token_env_var = "WAKE_API_KEY"\n\n# in your shell profile\nexport WAKE_API_KEY=${shown}${note}`);
493
+ break;
494
+ case "claude-desktop": {
495
+ const file = claudeDesktopConfigPath();
496
+ if (flags.write) { out(`Wrote ${writeMcpJson(file, desktopCfg.mcpServers.wake)}\nRestart Claude Desktop to pick it up.`); }
497
+ else out(`${JSON.stringify(desktopCfg, null, 2)}\n\nMerge into ${file} (or run: wake connect claude-desktop --write)${note}`);
498
+ break;
499
+ }
500
+ case "chatgpt":
501
+ out([
502
+ "ChatGPT connectors need a hosted MCP server with OAuth, which Wake doesn't offer yet.",
503
+ "",
504
+ `MCP endpoint (bearer auth): ${mcpUrl}`,
505
+ "",
506
+ "Supported today:",
507
+ " • any MCP client that can send an Authorization header (Claude Code, Cursor, Codex) — see wake connect <client>",
508
+ " • stdio-only clients via the bridge: npx -y wake-agents mcp",
509
+ ` • the REST API directly: wake connect curl`,
510
+ ].join("\n"));
511
+ break;
512
+ case "curl":
513
+ out(`curl -H "Authorization: Bearer ${shown}" "${apiBase(cfg.url)}/overview?window=7d"${note}`);
514
+ break;
515
+ }
516
+ return 0;
517
+ }
518
+
519
+ function claudeDesktopConfigPath() {
520
+ const home = os.homedir();
521
+ if (process.platform === "darwin") return path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json");
522
+ if (process.platform === "win32") return path.join(process.env.APPDATA || path.join(home, "AppData", "Roaming"), "Claude", "claude_desktop_config.json");
523
+ return path.join(process.env.XDG_CONFIG_HOME || path.join(home, ".config"), "Claude", "claude_desktop_config.json");
524
+ }
525
+
526
+ // Merges {mcpServers.wake} into an existing JSON file without touching other servers.
527
+ function writeMcpJson(file, server) {
528
+ let existing = {};
529
+ try { existing = JSON.parse(fs.readFileSync(file, "utf8")) || {}; } catch {}
530
+ existing.mcpServers = { ...(existing.mcpServers || {}), wake: server };
531
+ fs.mkdirSync(path.dirname(file), { recursive: true });
532
+ fs.writeFileSync(file, JSON.stringify(existing, null, 2) + "\n", { mode: 0o600 });
533
+ return file;
534
+ }
535
+
536
+ const yn = (v) => (v ? f.green("yes") : f.yellow("no"));
537
+
538
+ const COMMANDS = {
539
+ login, logout, status, overview, agents, sessions, funnel, friction, fixes, pages, alerts, series,
540
+ readiness, listing, benchmarks, install, playbook, export: exportCmd, mcp, connect,
541
+ };
package/lib/client.mjs ADDED
@@ -0,0 +1,83 @@
1
+ export const USER_AGENT = "wake-cli/0.1.0";
2
+ const TIMEOUT_MS = 20_000;
3
+
4
+ export class WakeError extends Error {
5
+ constructor(message, { status = 0, code = "" } = {}) {
6
+ super(message);
7
+ this.name = "WakeError";
8
+ this.status = status;
9
+ this.code = code;
10
+ }
11
+ }
12
+
13
+ export function apiBase(url) {
14
+ return `${String(url).replace(/\/+$/, "")}/api/wake/v1`;
15
+ }
16
+
17
+ export function createClient({ url, key }) {
18
+ const base = apiBase(url);
19
+
20
+ function headers(extra = {}) {
21
+ const h = { "User-Agent": USER_AGENT, Accept: "application/json", ...extra };
22
+ if (key) h.Authorization = `Bearer ${key}`;
23
+ return h;
24
+ }
25
+
26
+ async function request(path, { method = "GET", body, params, raw = false, accept } = {}) {
27
+ const u = new URL(base + path);
28
+ for (const [k, v] of Object.entries(params || {})) {
29
+ if (v !== undefined && v !== null && v !== "") u.searchParams.set(k, String(v));
30
+ }
31
+ const ctl = new AbortController();
32
+ const timer = setTimeout(() => ctl.abort(), TIMEOUT_MS);
33
+ let res;
34
+ try {
35
+ res = await fetch(u, {
36
+ method,
37
+ headers: headers({
38
+ ...(body !== undefined ? { "Content-Type": "application/json" } : {}),
39
+ ...(accept ? { Accept: accept } : {}),
40
+ }),
41
+ body: body === undefined ? undefined : typeof body === "string" ? body : JSON.stringify(body),
42
+ signal: ctl.signal,
43
+ });
44
+ } catch (err) {
45
+ const msg = err?.name === "AbortError" ? `Timed out after ${TIMEOUT_MS / 1000}s: ${u}` : `Network error: ${err?.message || err}`;
46
+ throw new WakeError(msg, { code: "network" });
47
+ } finally {
48
+ clearTimeout(timer);
49
+ }
50
+ const text = await res.text();
51
+ if (!res.ok) throw errorFrom(res.status, text);
52
+ if (raw) return { status: res.status, text, contentType: res.headers.get("content-type") || "" };
53
+ if (!text) return null;
54
+ try {
55
+ return JSON.parse(text);
56
+ } catch {
57
+ throw new WakeError(`Unexpected non-JSON response (${res.status}) from ${u.pathname}`, { status: res.status, code: "bad_response" });
58
+ }
59
+ }
60
+
61
+ return {
62
+ base,
63
+ get: (path, params) => request(path, { params }),
64
+ post: (path, body) => request(path, { method: "POST", body }),
65
+ text: (path, params) => request(path, { params, raw: true, accept: "*/*" }).then((r) => r.text),
66
+ // Used by the MCP bridge: forwards a pre-serialised JSON-RPC payload untouched.
67
+ postRaw: (path, body, accept) => request(path, { method: "POST", body, raw: true, accept }),
68
+ };
69
+ }
70
+
71
+ function errorFrom(status, text) {
72
+ let code = "";
73
+ let message = "";
74
+ try {
75
+ const j = JSON.parse(text);
76
+ code = j.code || "";
77
+ message = j.error || j.message || "";
78
+ } catch {
79
+ message = text.slice(0, 200);
80
+ }
81
+ if (!message) message = `HTTP ${status}`;
82
+ return new WakeError(message, { status, code });
83
+ }
package/lib/config.mjs ADDED
@@ -0,0 +1,51 @@
1
+ import fs from "node:fs";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+
5
+ export const DEFAULT_URL = "https://agent-observatory-desk-production.up.railway.app";
6
+ export const KEY_PATTERN = /^wk_live_[a-f0-9]{40}$/;
7
+
8
+ export function configPath() {
9
+ const base = process.env.XDG_CONFIG_HOME || path.join(os.homedir(), ".config");
10
+ return path.join(base, "wake", "config.json");
11
+ }
12
+
13
+ export function readConfig() {
14
+ try {
15
+ const raw = fs.readFileSync(configPath(), "utf8");
16
+ const parsed = JSON.parse(raw);
17
+ return parsed && typeof parsed === "object" ? parsed : {};
18
+ } catch {
19
+ return {};
20
+ }
21
+ }
22
+
23
+ export function writeConfig({ url, key }) {
24
+ const file = configPath();
25
+ fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 });
26
+ fs.writeFileSync(file, JSON.stringify({ url, key }, null, 2) + "\n", { mode: 0o600 });
27
+ fs.chmodSync(file, 0o600);
28
+ return file;
29
+ }
30
+
31
+ export function deleteConfig() {
32
+ try {
33
+ fs.unlinkSync(configPath());
34
+ return true;
35
+ } catch {
36
+ return false;
37
+ }
38
+ }
39
+
40
+ // Precedence: flags > env > config file > default (url only).
41
+ export function resolveConfig(flags = {}) {
42
+ const file = readConfig();
43
+ const url = flags.url || process.env.WAKE_API_URL || file.url || DEFAULT_URL;
44
+ const key = flags.key || process.env.WAKE_API_KEY || file.key || "";
45
+ return { url: url.replace(/\/+$/, ""), key };
46
+ }
47
+
48
+ export function maskKey(key) {
49
+ if (!key) return "(none)";
50
+ return key.length > 12 ? `${key.slice(0, 12)}…` : "wk_live_…";
51
+ }
package/lib/format.mjs ADDED
@@ -0,0 +1,79 @@
1
+ const useColor = () => Boolean(process.stdout.isTTY) && !process.env.NO_COLOR && process.env.TERM !== "dumb";
2
+
3
+ function paint(code) {
4
+ return (s) => (useColor() ? `\x1b[${code}m${s}\x1b[0m` : String(s));
5
+ }
6
+ export const bold = paint("1");
7
+ export const dim = paint("2");
8
+ export const green = paint("32");
9
+ export const yellow = paint("33");
10
+ export const red = paint("31");
11
+ export const cyan = paint("36");
12
+
13
+ export function num(n) {
14
+ if (n === null || n === undefined || Number.isNaN(Number(n))) return "–";
15
+ return Number(n).toLocaleString("en-US");
16
+ }
17
+
18
+ // Accepts a ratio (0.42) or a percentage (42); anything > 1 is treated as already-percent.
19
+ export function pct(v, digits = 1) {
20
+ if (v === null || v === undefined || Number.isNaN(Number(v))) return "–";
21
+ const n = Number(v);
22
+ const p = n <= 1 ? n * 100 : n;
23
+ return `${p.toFixed(digits)}%`;
24
+ }
25
+
26
+ export function ago(iso, now = Date.now()) {
27
+ if (!iso) return "never";
28
+ const t = typeof iso === "number" ? iso : Date.parse(iso);
29
+ if (Number.isNaN(t)) return String(iso);
30
+ const s = Math.max(0, Math.round((now - t) / 1000));
31
+ if (s < 60) return `${s}s ago`;
32
+ const m = Math.round(s / 60);
33
+ if (m < 60) return `${m}m ago`;
34
+ const h = Math.round(m / 60);
35
+ if (h < 48) return `${h}h ago`;
36
+ return `${Math.round(h / 24)}d ago`;
37
+ }
38
+
39
+ export function duration(ms) {
40
+ if (ms === null || ms === undefined) return "–";
41
+ const s = Math.round(Number(ms) / 1000);
42
+ if (s < 60) return `${s}s`;
43
+ const m = Math.floor(s / 60);
44
+ return m < 60 ? `${m}m${s % 60}s` : `${Math.floor(m / 60)}h${m % 60}m`;
45
+ }
46
+
47
+ const width = (s) => String(s).replace(/\x1b\[[0-9;]*m/g, "").length;
48
+ const padEnd = (s, n) => String(s) + " ".repeat(Math.max(0, n - width(s)));
49
+ const padStart = (s, n) => " ".repeat(Math.max(0, n - width(s))) + String(s);
50
+
51
+ // columns: [{ key, label, align?: "right", render?: fn }]
52
+ export function table(rows, columns) {
53
+ if (!rows?.length) return dim(" (none)");
54
+ const cells = rows.map((r) => columns.map((c) => (c.render ? c.render(r[c.key]) : r[c.key] ?? "")));
55
+ const widths = columns.map((c, i) => Math.max(width(c.label), ...cells.map((row) => width(row[i]))));
56
+ const line = (vals, style = (x) => x) =>
57
+ " " + vals.map((v, i) => (columns[i].align === "right" ? padStart(v, widths[i]) : padEnd(v, widths[i]))).map(style).join(" ");
58
+ return [line(columns.map((c) => c.label), bold), ...cells.map((row) => line(row))].join("\n");
59
+ }
60
+
61
+ export function kv(pairs) {
62
+ const entries = pairs.filter(([, v]) => v !== undefined);
63
+ const w = Math.max(...entries.map(([k]) => width(k)));
64
+ return entries.map(([k, v]) => ` ${dim(padEnd(k, w))} ${v}`).join("\n");
65
+ }
66
+
67
+ export function heading(s) {
68
+ return `\n${bold(s)}`;
69
+ }
70
+
71
+ export function list(items, bullet = "•") {
72
+ return items.length ? items.map((i) => ` ${bullet} ${i}`).join("\n") : dim(" (none)");
73
+ }
74
+
75
+ // Top-N of a {name: count} map as "name 12, other 3".
76
+ export function topCounts(map, n = 5) {
77
+ const entries = Object.entries(map || {}).sort((a, b) => b[1] - a[1]).slice(0, n);
78
+ return entries.length ? entries.map(([k, v]) => `${k} ${num(v)}`).join(", ") : "–";
79
+ }
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "wake-agents",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "Wake CLI: see which AI agents reach your site, where they get stuck, and what to fix. Also a stdio MCP bridge for Claude Desktop and other MCP clients.",
5
+ "type": "module",
6
+ "bin": {
7
+ "wake": "bin/wake.mjs"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "lib",
12
+ "README.md"
13
+ ],
14
+ "engines": {
15
+ "node": ">=18"
16
+ },
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/agent-observatory/agent-observatory.git",
21
+ "directory": "sdk/wake-cli"
22
+ },
23
+ "homepage": "https://agent-observatory-desk-production.up.railway.app/wake/",
24
+ "keywords": [
25
+ "wake",
26
+ "agent-observatory",
27
+ "ai-agents",
28
+ "mcp",
29
+ "aeo",
30
+ "analytics",
31
+ "agent-readiness",
32
+ "cli"
33
+ ]
34
+ }