askshepherd 0.1.28 → 0.1.29
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 +2 -2
- package/bin/shepherd-onboard.js +30 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,8 +17,8 @@ Give this to a coding agent:
|
|
|
17
17
|
npx -y askshepherd@latest agent
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
The command defaults to the customer-facing production Shepherd cloud.
|
|
21
|
-
|
|
20
|
+
The command defaults to the customer-facing production Shepherd cloud. In coding-agent shells, it gives the agent the onboarding contract and follow-up commands. In a normal interactive terminal, it does not print the agent contract; 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.
|
|
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:
|
package/bin/shepherd-onboard.js
CHANGED
|
@@ -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.
|
|
14
|
+
const PACKAGE_VERSION = "0.1.29";
|
|
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");
|
|
@@ -283,7 +283,11 @@ async function runAgentOnboarding() {
|
|
|
283
283
|
);
|
|
284
284
|
|
|
285
285
|
if (!wantsStart) {
|
|
286
|
-
|
|
286
|
+
if (shouldPrintAgentContract()) {
|
|
287
|
+
printAgentContract();
|
|
288
|
+
} else {
|
|
289
|
+
printAgentTerminalHandoff();
|
|
290
|
+
}
|
|
287
291
|
return;
|
|
288
292
|
}
|
|
289
293
|
if (!workosAuth) {
|
|
@@ -1053,19 +1057,19 @@ function parseArgs(argv) {
|
|
|
1053
1057
|
|
|
1054
1058
|
function printHelp(which) {
|
|
1055
1059
|
if (which === "agent") {
|
|
1056
|
-
console.log(`Shepherd coding-agent
|
|
1060
|
+
console.log(`Shepherd coding-agent setup
|
|
1057
1061
|
|
|
1058
1062
|
Usage:
|
|
1059
1063
|
npx -y ${PACKAGE_NAME}@latest agent
|
|
1060
1064
|
npx -y ${PACKAGE_NAME}@latest agent --login
|
|
1061
1065
|
npx -y ${PACKAGE_NAME}@latest agent --name <name> --org <organization>
|
|
1062
|
-
npx -y ${PACKAGE_NAME}@latest messages-chats
|
|
1063
1066
|
npx -y ${PACKAGE_NAME}@latest agent --continue --granola-api-key <key> --messages-handle <value> --messages-chat-ids <ids>
|
|
1064
1067
|
npx -y ${PACKAGE_NAME}@latest agent --status
|
|
1068
|
+
npx -y ${PACKAGE_NAME}@latest messages-chats
|
|
1065
1069
|
npx -y ${PACKAGE_NAME}@latest granola-api-keys
|
|
1066
1070
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1071
|
+
The bare agent command is intended for coding-agent shells. For direct terminal setup, run:
|
|
1072
|
+
npx -y ${PACKAGE_NAME}@latest
|
|
1069
1073
|
`);
|
|
1070
1074
|
return;
|
|
1071
1075
|
}
|
|
@@ -1209,6 +1213,26 @@ Options:
|
|
|
1209
1213
|
`);
|
|
1210
1214
|
}
|
|
1211
1215
|
|
|
1216
|
+
function shouldPrintAgentContract() {
|
|
1217
|
+
return Boolean(args.prompt || args.json || !isInteractiveTerminal());
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
function isInteractiveTerminal() {
|
|
1221
|
+
return Boolean(process.stdin.isTTY && process.stdout.isTTY);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
function printAgentTerminalHandoff() {
|
|
1225
|
+
console.log(`Shepherd raw sync setup
|
|
1226
|
+
|
|
1227
|
+
This command is meant for coding-agent shells. To set up Shepherd directly in this terminal, run:
|
|
1228
|
+
${agentCommand()}
|
|
1229
|
+
|
|
1230
|
+
If a coding agent asked you to onboard Shepherd, ask the agent to run:
|
|
1231
|
+
${agentCommand()} agent
|
|
1232
|
+
|
|
1233
|
+
No source setup has started.`);
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1212
1236
|
function printAgentContract() {
|
|
1213
1237
|
const command = agentCommand();
|
|
1214
1238
|
const payload = {
|