gogcli-mcp-sheets 2.6.0 → 2.6.1
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
|
|
10
|
-
"version": "2.6.
|
|
10
|
+
"version": "2.6.1"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "gogcli (Sheets)",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
|
|
18
|
-
"version": "2.6.
|
|
18
|
+
"version": "2.6.1",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
package/dist/index.js
CHANGED
|
@@ -31399,7 +31399,7 @@ function registerSheetsTools(server2) {
|
|
|
31399
31399
|
}
|
|
31400
31400
|
|
|
31401
31401
|
// ../gogcli-mcp/src/server.ts
|
|
31402
|
-
var VERSION = true ? "2.6.
|
|
31402
|
+
var VERSION = true ? "2.6.1" : "0.0.0";
|
|
31403
31403
|
function createServer(options) {
|
|
31404
31404
|
return new McpServer({
|
|
31405
31405
|
name: options?.name ?? "gogcli",
|
|
@@ -31552,7 +31552,7 @@ function registerExtraSheetsTools(server2) {
|
|
|
31552
31552
|
account: accountParam
|
|
31553
31553
|
}
|
|
31554
31554
|
}, async ({ spreadsheetId, sheet, dimension, start, count, after, inheritFromBefore, account }) => {
|
|
31555
|
-
const effectiveStart =
|
|
31555
|
+
const effectiveStart = start + 1;
|
|
31556
31556
|
const args = ["sheets", "insert", spreadsheetId, sheet, dimension, String(effectiveStart)];
|
|
31557
31557
|
if (count !== void 0) args.push(`--count=${count}`);
|
|
31558
31558
|
if (after) args.push("--after");
|
package/manifest.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"manifest_version": "0.3",
|
|
4
4
|
"name": "gogcli-mcp-sheets",
|
|
5
5
|
"display_name": "gogcli (Sheets)",
|
|
6
|
-
"version": "2.6.
|
|
6
|
+
"version": "2.6.1",
|
|
7
7
|
"description": "Extended Google Sheets for Claude via gogcli — auth + full Sheets support",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "Chris Hall",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gogcli-mcp-sheets",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.1",
|
|
4
4
|
"mcpName": "io.github.chrischall/gogcli-mcp-sheets",
|
|
5
5
|
"description": "Extended Google Sheets MCP server via gogcli — all base tools plus full Sheets support",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/gogcli-mcp-sheets"
|
|
9
9
|
},
|
|
10
|
-
"version": "2.6.
|
|
10
|
+
"version": "2.6.1",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "gogcli-mcp-sheets",
|
|
15
|
-
"version": "2.6.
|
|
15
|
+
"version": "2.6.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
|
@@ -182,11 +182,12 @@ export function registerExtraSheetsTools(server: McpServer): void {
|
|
|
182
182
|
account: accountParam,
|
|
183
183
|
},
|
|
184
184
|
}, async ({ spreadsheetId, sheet, dimension, start, count, after, inheritFromBefore, account }) => {
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
185
|
+
// gog's positional `<start>` is 1-based, and it rejects 0 ("start must be >= 1").
|
|
186
|
+
// Without --after it inserts *before* the position, so API start_index = positional - 1;
|
|
187
|
+
// with --after it inserts *after*, so API start_index = positional. Our `start` is 0-based,
|
|
188
|
+
// and the contract is: after:false lands at start_index=start, after:true at start_index=start+1.
|
|
189
|
+
// Both cases reduce to sending positional = start + 1 (issue #42 + the off-by-one this fixes).
|
|
190
|
+
const effectiveStart = start + 1;
|
|
190
191
|
const args = ['sheets', 'insert', spreadsheetId, sheet, dimension, String(effectiveStart)];
|
|
191
192
|
if (count !== undefined) args.push(`--count=${count}`);
|
|
192
193
|
if (after) args.push('--after');
|
|
@@ -114,11 +114,23 @@ describe('gog_sheets_freeze', () => {
|
|
|
114
114
|
|
|
115
115
|
// 7. insert
|
|
116
116
|
describe('gog_sheets_insert', () => {
|
|
117
|
-
it('
|
|
117
|
+
it('shifts our 0-based start by +1 so the new dimension lands AT start (after:false)', async () => {
|
|
118
|
+
// gog's positional <start> is 1-based and, without --after, it inserts *before* it,
|
|
119
|
+
// so API start_index = positional - 1. To land at our 0-based start we send start+1.
|
|
120
|
+
// start=5 → positional 6 → API start_index 5.
|
|
118
121
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(toText('{}'));
|
|
119
122
|
const handlers = setupHandlers();
|
|
120
123
|
await handlers.get('gog_sheets_insert')!({ spreadsheetId: 'sid', sheet: 'Sheet1', dimension: 'ROWS', start: 5 });
|
|
121
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'Sheet1', 'ROWS', '
|
|
124
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'Sheet1', 'ROWS', '6'], { account: undefined });
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it('bug: start=1, after:false inserts before 0-based index 1 (new row 2), not at the top', async () => {
|
|
128
|
+
// Regression for the reported "range.startIndex must be set" / wrong-placement bug.
|
|
129
|
+
// start=1 → positional 2 → gog API start_index 1 (insert before the 2nd row).
|
|
130
|
+
vi.mocked(lib.runOrDiagnose).mockResolvedValue(toText('{}'));
|
|
131
|
+
const handlers = setupHandlers();
|
|
132
|
+
await handlers.get('gog_sheets_insert')!({ spreadsheetId: 'sid', sheet: 'S1', dimension: 'ROWS', start: 1, count: 1 });
|
|
133
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'S1', 'ROWS', '2', '--count=1'], { account: undefined });
|
|
122
134
|
});
|
|
123
135
|
|
|
124
136
|
it('shifts start by +1 when after:true so the new dimension lands AFTER start', async () => {
|
|
@@ -142,14 +154,17 @@ describe('gog_sheets_insert', () => {
|
|
|
142
154
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(toText('{}'));
|
|
143
155
|
const handlers = setupHandlers();
|
|
144
156
|
await handlers.get('gog_sheets_insert')!({ spreadsheetId: 'sid', sheet: 'S1', dimension: 'ROWS', start: 0, count: 0 });
|
|
145
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'S1', 'ROWS', '
|
|
157
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'S1', 'ROWS', '1', '--count=0'], { account: undefined });
|
|
146
158
|
});
|
|
147
159
|
|
|
148
|
-
it('omits --after and
|
|
160
|
+
it('omits --after and sends start+1 so start=0 inserts at the very top (after:false)', async () => {
|
|
161
|
+
// start=0 → positional 1 → gog API start_index 0. Sending positional 0 would make gog
|
|
162
|
+
// reject the call outright ("start must be >= 1"), so the +1 shift is what makes a
|
|
163
|
+
// top-of-sheet insert reachable at all.
|
|
149
164
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(toText('{}'));
|
|
150
165
|
const handlers = setupHandlers();
|
|
151
166
|
await handlers.get('gog_sheets_insert')!({ spreadsheetId: 'sid', sheet: 'S1', dimension: 'ROWS', start: 0, after: false });
|
|
152
|
-
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'S1', 'ROWS', '
|
|
167
|
+
expect(lib.runOrDiagnose).toHaveBeenCalledWith(['sheets', 'insert', 'sid', 'S1', 'ROWS', '1'], { account: undefined });
|
|
153
168
|
});
|
|
154
169
|
|
|
155
170
|
it('passes --inherit-from-before=true when set', async () => {
|