askshepherd 0.1.25 → 0.1.26
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/bin/shepherd-onboard.js +24 -3
- package/package.json +1 -1
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.26";
|
|
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");
|
|
@@ -245,6 +245,7 @@ async function runOnboarding() {
|
|
|
245
245
|
{ token: session.sessionToken },
|
|
246
246
|
);
|
|
247
247
|
console.log(`Onboarding status: ${status.status}`);
|
|
248
|
+
printProcessingSummary(status);
|
|
248
249
|
console.log("\nShepherd raw sync setup is ready.\n");
|
|
249
250
|
}
|
|
250
251
|
|
|
@@ -905,6 +906,8 @@ async function continueAgentOnboarding() {
|
|
|
905
906
|
console.log(JSON.stringify({
|
|
906
907
|
status: errors ? "waiting" : "completed",
|
|
907
908
|
connected: Object.keys(finalized.connected ?? {}),
|
|
909
|
+
processingEnabled: finalized.processingEnabled === true,
|
|
910
|
+
processing: finalized.processing,
|
|
908
911
|
errors: errors ? safeErrorRecord(errors) : undefined,
|
|
909
912
|
currentAction,
|
|
910
913
|
nextCommand: errors ? `${agentCommand()} agent --continue --messages-handle "<phone_or_apple_id>" --messages-chat-ids "<comma_separated_chat_ids>" --granola-api-key "<granola_key>"` : undefined,
|
|
@@ -930,7 +933,7 @@ async function continueAgentOnboarding() {
|
|
|
930
933
|
|
|
931
934
|
console.log("\nShepherd raw onboarding completed.");
|
|
932
935
|
console.log(`Connected sources: ${Object.keys(finalized.connected ?? {}).join(", ") || "none"}`);
|
|
933
|
-
|
|
936
|
+
printProcessingSummary(finalized);
|
|
934
937
|
}
|
|
935
938
|
|
|
936
939
|
async function printAgentStatus() {
|
|
@@ -945,6 +948,8 @@ async function printAgentStatus() {
|
|
|
945
948
|
account: status.account,
|
|
946
949
|
providers: status.providers,
|
|
947
950
|
rawOnly: status.rawOnly,
|
|
951
|
+
processingEnabled: status.processingEnabled === true,
|
|
952
|
+
processing: status.processing,
|
|
948
953
|
}, null, 2));
|
|
949
954
|
}
|
|
950
955
|
|
|
@@ -1428,7 +1433,10 @@ async function updateAgentStateFromOnboardingResponse(state, response) {
|
|
|
1428
1433
|
const hasGoogleWorkspaceDelegation = response?.googleWorkspaceDelegation
|
|
1429
1434
|
&& typeof response.googleWorkspaceDelegation === "object"
|
|
1430
1435
|
&& !Array.isArray(response.googleWorkspaceDelegation);
|
|
1431
|
-
|
|
1436
|
+
const hasStatus = typeof response?.status === "string";
|
|
1437
|
+
const hasProcessing = typeof response?.processingEnabled === "boolean" || response?.processing;
|
|
1438
|
+
const hasProviders = response?.providers && typeof response.providers === "object" && !Array.isArray(response.providers);
|
|
1439
|
+
if (!hasAuthUrls && !hasGoogleWorkspaceDelegation && !hasStatus && !hasProcessing && !hasProviders) return state;
|
|
1432
1440
|
|
|
1433
1441
|
const next = {
|
|
1434
1442
|
...state,
|
|
@@ -1436,11 +1444,24 @@ async function updateAgentStateFromOnboardingResponse(state, response) {
|
|
|
1436
1444
|
...(hasGoogleWorkspaceDelegation
|
|
1437
1445
|
? { googleWorkspaceDelegation: googleWorkspaceDelegationSetup(response.googleWorkspaceDelegation) }
|
|
1438
1446
|
: {}),
|
|
1447
|
+
...(hasStatus ? { status: response.status } : {}),
|
|
1448
|
+
...(typeof response?.processingEnabled === "boolean" ? { processingEnabled: response.processingEnabled } : {}),
|
|
1449
|
+
...(response?.processing ? { processing: response.processing } : {}),
|
|
1450
|
+
...(hasProviders ? { providers: response.providers } : {}),
|
|
1439
1451
|
};
|
|
1440
1452
|
await writeAgentState(next);
|
|
1441
1453
|
return next;
|
|
1442
1454
|
}
|
|
1443
1455
|
|
|
1456
|
+
function printProcessingSummary(payload) {
|
|
1457
|
+
if (payload?.processingEnabled === true && payload?.processing?.status === "started") {
|
|
1458
|
+
console.log("Downstream processing: started. Wiki, memory, and summary generation are queued or scheduled in production.");
|
|
1459
|
+
return;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
console.log("Downstream processing: not started. Run the continue command again after source authorization is complete.");
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1444
1465
|
function publicAgentAccount(account) {
|
|
1445
1466
|
return {
|
|
1446
1467
|
email: account?.email,
|