ctxr-cli 0.30.0 → 0.31.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/README.md +28 -0
- package/dist/commands/land.d.ts.map +1 -1
- package/dist/commands/land.js +3 -18
- package/dist/commands/land.js.map +1 -1
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +10 -2
- package/dist/commands/serve.js.map +1 -1
- package/dist/config/schema.d.ts +17 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +40 -8
- package/dist/config/schema.js.map +1 -1
- package/dist/core/browse/approve.d.ts +3 -0
- package/dist/core/browse/approve.d.ts.map +1 -1
- package/dist/core/browse/approve.js.map +1 -1
- package/dist/core/browse/page-url.d.ts +15 -0
- package/dist/core/browse/page-url.d.ts.map +1 -1
- package/dist/core/browse/page-url.js +8 -1
- package/dist/core/browse/page-url.js.map +1 -1
- package/dist/core/forge/credentials.d.ts +12 -1
- package/dist/core/forge/credentials.d.ts.map +1 -1
- package/dist/core/forge/credentials.js +25 -1
- package/dist/core/forge/credentials.js.map +1 -1
- package/dist/core/forge/github.d.ts +9 -0
- package/dist/core/forge/github.d.ts.map +1 -1
- package/dist/core/forge/github.js +6 -0
- package/dist/core/forge/github.js.map +1 -1
- package/dist/core/mcp/drafts.d.ts +30 -0
- package/dist/core/mcp/drafts.d.ts.map +1 -0
- package/dist/core/mcp/drafts.js +52 -0
- package/dist/core/mcp/drafts.js.map +1 -0
- package/dist/core/mcp/http.d.ts +40 -0
- package/dist/core/mcp/http.d.ts.map +1 -0
- package/dist/core/mcp/http.js +90 -0
- package/dist/core/mcp/http.js.map +1 -0
- package/dist/core/mcp/jsonrpc.d.ts +73 -0
- package/dist/core/mcp/jsonrpc.d.ts.map +1 -0
- package/dist/core/mcp/jsonrpc.js +149 -0
- package/dist/core/mcp/jsonrpc.js.map +1 -0
- package/dist/core/mcp/members.d.ts +11 -0
- package/dist/core/mcp/members.d.ts.map +1 -0
- package/dist/core/mcp/members.js +21 -0
- package/dist/core/mcp/members.js.map +1 -0
- package/dist/core/mcp/oauth.d.ts +99 -0
- package/dist/core/mcp/oauth.d.ts.map +1 -0
- package/dist/core/mcp/oauth.js +454 -0
- package/dist/core/mcp/oauth.js.map +1 -0
- package/dist/core/mcp/pages.d.ts +3 -0
- package/dist/core/mcp/pages.d.ts.map +1 -0
- package/dist/core/mcp/pages.js +41 -0
- package/dist/core/mcp/pages.js.map +1 -0
- package/dist/core/mcp/ripgrep.d.ts +48 -0
- package/dist/core/mcp/ripgrep.d.ts.map +1 -0
- package/dist/core/mcp/ripgrep.js +98 -0
- package/dist/core/mcp/ripgrep.js.map +1 -0
- package/dist/core/mcp/rwlock.d.ts +16 -0
- package/dist/core/mcp/rwlock.d.ts.map +1 -0
- package/dist/core/mcp/rwlock.js +59 -0
- package/dist/core/mcp/rwlock.js.map +1 -0
- package/dist/core/mcp/sessions.d.ts +84 -0
- package/dist/core/mcp/sessions.d.ts.map +1 -0
- package/dist/core/mcp/sessions.js +154 -0
- package/dist/core/mcp/sessions.js.map +1 -0
- package/dist/core/mcp/surface.d.ts +42 -0
- package/dist/core/mcp/surface.d.ts.map +1 -0
- package/dist/core/mcp/surface.js +141 -0
- package/dist/core/mcp/surface.js.map +1 -0
- package/dist/core/mcp/sync.d.ts +91 -0
- package/dist/core/mcp/sync.d.ts.map +1 -0
- package/dist/core/mcp/sync.js +218 -0
- package/dist/core/mcp/sync.js.map +1 -0
- package/dist/core/mcp/tools/capture.d.ts +64 -0
- package/dist/core/mcp/tools/capture.d.ts.map +1 -0
- package/dist/core/mcp/tools/capture.js +182 -0
- package/dist/core/mcp/tools/capture.js.map +1 -0
- package/dist/core/mcp/tools/edit.d.ts +79 -0
- package/dist/core/mcp/tools/edit.d.ts.map +1 -0
- package/dist/core/mcp/tools/edit.js +212 -0
- package/dist/core/mcp/tools/edit.js.map +1 -0
- package/dist/core/mcp/tools/files.d.ts +163 -0
- package/dist/core/mcp/tools/files.d.ts.map +1 -0
- package/dist/core/mcp/tools/files.js +265 -0
- package/dist/core/mcp/tools/files.js.map +1 -0
- package/dist/core/mcp/tools/find.d.ts +82 -0
- package/dist/core/mcp/tools/find.d.ts.map +1 -0
- package/dist/core/mcp/tools/find.js +136 -0
- package/dist/core/mcp/tools/find.js.map +1 -0
- package/dist/core/mcp/tools/gather.d.ts +88 -0
- package/dist/core/mcp/tools/gather.d.ts.map +1 -0
- package/dist/core/mcp/tools/gather.js +123 -0
- package/dist/core/mcp/tools/gather.js.map +1 -0
- package/dist/core/mcp/tools/index.d.ts +21 -0
- package/dist/core/mcp/tools/index.d.ts.map +1 -0
- package/dist/core/mcp/tools/index.js +129 -0
- package/dist/core/mcp/tools/index.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/templates/mcp/Edit.md +7 -0
- package/templates/mcp/Glob.md +5 -0
- package/templates/mcp/Grep.md +10 -0
- package/templates/mcp/Read.md +7 -0
- package/templates/mcp/Write.md +7 -0
- package/templates/mcp/capture.md +9 -0
- package/templates/mcp/consent.html +40 -0
- package/templates/mcp/find.md +9 -0
- package/templates/mcp/gather.md +5 -0
- package/templates/mcp/server-instructions.md +17 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Connect an app to __STORE_NAME__</title>
|
|
7
|
+
<style>
|
|
8
|
+
:root { color-scheme: light dark; --fg: #1d1d1f; --muted: #5f6368; --bg: #f6f6f4; --card: #ffffff; --line: #d9d9d4; --accent: #2f5d50; }
|
|
9
|
+
@media (prefers-color-scheme: dark) { :root { --fg: #ececea; --muted: #a4a4a0; --bg: #1b1b1a; --card: #262624; --line: #3a3a37; --accent: #8cc5b2; } }
|
|
10
|
+
* { box-sizing: border-box; }
|
|
11
|
+
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
|
|
12
|
+
main { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px 24px; }
|
|
13
|
+
h1 { font-size: 1.25rem; margin: 0 0 12px; }
|
|
14
|
+
p { margin: 0 0 12px; }
|
|
15
|
+
.muted { color: var(--muted); }
|
|
16
|
+
ul { margin: 0 0 16px; padding-left: 20px; }
|
|
17
|
+
code { font: 0.95em ui-monospace, SFMono-Regular, Menlo, monospace; }
|
|
18
|
+
.actions { display: flex; gap: 12px; margin-top: 20px; }
|
|
19
|
+
button { flex: 1; padding: 12px; font: inherit; font-weight: 600; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--fg); }
|
|
20
|
+
button.allow { border: 0; background: var(--accent); color: var(--card); }
|
|
21
|
+
</style>
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<main>
|
|
25
|
+
<h1>Connect __CLIENT_NAME__ to __STORE_NAME__?</h1>
|
|
26
|
+
<p>You are signed in as <strong>__EMAIL__</strong>. If you allow it, this app may, as you:</p>
|
|
27
|
+
<ul>
|
|
28
|
+
__SCOPE_ITEMS__
|
|
29
|
+
</ul>
|
|
30
|
+
<p class="muted">It will be sent back to <code>__REDIRECT_HOST__</code>. Only allow this if you just started connecting the store from that app yourself.</p>
|
|
31
|
+
<form method="post" action="/authorize">
|
|
32
|
+
__HIDDEN_FIELDS__
|
|
33
|
+
<div class="actions">
|
|
34
|
+
<button type="submit" name="decision" value="deny">Cancel</button>
|
|
35
|
+
<button type="submit" name="decision" value="allow" class="allow">Allow</button>
|
|
36
|
+
</div>
|
|
37
|
+
</form>
|
|
38
|
+
</main>
|
|
39
|
+
</body>
|
|
40
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Look for notes in the store that contain a literal word or phrase (case-insensitive), or, with no text, get the map of the store.
|
|
2
|
+
|
|
3
|
+
With text: returns `notes` in path order — each with its path, its one-line gloss, up to three matching lines with line numbers, and a link when the store has a browsable address. There is no relevance score; choose from the glosses. Matching raw captures that have not been filed into a note come back separately in `unfiled` (marked `pending_merge` when still waiting for approval); they are not what the store says, so never quote them as its position.
|
|
4
|
+
|
|
5
|
+
Without text: returns every section of the store's catalog with the notes it lists and their glosses — use it to find the right words or the right notes to pass to `gather` as seeds.
|
|
6
|
+
|
|
7
|
+
When you cite a note, include its link, so the person can open it.
|
|
8
|
+
|
|
9
|
+
Use `under` to look in one folder only. Search for the distinctive word (a name, a project, a term), not a whole question.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Read notes in full, together with the notes linked to and from them — the store's own way of pulling in related context.
|
|
2
|
+
|
|
3
|
+
Start from note paths `find` returned (`seeds`), from a catalog section, from a folder (`under`), or from a note whose backlinks to follow (`entities`). With `hops: 1` (the default) you also get every note one link away; `hops: 0` returns only the notes you named. Each note carries why it is there (the labels, and its distance in links) and its full text, in a fixed order, until a size budget runs out; the remaining notes are listed without text — gather them again by name if you need them.
|
|
4
|
+
|
|
5
|
+
Cite what you use by its path. A capture (a path under the inbox) cannot start a gather: it is not a note yet. Read it with `Read` instead.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
This connector reaches __STORE_NAME__, a contexture store: a git repository of markdown notes that a group of people keep together, plus a raw inbox of material not yet filed into notes.
|
|
2
|
+
|
|
3
|
+
Use it whenever the person asks about something the store might hold — decisions, projects, people, meetings, how things work — before answering from general knowledge, and say when the store had nothing.
|
|
4
|
+
|
|
5
|
+
How to look something up:
|
|
6
|
+
|
|
7
|
+
1. Call `find` with a literal word or phrase from the question. It returns the notes containing it, in path order, each with a one-line gloss, the matching lines and a link. It does not rank: read the glosses and pick. Call `find` with no text to see the map of the store — every section and the notes it lists — when you do not know what word to search for.
|
|
8
|
+
2. Call `gather` with the paths that look relevant as seeds. It returns those notes and the notes linked to and from them, with their full text, and says why each one is there.
|
|
9
|
+
3. Answer from what came back, citing the note paths (and links, when given). If the notes disagree or look out of date, say so.
|
|
10
|
+
|
|
11
|
+
`find` also lists matching items in `unfiled`. Those are raw captures nobody has filed into a note yet; some are still waiting for approval. Never present them as what the store says. Mention them as unfiled material when they are relevant, and use them to notice that something was already captured.
|
|
12
|
+
|
|
13
|
+
How to save something: call `capture` when the person asks you to save, keep or record material in the store. Pass the material itself in its own words — a transcript, an email, a document, meeting notes as written — not your summary of it. One item per call. The capture waits on the store's approval page until someone approves it, then lands in the inbox for filing; it does not change any note. Tell the person it is awaiting approval, and give them the approval link the call returns.
|
|
14
|
+
|
|
15
|
+
The store also offers the file tools a coding assistant has locally, with the same names and parameters: `Read`, `Grep` and `Glob` to look around, and, for people allowed to edit, `Edit` and `Write` to change notes. Edits and new notes go into the person's draft, a pull request that lands only once someone approves it on the store's approval page; say so, and give the approval link each result returns. Read `AGENTS.md` before writing a note, so it follows the store's conventions.
|
|
16
|
+
|
|
17
|
+
Every result carries `store.head`, the commit it was read from, and `store.sync_error` when the server could not fetch the latest version; mention that the answer may be out of date if it is set.
|