gigarag-cursor 0.1.2 → 0.3.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/.cursor-plugin/plugin.json +1 -1
- package/README.md +2 -0
- package/cli/auth/account.js +106 -0
- package/cli/auth/credentials.js +125 -16
- package/cli/binding.js +117 -0
- package/cli/cli.js +10 -0
- package/cli/commands/authHeader.js +5 -8
- package/cli/commands/connect.js +7 -4
- package/cli/commands/gitHooks.js +367 -0
- package/cli/commands/indexSync.js +24 -5
- package/cli/commands/login.js +47 -12
- package/cli/commands/mcp.js +10 -1
- package/cli/commands/repo.js +1 -0
- package/cli/commands/scan.js +21 -1
- package/cli/commands/status.js +33 -15
- package/cli/commands/sync.js +223 -0
- package/cli/commands/trust.js +31 -0
- package/cli/commands/use.js +81 -0
- package/cli/commands/workspaces.js +40 -0
- package/cli/git/git.js +187 -0
- package/cli/git/hookScript.js +83 -0
- package/cli/hooks.js +43 -15
- package/cli/mcp/client.js +4 -0
- package/cli/mcp/session.js +66 -7
- package/cli/package.json +1 -1
- package/cli/prompts.generated.js +18 -2
- package/cli/scan/repo.js +16 -2
- package/cli/scan/scan.js +1 -1
- package/cli/sdk.js +8 -0
- package/cli/state.js +71 -11
- package/cli/sync/notes.js +50 -0
- package/cli/sync/plan.js +76 -0
- package/cli/sync/remote.js +72 -0
- package/cli/sync/rewriter.js +125 -0
- package/cli/sync/slug.js +30 -0
- package/cli/sync/stage.js +323 -0
- package/cli/sync/target.js +14 -0
- package/cli/sync/worker.js +159 -0
- package/package.json +1 -1
- package/skills/gigaimport/SKILL.md +19 -0
- package/skills/gigainbox/SKILL.md +80 -0
- package/skills/gigaindex/SKILL.md +6 -3
- package/skills/gigasync/SKILL.md +6 -3
package/skills/gigasync/SKILL.md
CHANGED
|
@@ -19,7 +19,7 @@ The work is split on purpose. The `gigarag` command does the mechanical half: it
|
|
|
19
19
|
|
|
20
20
|
## 1. Scan
|
|
21
21
|
|
|
22
|
-
Run `gigarag scan <path>` with the path you were given, or the current directory.
|
|
22
|
+
Run `gigarag scan <path>` with the path you were given, or the current directory. If it exits nonzero and prints a line about an untrusted workspace instead of JSON, stop immediately: do not run `gigarag use` yourself, and do not fall back to indexing without a manifest. Report the line it printed and end there. Otherwise it prints a JSON manifest. Read these fields:
|
|
23
23
|
|
|
24
24
|
- `repo.slug` is the bucket. `repo.root` is the repository root.
|
|
25
25
|
- `files` lists new and changed files, each with `path`, `hash`, `status`, `lines`, `language`, `nodeIds` (memos already made from it) and sometimes `chunks` (line ranges, when the file is too long for one memo).
|
|
@@ -30,7 +30,7 @@ If `files` and `removed` are both empty, report "Up to date" and stop.
|
|
|
30
30
|
|
|
31
31
|
## 2. Find or create the bucket and threads
|
|
32
32
|
|
|
33
|
-
Call `list_buckets` with `q` set to the slug
|
|
33
|
+
Call `list_buckets` with `q` set to the slug and use the bucket whose slug matches exactly. If `repo.bound` is true in the manifest, the bucket was chosen in `.gigarag.json`: never call `create_bucket`. If it is not in the list, stop and tell the person that the bucket named in .gigarag.json is not reachable with their access, and that `gigarag use <workspace> --bucket <slug>` links another. Otherwise, when no bucket matches, `create_bucket` with that slug, the repository name as the title, and a one line description. Slugs are lowercase letters, digits and hyphens, at most 64 characters.
|
|
34
34
|
|
|
35
35
|
Group memos into threads by the top level area of the repository: `src`, `docs`, `tests`, `config`. Look them up with `list_threads` for the bucket and create the missing ones. Keep the number of threads under about ten.
|
|
36
36
|
|
|
@@ -44,13 +44,16 @@ Work in batches of about ten files. For each file:
|
|
|
44
44
|
- The title says what the module is, for example "Session token refresh". The summary is one or two sentences. `node_type` is `code` for source, `doc` for markdown and prose, `config` for configuration. The slug comes from the path, for example `src-auth-session-ts`. Set `actor` to `agent:gigarag-indexer`.
|
|
45
45
|
- A body holds at most 10,000 characters. For a long file with `chunks`, write one memo per chunk and a short parent memo that links to them.
|
|
46
46
|
- If `nodeIds` is not empty, the file was indexed before. Call `update_node` on that node instead of creating a second one, and keep the `[Title](N:12)` links already in its text unless the thing they point at is gone.
|
|
47
|
+
- A memo whose source changed carries `stale: true`. Rewriting its content with `update_node` clears the mark. If you read the file and the memo is still right, send its body back unchanged, which clears the mark too.
|
|
47
48
|
- Where this memo depends on another module, link it in the text as `[Module name](N:12)`. Get the ref from `find_nodes` with part of the title, or from a memo you have already written this run. Never write a UUID as a link target. After each write, look at `unresolved_links` in the reply and fix or remove any ref that did not resolve.
|
|
48
49
|
|
|
49
50
|
## 4. Record progress after every batch
|
|
50
51
|
|
|
51
|
-
After each batch, pipe the result to `gigarag record` so a later run updates in place and an interrupted run can resume. Send JSON on stdin:
|
|
52
|
+
After each batch, pipe the result to `gigarag record` so a later run updates in place and an interrupted run can resume. Send JSON on stdin with a heredoc, so the command line stays `gigarag record` and nothing else:
|
|
52
53
|
|
|
54
|
+
gigarag record <<'JSON'
|
|
53
55
|
{"repo":"<slug>","files":[{"path":"src/auth.ts","hash":"<hash from the manifest>","nodes":[{"id":"<node id>","ref":"N:12","title":"Session token refresh","type":"code","tokens":600}]}]}
|
|
56
|
+
JSON
|
|
54
57
|
|
|
55
58
|
`tokens` is your rough estimate of what fetching the memo costs, at about four characters a token. Do this per batch, not once at the end.
|
|
56
59
|
|