realontext 0.1.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/LICENSE +23 -0
- package/README.md +40 -0
- package/bin/realontext.js +43 -0
- package/package.json +20 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
realontext — 专有软件许可
|
|
2
|
+
|
|
3
|
+
Copyright (C) 2026 FlowerRealm. All rights reserved.
|
|
4
|
+
|
|
5
|
+
本软件及其源代码、文档、构建产物为 FlowerRealm 的专有财产,受著作权法保护。
|
|
6
|
+
|
|
7
|
+
未经 FlowerRealm 事先书面许可,任何人不得复制、修改、合并、发布、分发、再许可、
|
|
8
|
+
出售本软件的副本,不得对本软件进行反向工程、反编译或反汇编,不得移除或更改本
|
|
9
|
+
许可声明。
|
|
10
|
+
|
|
11
|
+
通过 npm 分发的二进制包,授予终端用户一项非独占、不可转让、可撤销的使用许可,
|
|
12
|
+
范围仅限于在用户自己的设备上运行本软件以索引和检索用户自己的代码。该许可不包
|
|
13
|
+
含对源代码的任何权利。
|
|
14
|
+
|
|
15
|
+
本软件按「现状」提供,不含任何明示或默示的担保,包括但不限于适销性、特定用途
|
|
16
|
+
适用性和非侵权的担保。在任何情况下,作者或版权持有人均不对任何索赔、损害或其
|
|
17
|
+
他责任负责。
|
|
18
|
+
|
|
19
|
+
第三方依赖各自适用其自身的许可证,见 vcpkg.json 所列各项目。其中 libgit2 为
|
|
20
|
+
GPL-2.0,附带 linking exception,链接不构成传染,因此不限制本许可的选择。其余
|
|
21
|
+
依赖为 MIT、Apache-2.0、CC0、curl 许可或公有领域,均允许在专有软件中使用。
|
|
22
|
+
|
|
23
|
+
商务联系:qzrobotsnake@gmail.com
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# realontext
|
|
2
|
+
|
|
3
|
+
Code search for coding agents, over the directory you are in: tree-sitter
|
|
4
|
+
chunks ranked by BM25 and, when you are logged in, narrowed down by the jev
|
|
5
|
+
model through the realontext Relay.
|
|
6
|
+
|
|
7
|
+
## As an MCP server
|
|
8
|
+
|
|
9
|
+
In the repository's MCP configuration:
|
|
10
|
+
|
|
11
|
+
```jsonc
|
|
12
|
+
{ "realontext": { "command": "npx", "args": ["-y", "realontext", "mcp"] } }
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Logging in
|
|
16
|
+
|
|
17
|
+
Log in once; the Token is kept in `~/.config/realontext/config.toml`
|
|
18
|
+
(`%USERPROFILE%\.config\realontext\config.toml` on Windows) and every
|
|
19
|
+
repository uses it:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx -y realontext login # in the browser
|
|
23
|
+
npx -y realontext login --paste # when the browser is on another machine
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
With a Token, each query asks jev four rounds of questions (which files, which
|
|
27
|
+
signatures, which function bodies, then the top five again) and sends it the
|
|
28
|
+
query, file paths and function names, and the code of the candidate functions.
|
|
29
|
+
Without a Token nothing leaves the machine: the results come back in lexical
|
|
30
|
+
order, with a notice saying so. `REALONTEXT_TOKEN` overrides the saved Token;
|
|
31
|
+
set to an empty string, it turns jev off for that process.
|
|
32
|
+
|
|
33
|
+
## From the shell
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
echo "why does loading yaml crash" | npx realontext query --k 20
|
|
37
|
+
npx realontext symbols
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Builds: macOS on Apple Silicon (13 and later), x64 Linux and x64 Windows.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The `realontext` command npm installs: finds the binary of the platform
|
|
3
|
+
// package npm picked through optionalDependencies and runs it with this
|
|
4
|
+
// process's arguments, stdio and exit status (D39).
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
const { spawnSync } = require("child_process");
|
|
8
|
+
|
|
9
|
+
const packages = {
|
|
10
|
+
"darwin arm64": "@realontext/darwin-arm64",
|
|
11
|
+
"linux x64": "@realontext/linux-x64",
|
|
12
|
+
"win32 x64": "@realontext/win32-x64",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const name = packages[`${process.platform} ${process.arch}`];
|
|
16
|
+
if (!name) {
|
|
17
|
+
console.error(
|
|
18
|
+
`realontext: no build for ${process.platform}-${process.arch}; ` +
|
|
19
|
+
`there are builds for ${Object.keys(packages).map((k) => k.replace(" ", "-")).join(", ")}`
|
|
20
|
+
);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let binary;
|
|
25
|
+
try {
|
|
26
|
+
binary = require.resolve(`${name}/bin/realontext${process.platform === "win32" ? ".exe" : ""}`);
|
|
27
|
+
} catch {
|
|
28
|
+
console.error(
|
|
29
|
+
`realontext: ${name} is not installed. It is an optional dependency of realontext; ` +
|
|
30
|
+
`reinstall without --no-optional / --omit=optional.`
|
|
31
|
+
);
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const run = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
36
|
+
if (run.error) {
|
|
37
|
+
console.error(`realontext: ${run.error.message}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
if (run.signal) {
|
|
41
|
+
process.kill(process.pid, run.signal);
|
|
42
|
+
}
|
|
43
|
+
process.exit(run.status);
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "realontext",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Code search for coding agents, over the directory you are in. CLI and MCP server.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"bin": {
|
|
7
|
+
"realontext": "bin/realontext.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/realontext.js"
|
|
11
|
+
],
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=18"
|
|
14
|
+
},
|
|
15
|
+
"optionalDependencies": {
|
|
16
|
+
"@realontext/darwin-arm64": "0.1.0",
|
|
17
|
+
"@realontext/linux-x64": "0.1.0",
|
|
18
|
+
"@realontext/win32-x64": "0.1.0"
|
|
19
|
+
}
|
|
20
|
+
}
|