realontext 0.12.0 → 0.12.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +7 -8
- package/bin/realontext.js +6 -6
- package/hooks/hint.js +1 -1
- package/lib/agents.js +2 -2
- package/lib/binary.js +2 -2
- package/lib/hook.js +1 -1
- package/lib/mcp.js +2 -2
- package/lib/setup.js +1 -1
- package/lib/tui.mjs +1 -1
- package/lib/update.js +2 -2
- package/package.json +4 -4
- package/pi/realontext.js +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# realontext
|
|
2
2
|
|
|
3
|
-
Code search for coding agents, over the directory you are in:
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Code search for coding agents, over the directory you are in: whole functions
|
|
4
|
+
and classes, ranked on the machine and, when you are logged in, by a model
|
|
5
|
+
through the realontext Relay.
|
|
6
6
|
|
|
7
7
|
## Installing
|
|
8
8
|
|
|
@@ -51,12 +51,11 @@ realontext login # in the browser
|
|
|
51
51
|
realontext login --paste # when the browser is on another machine
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
With a Token,
|
|
55
|
-
signatures, which function bodies, then the top five again) and sends it the
|
|
54
|
+
With a Token, a described query is ranked at the Relay, which is sent the
|
|
56
55
|
query, file paths and function names, and the code of the candidate functions.
|
|
57
|
-
Without a Token nothing leaves the machine: the results
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
Without a Token nothing leaves the machine: the results are ranked locally,
|
|
57
|
+
with a notice saying so. `REALONTEXT_TOKEN` overrides the saved Token; set to
|
|
58
|
+
an empty string, it keeps that process local.
|
|
60
59
|
|
|
61
60
|
## Updates
|
|
62
61
|
|
package/bin/realontext.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// The `realontext` command npm installs: runs the binary of this platform with
|
|
3
|
-
// this process's arguments, stdio and exit status
|
|
4
|
-
// instead is what Node does better: `setup` edits agents' configs
|
|
5
|
-
// `hook` answers the hooks it wrote
|
|
6
|
-
// terminal, a menu of everything
|
|
7
|
-
// the background
|
|
8
|
-
// newer binary in its middle
|
|
3
|
+
// this process's arguments, stdio and exit status. What is written here
|
|
4
|
+
// instead is what Node does better: `setup` edits agents' configs,
|
|
5
|
+
// `hook` answers the hooks it wrote, and with no command, in a
|
|
6
|
+
// terminal, a menu of everything. Each start may update the binary in
|
|
7
|
+
// the background; `mcp` passes the session through and switches to a
|
|
8
|
+
// newer binary in its middle.
|
|
9
9
|
"use strict";
|
|
10
10
|
|
|
11
11
|
const { spawnSync } = require("child_process");
|
package/hooks/hint.js
CHANGED
package/lib/agents.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// How realontext is connected to each agent
|
|
1
|
+
// How realontext is connected to each agent, the data `setup.js` acts
|
|
2
2
|
// on and `hook.js` answers from. An agent is a list of steps, each one of:
|
|
3
3
|
//
|
|
4
4
|
// run a command of the agent's own CLI; `clear` first, quietly, when
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
//
|
|
13
13
|
// A path starting with `~/` is under the home directory, a relative one under
|
|
14
14
|
// the directory `setup` runs in. Three things go in: the MCP server, everywhere;
|
|
15
|
-
// the once-a-session reminder
|
|
15
|
+
// the once-a-session reminder, where the agent has a hook that adds
|
|
16
16
|
// context the model sees; the usage rules, where the agent is known not to
|
|
17
17
|
// pass the server's instructions to the model. `hook` names the event the
|
|
18
18
|
// reminder answers and, with `flat`, that the answer is not wrapped in
|
package/lib/binary.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The binary this machine runs: the one the platform package npm picked
|
|
2
|
-
// through optionalDependencies
|
|
3
|
-
// versions
|
|
2
|
+
// through optionalDependencies, or the newer one the updater put in
|
|
3
|
+
// versions/. Throws when there is neither.
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const fs = require("fs");
|
package/lib/hook.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `realontext hook <agent
|
|
1
|
+
// `realontext hook <agent>`: the first time an agent's session
|
|
2
2
|
// fires the hook `setup` wrote, the model is reminded that codebase-retrieval
|
|
3
3
|
// searches source code. Once a session, and only context: the agent goes on
|
|
4
4
|
// as it would, and any failure here is silent. Which event it answers, and in
|
package/lib/mcp.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// `realontext mcp` through the wrapper
|
|
1
|
+
// `realontext mcp` through the wrapper: the agent's JSON-RPC lines go to
|
|
2
2
|
// the binary in order and its lines come back. Before each tools/call the
|
|
3
|
-
// version is asked for
|
|
3
|
+
// version is asked for; when that gives a newer binary, it is started,
|
|
4
4
|
// the session's initialize is replayed to it and its answer dropped, and the
|
|
5
5
|
// call goes to it. The old binary's stdin is closed: it answers what it was
|
|
6
6
|
// sent and exits.
|
package/lib/setup.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// `realontext setup [agent...]`: connects agents to `realontext mcp`, run from
|
|
2
|
-
// the repository root
|
|
2
|
+
// the repository root. What each agent gets is in `agents.js`;
|
|
3
3
|
// this file carries the steps out. With no agent named, the menu in `tui.mjs`
|
|
4
4
|
// asks which. Running it again replaces what an earlier run wrote, such as an
|
|
5
5
|
// older `npx` entry, and leaves everything else in the files as it was.
|
package/lib/tui.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// What `realontext` opens with no command, in a terminal
|
|
1
|
+
// What `realontext` opens with no command, in a terminal: the account
|
|
2
2
|
// behind the Token, connecting agents, logging in. The Relay is asked through
|
|
3
3
|
// the binary (`usage`, `login`), agents are connected through `setup.js`.
|
|
4
4
|
//
|
package/lib/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Keeps the binary at the version the Relay names
|
|
1
|
+
// Keeps the binary at the version the Relay names. The Relay's GET
|
|
2
2
|
// /v1/client names the version; when it is newer than npm's, that version's
|
|
3
3
|
// platform package comes from the registry, checked against the registry's
|
|
4
4
|
// integrity, into versions/<version>/, and `current` names it. A version no
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// `start()` runs this file as a detached process, at most once an hour: the
|
|
9
9
|
// command it was started for does not wait, the next start runs the new
|
|
10
10
|
// version. `latest()` does the same in this process, for `mcp` before each
|
|
11
|
-
// call
|
|
11
|
+
// call, which switches to what it returns.
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
14
|
const crypto = require("crypto");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "realontext",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Code search for coding agents, over the directory you are in. CLI and MCP server.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"react": "^18.3.1"
|
|
35
35
|
},
|
|
36
36
|
"optionalDependencies": {
|
|
37
|
-
"@realontext/darwin-arm64": "0.12.
|
|
38
|
-
"@realontext/linux-x64": "0.12.
|
|
39
|
-
"@realontext/win32-x64": "0.12.
|
|
37
|
+
"@realontext/darwin-arm64": "0.12.1",
|
|
38
|
+
"@realontext/linux-x64": "0.12.1",
|
|
39
|
+
"@realontext/win32-x64": "0.12.1"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/pi/realontext.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The Pi extension
|
|
1
|
+
// The Pi extension. Pi has no MCP client, so this is one, for
|
|
2
2
|
// `realontext mcp` alone: it starts the server with this package's own
|
|
3
3
|
// command, registers the tools the server lists, with their names,
|
|
4
4
|
// descriptions and schemas as they are, and appends the server's
|