wake-agents 0.1.0 → 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/README.md +5 -4
- package/lib/cli.mjs +27 -7
- package/lib/config.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# wake-agents
|
|
2
2
|
|
|
3
|
-
Command line for [Wake](https://
|
|
3
|
+
Command line for [Wake](https://wakeagents.ai/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
4
|
|
|
5
5
|
Zero dependencies. Node 18+.
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ npx wake-agents status # or one-off
|
|
|
13
13
|
|
|
14
14
|
## Login
|
|
15
15
|
|
|
16
|
-
Mint a key on the desk's **
|
|
16
|
+
Mint a key on the desk's **Settings → Integrations** screen (format `wk_live_` + 40 hex chars), then:
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
19
|
wake login # prompts for the key
|
|
@@ -47,6 +47,7 @@ Every report takes `--window 24h|7d|30d` (default `7d`) and `--json` (raw API re
|
|
|
47
47
|
| `wake listing plan` | ask the desk to (re)plan the listing steps | `wake listing plan` |
|
|
48
48
|
| `wake benchmarks` | your numbers against the cohort medians (withheld while the cohort is small) | `wake benchmarks` |
|
|
49
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` |
|
|
50
51
|
| `wake export sessions.csv` | sessions as CSV (stdout, or `--out file`) | `wake export sessions --out sessions.csv` |
|
|
51
52
|
|
|
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…`).
|
|
@@ -88,10 +89,10 @@ wake connect claude-desktop --write # merges into claude_desktop_config.json,
|
|
|
88
89
|
|
|
89
90
|
```json
|
|
90
91
|
{ "mcpServers": { "wake": { "command": "npx", "args": ["-y", "wake-agents", "mcp"],
|
|
91
|
-
"env": { "WAKE_API_KEY": "wk_live_…", "WAKE_API_URL": "https://
|
|
92
|
+
"env": { "WAKE_API_KEY": "wk_live_…", "WAKE_API_URL": "https://wakeagents.ai" } } } }
|
|
92
93
|
```
|
|
93
94
|
|
|
94
|
-
**ChatGPT** —
|
|
95
|
+
**ChatGPT** — in developer mode, ChatGPT connects to MCP servers with OAuth or with no authentication, never with an API key. Add Wake's public server (`https://wakeagents.ai/api/wake/v1/public/mcp`, no key) as a connector with authentication set to none for `wake_check_site`, `wake_about` and `wake_signup`. Your desk's own data needs your key, so use the bridge or the REST API for it (`wake connect chatgpt` prints the details).
|
|
95
96
|
|
|
96
97
|
**curl / anything else**
|
|
97
98
|
|
package/lib/cli.mjs
CHANGED
|
@@ -6,9 +6,9 @@ import { createClient, WakeError, apiBase } from "./client.mjs";
|
|
|
6
6
|
import { resolveConfig, writeConfig, deleteConfig, configPath, maskKey, KEY_PATTERN, DEFAULT_URL } from "./config.mjs";
|
|
7
7
|
import * as f from "./format.mjs";
|
|
8
8
|
|
|
9
|
-
export const VERSION = "0.1
|
|
9
|
+
export const VERSION = "0.2.1";
|
|
10
10
|
const WINDOWS = new Set(["24h", "7d", "30d"]);
|
|
11
|
-
const BOOL_FLAGS = new Set(["json", "kit", "write", "show-key", "help", "version", "plan"]);
|
|
11
|
+
const BOOL_FLAGS = new Set(["json", "kit", "write", "show-key", "help", "version", "plan", "prompt"]);
|
|
12
12
|
|
|
13
13
|
const out = (s = "") => process.stdout.write(s + "\n");
|
|
14
14
|
const err = (s = "") => process.stderr.write(s + "\n");
|
|
@@ -34,7 +34,7 @@ const HELP = `wake ${VERSION} — see which AI agents reach your site, and what
|
|
|
34
34
|
Usage: wake <command> [options]
|
|
35
35
|
|
|
36
36
|
Account
|
|
37
|
-
login [--key wk_live_…] [--url https://…] Save an API key (minted on the desk's "
|
|
37
|
+
login [--key wk_live_…] [--url https://…] Save an API key (minted on the desk's "Settings → Integrations" screen)
|
|
38
38
|
logout Forget the saved key
|
|
39
39
|
status Site, verification, last event and this window's headline
|
|
40
40
|
|
|
@@ -52,6 +52,7 @@ Reports (all accept --window 24h|7d|30d and --json)
|
|
|
52
52
|
listing AEO listing plan; "wake listing plan" asks the desk to plan it
|
|
53
53
|
benchmarks How your numbers compare to the cohort
|
|
54
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]
|
|
55
56
|
export sessions.csv [--out file] Download sessions as CSV
|
|
56
57
|
|
|
57
58
|
Agents / MCP
|
|
@@ -387,6 +388,22 @@ async function install({ flags }) {
|
|
|
387
388
|
return 0;
|
|
388
389
|
}
|
|
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
|
+
|
|
390
407
|
async function exportCmd({ flags, args }) {
|
|
391
408
|
// Accepts "export sessions --out x.csv", "export sessions.csv", "export sessions.csv --out x.csv".
|
|
392
409
|
const what = (args[0] || "sessions").replace(/\.csv$/, "");
|
|
@@ -482,11 +499,14 @@ async function connect({ flags, args }) {
|
|
|
482
499
|
}
|
|
483
500
|
case "chatgpt":
|
|
484
501
|
out([
|
|
485
|
-
"ChatGPT
|
|
502
|
+
"ChatGPT (developer mode) connects to MCP servers with OAuth or with no authentication, never with an API key.",
|
|
486
503
|
"",
|
|
487
|
-
`
|
|
504
|
+
`Public server, no key: ${cfg.url}/api/wake/v1/public/mcp`,
|
|
505
|
+
" Add it in developer mode as a custom connector, with authentication set to none.",
|
|
506
|
+
" Tools: wake_check_site (any site's agent readiness), wake_about, wake_signup.",
|
|
488
507
|
"",
|
|
489
|
-
|
|
508
|
+
`Your desk server (bearer key): ${mcpUrl}`,
|
|
509
|
+
" ChatGPT cannot send your key, so for your desk's own data use:",
|
|
490
510
|
" • any MCP client that can send an Authorization header (Claude Code, Cursor, Codex) — see wake connect <client>",
|
|
491
511
|
" • stdio-only clients via the bridge: npx -y wake-agents mcp",
|
|
492
512
|
` • the REST API directly: wake connect curl`,
|
|
@@ -520,5 +540,5 @@ const yn = (v) => (v ? f.green("yes") : f.yellow("no"));
|
|
|
520
540
|
|
|
521
541
|
const COMMANDS = {
|
|
522
542
|
login, logout, status, overview, agents, sessions, funnel, friction, fixes, pages, alerts, series,
|
|
523
|
-
readiness, listing, benchmarks, install, export: exportCmd, mcp, connect,
|
|
543
|
+
readiness, listing, benchmarks, install, playbook, export: exportCmd, mcp, connect,
|
|
524
544
|
};
|
package/lib/config.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import fs from "node:fs";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
-
export const DEFAULT_URL = "https://
|
|
5
|
+
export const DEFAULT_URL = "https://wakeagents.ai";
|
|
6
6
|
export const KEY_PATTERN = /^wk_live_[a-f0-9]{40}$/;
|
|
7
7
|
|
|
8
8
|
export function configPath() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wake-agents",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
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
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"url": "https://github.com/agent-observatory/agent-observatory.git",
|
|
21
21
|
"directory": "sdk/wake-cli"
|
|
22
22
|
},
|
|
23
|
-
"homepage": "https://
|
|
23
|
+
"homepage": "https://wakeagents.ai/wake/",
|
|
24
24
|
"keywords": [
|
|
25
25
|
"wake",
|
|
26
26
|
"agent-observatory",
|