grov 0.6.12 → 0.6.14
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/dist/cli/commands/login.js +11 -6
- package/dist/cli/index.js +1 -0
- package/dist/integrations/mcp/capture/cli-transform.d.ts +0 -4
- package/dist/integrations/mcp/capture/cli-transform.js +4 -1
- package/dist/integrations/proxy/agents/claude/index.js +9 -3
- package/package.json +2 -2
- package/postinstall.js +1 -1
|
@@ -39,6 +39,7 @@ function decodeTokenPayload(token) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
export async function login() {
|
|
42
|
+
const autoMode = process.argv.includes('--auto');
|
|
42
43
|
console.log('Logging in to Grov cloud...\n');
|
|
43
44
|
// Check if already authenticated
|
|
44
45
|
if (isAuthenticated()) {
|
|
@@ -120,8 +121,8 @@ export async function login() {
|
|
|
120
121
|
return;
|
|
121
122
|
}
|
|
122
123
|
let selectedTeam = teams[0];
|
|
123
|
-
// If multiple teams, let user choose
|
|
124
|
-
if (teams.length > 1) {
|
|
124
|
+
// If multiple teams, let user choose (skip in auto mode)
|
|
125
|
+
if (teams.length > 1 && !autoMode) {
|
|
125
126
|
console.log('\nYour teams:');
|
|
126
127
|
teams.forEach((team, i) => {
|
|
127
128
|
console.log(` ${i + 1}. ${team.name} (${team.slug})`);
|
|
@@ -132,8 +133,8 @@ export async function login() {
|
|
|
132
133
|
selectedTeam = teams[index];
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
|
-
// Ask to enable sync (default yes)
|
|
136
|
-
const enableSync = await prompt(`Enable cloud sync to "${selectedTeam.name}"? [Y/n]: `);
|
|
136
|
+
// Ask to enable sync (default yes, skip in auto mode)
|
|
137
|
+
const enableSync = autoMode ? '' : await prompt(`Enable cloud sync to "${selectedTeam.name}"? [Y/n]: `);
|
|
137
138
|
if (enableSync !== 'n' && enableSync !== 'no') {
|
|
138
139
|
setTeamId(selectedTeam.id);
|
|
139
140
|
setSyncEnabled(true);
|
|
@@ -147,13 +148,17 @@ export async function login() {
|
|
|
147
148
|
else {
|
|
148
149
|
console.log('\n✓ Logged in. Sync not enabled.');
|
|
149
150
|
}
|
|
150
|
-
// Continue to agent setup if no agent configured
|
|
151
|
-
if (!isAnyAgentConfigured()) {
|
|
151
|
+
// Continue to agent setup if no agent configured (skip if non-interactive)
|
|
152
|
+
if (!isAnyAgentConfigured() && process.stdin.isTTY) {
|
|
152
153
|
console.log('\n───────────────────────────────────────────────────────────\n');
|
|
153
154
|
console.log('Now let\'s configure your AI agent...\n');
|
|
154
155
|
const { runAgentSetup } = await import('./setup.js');
|
|
155
156
|
await runAgentSetup();
|
|
156
157
|
}
|
|
158
|
+
else if (!isAnyAgentConfigured()) {
|
|
159
|
+
console.log('\nRun "grov setup" to configure your AI agent.');
|
|
160
|
+
console.log('View memories at: https://app.grov.dev/memories\n');
|
|
161
|
+
}
|
|
157
162
|
else {
|
|
158
163
|
console.log('\nRun "grov doctor" to verify your setup is complete.');
|
|
159
164
|
console.log('View memories at: https://app.grov.dev/memories\n');
|
package/dist/cli/index.js
CHANGED
|
@@ -127,6 +127,7 @@ program
|
|
|
127
127
|
program
|
|
128
128
|
.command('login')
|
|
129
129
|
.description('Login to Grov cloud (opens browser for authentication)')
|
|
130
|
+
.option('--auto', 'Auto mode for postinstall (skips interactive prompts)')
|
|
130
131
|
.action(safeAction(async () => {
|
|
131
132
|
const { login } = await import('./commands/login.js');
|
|
132
133
|
await login();
|
|
@@ -17,10 +17,6 @@ interface MetaData {
|
|
|
17
17
|
lastUsedModel: string;
|
|
18
18
|
mode?: string;
|
|
19
19
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Transform CLI Turn to API ExtractPayload format
|
|
22
|
-
* CLI always uses 'agent' mode (no ask/plan distinction in CLI)
|
|
23
|
-
*/
|
|
24
20
|
export declare function transformToApiFormat(turn: Turn, meta: MetaData): ExtractPayload;
|
|
25
21
|
/**
|
|
26
22
|
* Post extracted turn to API
|
|
@@ -7,13 +7,16 @@ const API_URL = process.env.GROV_API_URL || 'https://api.grov.dev';
|
|
|
7
7
|
* Transform CLI Turn to API ExtractPayload format
|
|
8
8
|
* CLI always uses 'agent' mode (no ask/plan distinction in CLI)
|
|
9
9
|
*/
|
|
10
|
+
function stripUserQueryTags(text) {
|
|
11
|
+
return text.replace(/<\/?user_query>/g, '').trim();
|
|
12
|
+
}
|
|
10
13
|
export function transformToApiFormat(turn, meta) {
|
|
11
14
|
return {
|
|
12
15
|
composerId: meta.agentId,
|
|
13
16
|
usageUuid: turn.usageUuid,
|
|
14
17
|
mode: 'agent', // CLI always agent mode
|
|
15
18
|
projectPath: turn.projectPath || 'unknown',
|
|
16
|
-
original_query: turn.userPrompt,
|
|
19
|
+
original_query: stripUserQueryTags(turn.userPrompt),
|
|
17
20
|
text: turn.assistantTexts.join('\n'),
|
|
18
21
|
thinking: turn.reasoningBlocks.join('\n\n'),
|
|
19
22
|
toolCalls: turn.toolCalls.map(tc => ({
|
|
@@ -189,15 +189,21 @@ export class ClaudeAdapter extends BaseAdapter {
|
|
|
189
189
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
190
190
|
if (messages[i].role === 'user') {
|
|
191
191
|
const content = messages[i].content;
|
|
192
|
+
let text = '';
|
|
192
193
|
if (typeof content === 'string') {
|
|
193
|
-
|
|
194
|
+
text = content;
|
|
194
195
|
}
|
|
195
|
-
if (Array.isArray(content)) {
|
|
196
|
+
else if (Array.isArray(content)) {
|
|
196
197
|
const textBlocks = content
|
|
197
198
|
.filter((b) => typeof b === 'object' && b !== null && b.type === 'text' && typeof b.text === 'string')
|
|
198
199
|
.map(b => b.text);
|
|
199
|
-
|
|
200
|
+
text = textBlocks.join('\n');
|
|
200
201
|
}
|
|
202
|
+
// Skip internal Claude Code suggestion requests
|
|
203
|
+
if (text.startsWith('[SUGGESTION MODE')) {
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
return text;
|
|
201
207
|
}
|
|
202
208
|
}
|
|
203
209
|
return '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grov",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.14",
|
|
4
4
|
"description": "Collective AI memory for Coding Agents - captures reasoning from sessions and injects context into future sessions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/cli/index.js",
|
|
@@ -111,4 +111,4 @@
|
|
|
111
111
|
"node": ">=20.0.0"
|
|
112
112
|
},
|
|
113
113
|
"packageManager": "pnpm@9.15.0"
|
|
114
|
-
}
|
|
114
|
+
}
|
package/postinstall.js
CHANGED