gigarag-cursor 0.1.0 → 0.1.2
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/.cursor-plugin/plugin.json +1 -1
- package/cli/cli.js +1 -1
- package/cli/clients.json +3 -1
- package/cli/commands/login.js +28 -6
- package/cli/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gigarag",
|
|
3
3
|
"description": "Your GigaRAG knowledge base inside Cursor: index a codebase, save decisions, recall them later.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"author": { "name": "GigaRAG", "url": "https://gigarag.com" },
|
|
6
6
|
"homepage": "https://gigarag.com/connect/cursor",
|
|
7
7
|
"license": "UNLICENSED",
|
package/cli/cli.js
CHANGED
|
@@ -4,7 +4,7 @@ const HELP = `gigarag ${version()}
|
|
|
4
4
|
|
|
5
5
|
Connect GigaRAG to your AI clients.
|
|
6
6
|
|
|
7
|
-
gigarag login Sign in (paste a key
|
|
7
|
+
gigarag login Sign in through your browser (--paste for a key)
|
|
8
8
|
gigarag logout Delete the stored credential
|
|
9
9
|
gigarag connect [client...] Add GigaRAG to your installed clients
|
|
10
10
|
gigarag status What is configured, and whether the key works
|
package/cli/clients.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$comment": "Owned by this repo. Slugs match gigarag.com/connect, plus entries marked extra. Every auto entry names where the client keeps its MCP config and the entry shape it expects, and commandTargets says where it reads custom commands or skills. Tokens $command, $args, $argv, $helper and $url are filled by gigarag connect.",
|
|
2
|
+
"$comment": "Owned by this repo. Slugs match gigarag.com/connect, plus entries marked extra. Every auto entry names where the client keeps its MCP config and the entry shape it expects, and commandTargets says where it reads custom commands or skills. Tokens $command, $args, $argv, $helper and $url are filled by gigarag connect. An entry marked noLocalServer is one gigarag cannot connect at all, because the client runs in the cloud or has no stdio transport; it is listed so --print can still give its docs, and the connect page shows no CLI method for it.",
|
|
3
3
|
"version": 1,
|
|
4
4
|
"clients": [
|
|
5
5
|
{
|
|
@@ -580,6 +580,7 @@
|
|
|
580
580
|
"name": "Copilot coding agent",
|
|
581
581
|
"group": "editor",
|
|
582
582
|
"mode": "print",
|
|
583
|
+
"noLocalServer": true,
|
|
583
584
|
"hint": "Runs in GitHub Actions, so there is no machine of yours to run gigarag on. Set it up in the repository settings.",
|
|
584
585
|
"docs": "https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp"
|
|
585
586
|
},
|
|
@@ -869,6 +870,7 @@
|
|
|
869
870
|
"name": "Android Studio",
|
|
870
871
|
"group": "editor",
|
|
871
872
|
"mode": "print",
|
|
873
|
+
"noLocalServer": true,
|
|
872
874
|
"hint": "Android Studio has no stdio transport, so the gigarag bridge cannot run there. Its MCP settings take an HTTP server only, which needs a key in a header, so create a key for it at gigarag.com/connect and follow the guide there.",
|
|
873
875
|
"docs": "https://developer.android.com/studio/gemini/add-mcp-server"
|
|
874
876
|
},
|
package/cli/commands/login.js
CHANGED
|
@@ -6,12 +6,15 @@ import { runOAuthLogin } from '../auth/oauth.js';
|
|
|
6
6
|
import { GigaRag, McpHttpError } from '../sdk.js';
|
|
7
7
|
import { assertSecureUrl } from '../secureUrl.js';
|
|
8
8
|
import { err, out, promptHidden, readStdinLine, UsageError } from '../ui.js';
|
|
9
|
-
const HELP = `Usage: gigarag login [--
|
|
9
|
+
const HELP = `Usage: gigarag login [--paste] [--key <key>] [--url <mcp url>] [--no-verify]
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Signs this machine in to GigaRAG. With no flags it opens your browser, and nothing
|
|
12
|
+
holds a key afterwards: the gateway swaps your sign-in for one behind the scenes.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Piped input still takes a key, so scripts keep working: echo $KEY | gigarag login
|
|
15
|
+
|
|
16
|
+
--paste Paste an agent key instead of opening a browser
|
|
17
|
+
--browser Open the browser. The default, accepted so older scripts still run
|
|
15
18
|
--key <key> Give the key on the command line (it will sit in your shell history)
|
|
16
19
|
--url <url> Use a different MCP endpoint
|
|
17
20
|
--no-verify Store the key without checking it against GigaRAG first`;
|
|
@@ -20,6 +23,7 @@ export async function login(argv) {
|
|
|
20
23
|
args: argv,
|
|
21
24
|
options: {
|
|
22
25
|
browser: { type: 'boolean' },
|
|
26
|
+
paste: { type: 'boolean' },
|
|
23
27
|
key: { type: 'string' },
|
|
24
28
|
url: { type: 'string' },
|
|
25
29
|
issuer: { type: 'string' },
|
|
@@ -41,8 +45,26 @@ export async function login(argv) {
|
|
|
41
45
|
}
|
|
42
46
|
updateConfig(c => void (c.mcpUrl = values.url));
|
|
43
47
|
}
|
|
44
|
-
|
|
48
|
+
// Signing in through the browser is the default, and pasting a key is the
|
|
49
|
+
// exception it used to be the other way round.
|
|
50
|
+
//
|
|
51
|
+
// A pasted key is a long-lived admin credential that the person then has to
|
|
52
|
+
// keep somewhere, and it counts against the workspace's key limit every time
|
|
53
|
+
// somebody sets up another machine. The browser flow leaves the key on the
|
|
54
|
+
// server: the gateway swaps the grant for one on every request, and revoking
|
|
55
|
+
// the grant cuts that machine off without touching any other.
|
|
56
|
+
//
|
|
57
|
+
// Three things still take a key, because each one has no browser to open:
|
|
58
|
+
// --key, --paste for a machine whose browser is somewhere else, and piped
|
|
59
|
+
// input, which is how CI and container builds sign in.
|
|
60
|
+
//
|
|
61
|
+
// A flag always beats the guess about stdin. Without that, --browser in a
|
|
62
|
+
// script would silently read the pipe instead of opening a browser.
|
|
63
|
+
const asked = values.key || values.paste ? 'key' : values.browser ? 'browser' : null;
|
|
64
|
+
const mode = asked ?? (process.stdin.isTTY ? 'browser' : 'key');
|
|
65
|
+
if (mode === 'browser') {
|
|
45
66
|
return browserLogin(values.issuer ?? readConfig().issuer ?? DEFAULT_ISSUER, values.url);
|
|
67
|
+
}
|
|
46
68
|
let key = values.key?.trim();
|
|
47
69
|
if (!key && envKey()) {
|
|
48
70
|
out('GIGARAG_API_KEY is set, so every command already uses it. Nothing to store.');
|
|
@@ -54,7 +76,7 @@ export async function login(argv) {
|
|
|
54
76
|
: await readStdinLine();
|
|
55
77
|
}
|
|
56
78
|
if (!key)
|
|
57
|
-
throw new UsageError('No key given. Copy one from gigarag.com/connect,
|
|
79
|
+
throw new UsageError('No key given. Copy one from gigarag.com/connect and run gigarag login again, or run gigarag login --browser to sign in through your browser.');
|
|
58
80
|
if (!looksLikeAgentKey(key)) {
|
|
59
81
|
err('That does not look like an agent key. They start with gr_live_. Storing it anyway would only fail later.');
|
|
60
82
|
return 1;
|
package/cli/package.json
CHANGED