reallink-cli 0.1.15 → 0.1.17

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 CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Rust-based CLI for Reallink authentication, token workflows, and workspace file CRUD.
4
4
 
5
+ This package now includes an agent-oriented capability surface:
6
+
7
+ - `reallink call` for direct authenticated API access
8
+ - `reallink ops list/search/show/invoke` for capability discovery and invocation
9
+ - explicit bearer token override support so agents can run without a saved interactive session
10
+
5
11
  ## Install
6
12
 
7
13
  ```bash
@@ -11,6 +17,13 @@ npm install -g reallink-cli
11
17
  On supported published platforms, npm installs a bundled prebuilt binary so install/update is fast.
12
18
  If a prebuilt binary is not available for your OS/arch, npm falls back to a one-time Rust release build during postinstall.
13
19
  After install, `reallink` runs the compiled binary directly (no per-command cargo compile step).
20
+ Windows and Linux packaging should be validated through the package smoke test:
21
+
22
+ ```bash
23
+ npm run smoke:install -- --mode prebuilt
24
+ npm run smoke:install -- --mode build
25
+ ```
26
+
14
27
  CLI caches update metadata daily. To keep command startup fast, network update checks run during `reallink login` (or explicitly via `reallink self-update --check`) rather than every command.
15
28
 
16
29
  Output defaults to JSON for agent-friendly automation. You can switch to human text with `--format text`.
@@ -25,6 +38,27 @@ reallink self-update
25
38
  reallink whoami
26
39
  reallink logout
27
40
 
41
+ reallink call GET /projects
42
+ reallink call POST /tools/runs --body @run.json
43
+ reallink call GET /projects --access-token <token> --base-url https://api.real-agent.link
44
+
45
+ reallink ops list
46
+ reallink ops search connect
47
+ reallink ops show get_v1_projects_projectId_connect_clients
48
+ reallink ops invoke get_v1_projects_projectId_connect_clients --project-id prj_xxx
49
+ reallink ops invoke post_v1_projects_projectId_connect_ticket --project-id prj_xxx
50
+ reallink ops invoke post_v1_tools_runs --org-id org_xxx --project-id prj_xxx --body @run.json
51
+ reallink ops list --access-token <token> --base-url https://api.real-agent.link
52
+
53
+ reallink call GET /projects/prj_xxx/connect/transports --access-token <token> --base-url https://api.real-agent.link
54
+ reallink call POST /projects/prj_xxx/workspace/read --access-token <token> --base-url https://api.real-agent.link --body '{"path":"README.txt"}'
55
+ reallink call POST /projects/prj_xxx/workspace/write --access-token <token> --base-url https://api.real-agent.link --body '{"path":"Docs/agent-note.txt","content":"hello from agent cli","createParents":true}'
56
+ reallink call POST /projects/prj_xxx/workspace/list --access-token <token> --base-url https://api.real-agent.link --body '{"path":"Docs"}'
57
+
58
+ node ./scripts/cli-connect-workspace-e2e.mjs --project-id prj_xxx
59
+ node ./scripts/pull-connect-workspace-e2e.mjs --project-id prj_xxx
60
+ node ./scripts/connect-transport-matrix-e2e.mjs --project-id prj_xxx --retries 2
61
+
28
62
  reallink org list
29
63
  reallink org create --name "My Org"
30
64
  reallink org get --org-id org_xxx
@@ -89,6 +123,10 @@ reallink link list
89
123
  reallink link use --project-id prj_xxx
90
124
  reallink link doctor --project-id prj_xxx
91
125
  reallink link doctor --project-id prj_xxx --verify-remote
126
+ reallink link source --project-id prj_xxx --path ./game-source --label project
127
+ reallink link connect --project-id prj_xxx
128
+ reallink link connect --project-id prj_xxx --workspace-id dev-mac-main --transport websocket
129
+ reallink link connect --project-id prj_xxx --access-token <token> --base-url https://api.real-agent.link
92
130
  reallink link paths --project-id prj_xxx
93
131
  reallink link open
94
132
  reallink link open --project-id prj_xxx --arg "-game" --arg "-log"
@@ -106,6 +144,7 @@ reallink link plugin install --project-id prj_xxx --name RealLinkUnreal --url ht
106
144
  - By default it requests core/assets/trace/scheduler/admin scopes plus `tools:*`.
107
145
  - If the server rejects `tools:*` as invalid, CLI automatically retries with compatible scopes.
108
146
  - You can always pass explicit scopes via repeated `--scope`.
147
+ - Agent-oriented commands can bypass the saved login session by passing `--access-token <token>` together with `--base-url`.
109
148
 
110
149
  `tool register`, `tool enable/disable` metadata, `tool run --input-file`, and `tool prompt --input-file` accept JSONC.
111
150
  `tool context put --text-file` accepts plain UTF-8 text files and stores scoped context via API gateway.
package/bin/reallink.cjs CHANGED
@@ -35,6 +35,10 @@ function runBinary(binaryPath) {
35
35
  }
36
36
 
37
37
  function resolvePreferredBinary() {
38
+ if (process.env.REALLINK_FORCE_BUILD === "1") {
39
+ return resolveExistingReleaseBinary();
40
+ }
41
+
38
42
  if (fs.existsSync(prebuiltBinaryPath)) {
39
43
  return prebuiltBinaryPath;
40
44
  }
@@ -42,7 +46,8 @@ function resolvePreferredBinary() {
42
46
  }
43
47
 
44
48
  function ensureBinary() {
45
- if (resolvePreferredBinary()) {
49
+ const preferredBinary = resolvePreferredBinary();
50
+ if (preferredBinary && process.env.REALLINK_FORCE_BUILD !== "1") {
46
51
  return true;
47
52
  }
48
53
 
@@ -63,7 +68,7 @@ function ensureBinary() {
63
68
  return false;
64
69
  }
65
70
 
66
- return build.status === 0 && !!resolvePreferredBinary();
71
+ return build.status === 0 && !!resolveExistingReleaseBinary();
67
72
  }
68
73
 
69
74
  if (!ensureBinary()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reallink-cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Rust-based CLI for Reallink auth and API operations",
5
5
  "bin": {
6
6
  "reallink": "bin/reallink.cjs"
@@ -17,11 +17,12 @@
17
17
  ],
18
18
  "scripts": {
19
19
  "contract:codegen": "node ./scripts/generate-contract.mjs",
20
- "prepack": "pnpm run contract:codegen && node ./scripts/prepare-prebuilt.cjs",
20
+ "prepack": "node ./scripts/generate-contract.mjs && node ./scripts/prepare-prebuilt.cjs",
21
21
  "postinstall": "node ./scripts/postinstall.cjs",
22
- "build": "pnpm run contract:codegen && cargo build --manifest-path ./rust/Cargo.toml --release",
22
+ "build": "node ./scripts/generate-contract.mjs && cargo build --manifest-path ./rust/Cargo.toml --release",
23
23
  "dev": "node ./bin/reallink.cjs --help",
24
- "pack:local": "npm pack --json"
24
+ "pack:local": "npm pack --json",
25
+ "smoke:install": "node ./scripts/smoke-install.cjs"
25
26
  },
26
27
  "keywords": [
27
28
  "reallink",
@@ -30,6 +31,15 @@
30
31
  "oauth"
31
32
  ],
32
33
  "license": "MIT",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "git+https://github.com/real-link-tech/ReallinkOS.git",
37
+ "directory": "packages/reallink-cli"
38
+ },
39
+ "bugs": {
40
+ "url": "https://github.com/real-link-tech/ReallinkOS/issues"
41
+ },
42
+ "homepage": "https://github.com/real-link-tech/ReallinkOS/tree/main/packages/reallink-cli",
33
43
  "publishConfig": {
34
44
  "access": "public"
35
45
  }
Binary file
package/rust/Cargo.lock CHANGED
@@ -8,6 +8,15 @@ version = "2.0.1"
8
8
  source = "registry+https://github.com/rust-lang/crates.io-index"
9
9
  checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
10
10
 
11
+ [[package]]
12
+ name = "aho-corasick"
13
+ version = "1.1.4"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
16
+ dependencies = [
17
+ "memchr",
18
+ ]
19
+
11
20
  [[package]]
12
21
  name = "anstream"
13
22
  version = "0.6.21"
@@ -1075,7 +1084,7 @@ dependencies = [
1075
1084
 
1076
1085
  [[package]]
1077
1086
  name = "reallink-cli"
1078
- version = "0.1.15"
1087
+ version = "0.1.17"
1079
1088
  dependencies = [
1080
1089
  "anyhow",
1081
1090
  "clap",
@@ -1083,6 +1092,7 @@ dependencies = [
1083
1092
  "futures-util",
1084
1093
  "hostname",
1085
1094
  "json5",
1095
+ "regex",
1086
1096
  "reqwest",
1087
1097
  "serde",
1088
1098
  "serde_json",
@@ -1106,6 +1116,35 @@ dependencies = [
1106
1116
  "thiserror 1.0.69",
1107
1117
  ]
1108
1118
 
1119
+ [[package]]
1120
+ name = "regex"
1121
+ version = "1.12.3"
1122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1123
+ checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
1124
+ dependencies = [
1125
+ "aho-corasick",
1126
+ "memchr",
1127
+ "regex-automata",
1128
+ "regex-syntax",
1129
+ ]
1130
+
1131
+ [[package]]
1132
+ name = "regex-automata"
1133
+ version = "0.4.14"
1134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1135
+ checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
1136
+ dependencies = [
1137
+ "aho-corasick",
1138
+ "memchr",
1139
+ "regex-syntax",
1140
+ ]
1141
+
1142
+ [[package]]
1143
+ name = "regex-syntax"
1144
+ version = "0.8.10"
1145
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1146
+ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
1147
+
1109
1148
  [[package]]
1110
1149
  name = "reqwest"
1111
1150
  version = "0.12.28"
package/rust/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "reallink-cli"
3
- version = "0.1.15"
3
+ version = "0.1.17"
4
4
  edition = "2021"
5
5
  description = "CLI for Reallink auth and token workflows"
6
6
  license = "MIT"
@@ -14,6 +14,7 @@ reqwest = { version = "0.12", default-features = false, features = ["json", "rus
14
14
  serde = { version = "1.0", features = ["derive"] }
15
15
  serde_json = "1.0"
16
16
  json5 = "0.4"
17
+ regex = "1.11"
17
18
  sha2 = "0.10"
18
19
  tokio = { version = "1.42", features = ["macros", "rt-multi-thread", "time", "fs", "io-util", "signal"] }
19
20
  tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] }