askshepherd 0.1.32 → 0.1.37

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
@@ -18,7 +18,7 @@ claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent.
18
18
  ```
19
19
 
20
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.
21
+ Claude Code onboarding asks short selection questions first: existing/new org, sources to connect, Messages skip/provide-handle, and whether to sync Coding Sessions from Codex/Claude Code. 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. If Coding Sessions is selected, onboarding installs a local LaunchAgent that syncs redacted session summaries, not full raw transcripts. 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:
@@ -47,12 +47,40 @@ The command:
47
47
  - asks the user to grant or confirm macOS Full Disk Access before local Messages sync
48
48
  - checks local Messages access and keeps prompting in interactive onboarding until Full Disk Access works
49
49
  - opens a minimal searchable local webpage with contact/group names and only syncs the chats selected by the user
50
- - sets up local macOS Messages raw sync with a background LaunchAgent scoped to the selected chats
50
+ - sets up local macOS Messages raw sync with a background LaunchAgent scoped to the selected chats, including contact-name hydration for observed conversations
51
+ - optionally sets up local Codex/Claude Code coding-session summary sync with a background LaunchAgent
51
52
  - starts raw polling/backfill for connected sources
52
53
  - asks the customer-facing production cloud to schedule downstream processing; wiki ingestion, memory artifacts, and document summaries run in separate brain services, not in the local CLI
53
54
 
54
55
  The command does not expose Railway, database, Redis, or internal service details to the user.
55
56
 
57
+ ## Check Sync Status
58
+
59
+ Use this when the user asks "Check what I've enabled for Shepherd?":
60
+
61
+ ```sh
62
+ npx -y askshepherd@latest status
63
+ npx -y askshepherd@latest status --json
64
+ ```
65
+
66
+ It reports the saved Shepherd account, connected cloud sources, downstream
67
+ processing state, and local background sync health for Messages and Coding
68
+ Sessions.
69
+
70
+ ## Set Up Coding Agent Sessions
71
+
72
+ Use this when the user asks "Help me set up coding agent sessions":
73
+
74
+ ```sh
75
+ npx -y askshepherd@latest agent --login
76
+ npx -y askshepherd@latest agent --add-sources coding-sessions --name "<name>" --org "<organization>"
77
+ npx -y askshepherd@latest agent --continue
78
+ npx -y askshepherd@latest status
79
+ ```
80
+
81
+ The coding agent should ask for consent before enabling this source. The local
82
+ collector syncs redacted Codex and Claude Code summaries, not full transcripts.
83
+
56
84
  ## Customer MCP Login
57
85
 
58
86
  After raw onboarding creates the Shepherd customer account, customers can
@@ -81,6 +109,13 @@ The saved MCP state includes:
81
109
  - `authSource`: `local_onboarding` or `workos`
82
110
  - `localAuth`: raw onboarding state reference when local auth was used
83
111
 
112
+ The installed MCP server is local npm first, remote brain second. For questions
113
+ like "what do I have set up on Shepherd?", "is Shepherd syncing?", or "help me
114
+ set up coding agent sessions", the MCP exposes local tools such as
115
+ `shepherd_status` and `shepherd_setup_coding_sessions` that route agents to the
116
+ local `askshepherd status` / add-source flow. Production memory and wiki tools
117
+ remain remote Railway-backed tools for source recall and company-memory answers.
118
+
84
119
  Use `--json` when an agent or setup script needs machine-readable endpoint and
85
120
  header details.
86
121
 
@@ -110,6 +145,7 @@ Use Shepherd to catch me up on what the team discussed yesterday.
110
145
  Use Shepherd to search Slack, Gmail, Messages, Granola, and the wiki for launch blockers.
111
146
  Use Shepherd to find the last meeting where we discussed the enterprise pilot.
112
147
  Use Shepherd to summarize open follow-ups from this week's memory.
148
+ Use Shepherd to tell me what coding agents already worked on in this repo.
113
149
  ```
114
150
 
115
151
  The production MCP gives onboarded customers the same read/QA behavior that made
@@ -141,7 +177,7 @@ Shepherd must still enforce selected users and groups internally before imperson
141
177
  --org <name> Organization name
142
178
  --granola-api-key <key> Granola API key
143
179
  --messages-handle <value> Messages phone number or Apple ID email
144
- --messages-chat-ids <ids> Comma-separated chat IDs selected from messages-chats
180
+ --messages-chat-ids <ids> Comma-separated chat IDs selected from messages-chats, or `all` to watch every current and future chat
145
181
  --messages-backfill-days Local Messages backfill window, default all selected chat history
146
182
  --api <url> Advanced: Shepherd API URL. Use only for non-production experiments or local/staging testing.
147
183
  --no-google Skip Google Workspace (Gmail/Drive/Docs/Calendar/Sheets/Slides/Tasks/Contacts)
@@ -149,9 +185,41 @@ Shepherd must still enforce selected users and groups internally before imperson
149
185
  --no-granola Skip Granola
150
186
  --no-open-granola Do not open the Granola API key screen
151
187
  --no-messages Skip local Messages
188
+ --coding-sessions Opt in to local Codex/Claude Code session summary sync
189
+ --sources <list> Exact sources to connect: google,slack,granola,messages,coding-sessions,all
190
+ --add-sources <list> Same as --sources, named for second-time onboarding
152
191
  --no-open Print auth URLs instead of opening the browser
153
192
  ```
154
193
 
194
+ ## Coding Sessions
195
+
196
+ Customers can add coding-session sync during first onboarding by selecting
197
+ Coding Sessions or by passing:
198
+
199
+ ```sh
200
+ npx -y askshepherd@latest agent --sources coding-sessions --name "<name>" --org "<organization>"
201
+ ```
202
+
203
+ Already-onboarded customers can add it later:
204
+
205
+ ```sh
206
+ npx -y askshepherd@latest agent --add-sources coding-sessions --name "<name>" --org "<organization>"
207
+ ```
208
+
209
+ The local collector reads Codex session JSONL under `~/.codex/sessions` and
210
+ Claude Code JSONL under `~/.claude/projects`, redacts sensitive values locally,
211
+ and uploads bounded summaries with repo, command, file, verification, and
212
+ follow-up metadata. It does not upload full raw transcripts. In production,
213
+ Shepherd writes a concise `building/index.md` recent-work ledger plus detailed
214
+ session pages under `coding-sessions/` for MCP drill-in.
215
+
216
+ Check local and production sync health:
217
+
218
+ ```sh
219
+ npx -y askshepherd@latest coding-sessions-status
220
+ npx -y askshepherd@latest coding-sessions-status --json
221
+ ```
222
+
155
223
  ## Messages Chat Selection
156
224
 
157
225
  Local Messages sync on macOS needs Full Disk Access. During onboarding, Shepherd asks the user to grant or confirm Full Disk Access for:
@@ -159,7 +227,7 @@ Local Messages sync on macOS needs Full Disk Access. During onboarding, Shepherd
159
227
  - the app running onboarding, such as Terminal, iTerm, Claude Code, or Codex
160
228
  - the Node.js binary used by the background LaunchAgent
161
229
 
162
- The Messages selector validates access to `~/Library/Messages/chat.db`, opens System Settings -> Privacy & Security -> Full Disk Access if access is missing, and keeps checking in interactive onboarding until access works. Background sync install also checks that launchd can start the Messages agent. Contacts permission may also appear when Shepherd resolves local contact names for selected chats.
230
+ The Messages selector validates access to `~/Library/Messages/chat.db`, opens System Settings -> Privacy & Security -> Full Disk Access if access is missing, and keeps checking in interactive onboarding until access works. Background sync install also checks that launchd can start the Messages agent. Contacts permission may also appear when Shepherd resolves local contact names. The background agent reloads Contacts on startup, watches AddressBook changes when available, and runs a periodic fallback sync so renamed contacts can hydrate prior ingested Messages rows for that customer account.
163
231
 
164
232
  Open the local Messages chat selector:
165
233
 
@@ -169,7 +237,7 @@ npx -y askshepherd@latest messages-chats
169
237
 
170
238
  Use `--json` for machine-readable chat metadata, or `--text` for a terminal list.
171
239
 
172
- The browser selector displays the first page of recent chats and lets the user search contacts or groups loaded from local Messages.
240
+ The browser selector displays the first page of recent chats and lets the user search contacts or groups loaded from local Messages. It also has an explicit "Sync all current and future chats" option for users who want Shepherd to backfill every current local Messages chat and keep watching chats that appear later. Do not use this option by default; it is for explicit user approval.
173
241
 
174
242
  Pass the selected chat IDs when finishing onboarding:
175
243
 
@@ -177,6 +245,12 @@ Pass the selected chat IDs when finishing onboarding:
177
245
  npx -y askshepherd@latest agent --continue --messages-handle "<phone_or_apple_id>" --messages-chat-ids "<id1>,<id2>"
178
246
  ```
179
247
 
248
+ Or, with explicit approval to sync all local Messages chats:
249
+
250
+ ```sh
251
+ npx -y askshepherd@latest agent --continue --messages-handle "<phone_or_apple_id>" --messages-chat-ids all
252
+ ```
253
+
180
254
  ## Granola API Keys
181
255
 
182
256
  If Granola does not land on the API keys page, run: