gogcli-mcp-docs 4.7.0 → 4.8.0
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +3 -3
- package/dist/index.js +129 -99
- package/manifest.json +23 -2
- package/mint.yaml +1 -1
- package/package.json +3 -3
- package/server.json +20 -2
- package/src/tools/docs-extra.ts +73 -71
- package/tests/tool-annotations.test.ts +10 -0
- package/tests/tools/docs-extra.test.ts +7 -7
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { authToolsFor, registerDocsTools } from '../../gogcli-mcp/src/lib.js';
|
|
2
|
+
import { registerExtraDocsTools } from '../src/tools/docs-extra.js';
|
|
3
|
+
import { describeToolAnnotations, LOCAL_AUTH_TOOLS } from '../../gogcli-mcp/tests/support/tool-annotations.js';
|
|
4
|
+
|
|
5
|
+
// The same registrar list src/index.ts hands to runMcp.
|
|
6
|
+
describeToolAnnotations([authToolsFor('docs'), registerDocsTools, registerExtraDocsTools] as never, {
|
|
7
|
+
tools: 83,
|
|
8
|
+
destructive: 52,
|
|
9
|
+
local: [...LOCAL_AUTH_TOOLS, 'gog_batch_abort', 'gog_batch_begin', 'gog_batch_list', 'gog_batch_prune', 'gog_batch_show'],
|
|
10
|
+
});
|
|
@@ -79,17 +79,17 @@ describe('gog_docs_delete', () => {
|
|
|
79
79
|
);
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
it('includes --tab
|
|
82
|
+
it('includes --tab when provided', async () => {
|
|
83
83
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
|
|
84
84
|
const harness = await setupHandlers();
|
|
85
85
|
await harness.callTool('gog_docs_delete', { docId: 'abc', start: 1, end: 5, tabId: 'tab1' });
|
|
86
86
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
87
|
-
['docs', 'delete', '--start=1', '--end=5', pos('abc'), '--tab
|
|
87
|
+
['docs', 'delete', '--start=1', '--end=5', pos('abc'), '--tab=tab1'],
|
|
88
88
|
{ account: undefined },
|
|
89
89
|
);
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
it('omits --tab
|
|
92
|
+
it('omits --tab when not provided', async () => {
|
|
93
93
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
|
|
94
94
|
const harness = await setupHandlers();
|
|
95
95
|
await harness.callTool('gog_docs_delete', { docId: 'abc', start: 1, end: 5 });
|
|
@@ -246,12 +246,12 @@ describe('gog_docs_insert', () => {
|
|
|
246
246
|
);
|
|
247
247
|
});
|
|
248
248
|
|
|
249
|
-
it('includes --tab
|
|
249
|
+
it('includes --tab when provided', async () => {
|
|
250
250
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
|
|
251
251
|
const harness = await setupHandlers();
|
|
252
252
|
await harness.callTool('gog_docs_insert', { docId: 'abc', content: 'hi', tabId: 'tab1' });
|
|
253
253
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
254
|
-
['docs', 'insert', pos('abc'), pos('hi'), '--tab
|
|
254
|
+
['docs', 'insert', pos('abc'), pos('hi'), '--tab=tab1'],
|
|
255
255
|
{ account: undefined },
|
|
256
256
|
);
|
|
257
257
|
});
|
|
@@ -390,12 +390,12 @@ describe('gog_docs_update', () => {
|
|
|
390
390
|
);
|
|
391
391
|
});
|
|
392
392
|
|
|
393
|
-
it('includes --tab
|
|
393
|
+
it('includes --tab when provided', async () => {
|
|
394
394
|
vi.mocked(lib.runOrDiagnose).mockResolvedValue(rawTextResult('{}'));
|
|
395
395
|
const harness = await setupHandlers();
|
|
396
396
|
await harness.callTool('gog_docs_update', { docId: 'abc', text: 'hi', tabId: 'tab1' });
|
|
397
397
|
expect(lib.runOrDiagnose).toHaveBeenCalledWith(
|
|
398
|
-
['docs', 'update', pos('abc'), '--text=hi', '--tab
|
|
398
|
+
['docs', 'update', pos('abc'), '--text=hi', '--tab=tab1'],
|
|
399
399
|
{ account: undefined },
|
|
400
400
|
);
|
|
401
401
|
});
|