askshepherd 0.1.30 → 0.1.32

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
@@ -6,25 +6,25 @@ The npm package is `askshepherd`. The installed binary also exposes `shepherd`,
6
6
  but the public one-liner uses the package name:
7
7
 
8
8
  ```sh
9
- npx -y askshepherd@latest agent
9
+ claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent. Ask me the onboarding questions, do not infer answers from local context, and continue through the follow-up commands it prints. After onboarding completes, ask whether to install Shepherd MCP for me into Codex, Claude Code, Cursor, any subset, or none; if I choose any, run npx -y askshepherd@latest mcp-login --install <targets>." --dangerously-skip-permissions
10
10
  ```
11
11
 
12
- ## Coding Agent One-liner
12
+ ## Claude Code Onboarding Command
13
13
 
14
- Give this to a coding agent:
14
+ Give this to Claude Code:
15
15
 
16
16
  ```sh
17
- npx -y askshepherd@latest agent
17
+ claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent. Ask me the onboarding questions, do not infer answers from local context, and continue through the follow-up commands it prints. After onboarding completes, ask whether to install Shepherd MCP for me into Codex, Claude Code, Cursor, any subset, or none; if I choose any, run npx -y askshepherd@latest mcp-login --install <targets>." --dangerously-skip-permissions
18
18
  ```
19
19
 
20
- The command defaults to the customer-facing production Shepherd cloud. In coding-agent shells, it gives the agent the public onboarding checklist and follow-up commands. In a normal interactive terminal, it does not print the checklist; it points the user to the direct terminal onboarding flow instead.
21
- Coding-agent onboarding asks short selection questions first: existing/new org, sources to connect, and Messages skip/provide-handle. If Messages is selected, the agent runs `messages-chats`, opens a minimal searchable local webpage, and has the user select which contacts/groups to sync. Account creation/relinking always starts with Shepherd WorkOS auth.
20
+ The underlying `askshepherd agent` command defaults to the customer-facing production Shepherd cloud. In coding-agent shells, it gives the agent the public onboarding checklist and follow-up commands. In a normal interactive terminal, it does not print the checklist; it points the user to the direct terminal onboarding flow instead.
21
+ Claude Code onboarding asks short selection questions first: existing/new org, sources to connect, and Messages skip/provide-handle. If Messages is selected, the agent runs `messages-chats`, opens a minimal searchable local webpage, and has the user select which contacts/groups to sync. Account creation/relinking always starts with Shepherd WorkOS auth. After onboarding completes, the agent asks whether to install Shepherd MCP for the signed-in customer into Codex, Claude Code, Cursor, any subset, or none.
22
22
  Existing-organization joins are verified from Shepherd login and company email domain; the typed org name is not trusted by itself.
23
23
 
24
24
  For experiments, pass a separate non-production API explicitly:
25
25
 
26
26
  ```sh
27
- npx -y askshepherd@latest agent --api https://<non-prod-brain-api>
27
+ claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent --api https://<non-prod-brain-api>. Ask me the onboarding questions, do not infer answers from local context, and continue through the follow-up commands it prints. After onboarding completes, ask whether to install Shepherd MCP for me into Codex, Claude Code, Cursor, any subset, or none; if I choose any, run npx -y askshepherd@latest mcp-login --install <targets> --api https://<non-prod-brain-api>." --dangerously-skip-permissions
28
28
  ```
29
29
 
30
30
  ## Human Terminal One-liner
@@ -11,7 +11,7 @@ import { fileURLToPath } from "node:url";
11
11
  const DEFAULT_API_URL = "https://brain-api-customer-facing.up.railway.app";
12
12
  const PACKAGE_NAME = "askshepherd";
13
13
  const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
14
- const PACKAGE_VERSION = "0.1.30";
14
+ const PACKAGE_VERSION = "0.1.32";
15
15
  const MCP_SERVER_NAME = "shepherd";
16
16
  const PACKAGE_DIR = dirname(dirname(fileURLToPath(import.meta.url)));
17
17
  const DEFAULT_AGENT_STATE_PATH = join(homedir(), ".shepherd", "raw-onboarding-agent.json");
@@ -920,6 +920,11 @@ async function continueAgentOnboarding() {
920
920
  errors: errors ? safeErrorRecord(errors) : undefined,
921
921
  currentAction,
922
922
  nextCommand: errors ? `${agentCommand()} agent --continue --messages-handle "<phone_or_apple_id>" --messages-chat-ids "<comma_separated_chat_ids>" --granola-api-key "<granola_key>"` : undefined,
923
+ mcpInstall: errors ? undefined : {
924
+ prompt: "Ask where to install Shepherd MCP for this customer: Codex, Claude Code, Cursor, any subset, or none.",
925
+ targets: MCP_INSTALL_TARGETS,
926
+ command: `${agentCommand()} mcp-login --install "<targets>"`,
927
+ },
923
928
  }, null, 2));
924
929
  return;
925
930
  }
@@ -943,6 +948,8 @@ async function continueAgentOnboarding() {
943
948
  console.log("\nShepherd raw onboarding completed.");
944
949
  console.log(`Connected sources: ${Object.keys(finalized.connected ?? {}).join(", ") || "none"}`);
945
950
  printProcessingSummary(finalized);
951
+ console.log("\nAsk the user where to install Shepherd MCP for this customer: Codex, Claude Code, Cursor, any subset, or none.");
952
+ console.log(`If they choose any targets, run: ${agentCommand()} mcp-login --install <codex,claude,cursor>`);
946
953
  }
947
954
 
948
955
  async function printAgentStatus() {
@@ -1251,6 +1258,7 @@ function printAgentContract() {
1251
1258
  "If the user chooses Provide handle, ask for the phone number or Apple ID email.",
1252
1259
  "If Messages is selected, ask the user to grant or confirm macOS Full Disk Access for the app running onboarding and the Node.js binary used by background sync. Shepherd checks this and keeps prompting until access works in interactive onboarding.",
1253
1260
  "If Messages is selected, run the recent-chat command. It opens a browser selector with recent chats and search. Never sync all Messages chats by default.",
1261
+ "After raw onboarding completes, ask whether they want Shepherd MCP installed for their signed-in customer account into Codex, Claude Code, Cursor, any subset, or none.",
1254
1262
  ],
1255
1263
  selectionQuestions: [
1256
1264
  {
@@ -1269,6 +1277,12 @@ function printAgentContract() {
1269
1277
  prompt: "Do you want to connect local Messages?",
1270
1278
  options: ["Skip Messages", "Provide handle"],
1271
1279
  },
1280
+ {
1281
+ label: "MCP install",
1282
+ prompt: "After onboarding completes, where should Shepherd MCP be installed for you?",
1283
+ options: ["Codex", "Claude Code", "Cursor", "None"],
1284
+ multiSelect: true,
1285
+ },
1272
1286
  ],
1273
1287
  askUserFor: [
1274
1288
  "Full name",
@@ -1276,6 +1290,7 @@ function printAgentContract() {
1276
1290
  "Messages phone number or Apple ID email, if they want local Messages connected",
1277
1291
  "Full Disk Access confirmation, if they want local Messages connected on macOS",
1278
1292
  "Selected local Messages chats from the browser selector, if they want local Messages connected",
1293
+ "MCP install targets after onboarding completes: Codex, Claude Code, Cursor, any subset, or none",
1279
1294
  ],
1280
1295
  afterStartCommand: [
1281
1296
  "Handle only the current modality opened or printed by the command.",
@@ -1294,6 +1309,7 @@ function printAgentContract() {
1294
1309
  loginCommand: `${command} agent --login`,
1295
1310
  startCommand: `${command} agent --name "<full_name>" --org "<organization>"`,
1296
1311
  continueCommand: `${command} agent --continue`,
1312
+ mcpLoginCommand: `${command} mcp-login`,
1297
1313
  optionalContinueArgs: [
1298
1314
  "--messages-handle \"<phone_or_apple_id>\" if local Messages is being connected",
1299
1315
  "--messages-chat-ids \"<comma_separated_chat_ids>\" if local Messages is being connected",
@@ -1329,6 +1345,7 @@ Start with selection questions to determine intent:
1329
1345
  1. Organization: Join existing org, or Create new org.
1330
1346
  2. Sources: Google Workspace (Gmail/Drive/Docs/Calendar/Sheets/Slides/Tasks/Contacts), Slack, Granola, Messages. Allow multi-select if your interface supports it.
1331
1347
  3. Messages, if selected: Skip Messages, or Provide handle.
1348
+ 4. MCP install after onboarding completes: Codex, Claude Code, Cursor, any subset, or none.
1332
1349
 
1333
1350
  When discussing existing orgs, keep it short: Shepherd verifies the join from their Shepherd login and company email domain. The org name they type is not trusted by itself.
1334
1351
 
@@ -1399,6 +1416,11 @@ Omit either optional flag if that source is not being connected.
1399
1416
  Check progress with:
1400
1417
  ${payload.statusCommand}
1401
1418
 
1419
+ After onboarding completes, ask whether to install Shepherd MCP for the signed-in customer into Codex, Claude Code, Cursor, any subset, or none.
1420
+ If they choose any targets, run:
1421
+ ${payload.mcpLoginCommand} --install "<codex,claude,cursor>"
1422
+ Use only the selected target names. If they choose none, skip MCP install for now; they can run the same command later.
1423
+
1402
1424
  Do not ask for Railway, Postgres, Redis, service names, or internal credentials.
1403
1425
  Do not trigger local wiki generation, daily/weekly memory compilation, or doc summaries.
1404
1426
  This flow links sources, starts raw polling/backfill, and lets the customer-facing production brain services run downstream processing separately.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askshepherd",
3
- "version": "0.1.30",
3
+ "version": "0.1.32",
4
4
  "description": "Customer-facing Shepherd production onboarding and MCP CLI",
5
5
  "type": "module",
6
6
  "bin": {