@xuanwo/xurl 0.0.12 → 0.0.13-darwin-x64
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 +25 -18
- package/package.json +10 -16
- package/vendor/x86_64-apple-darwin/xurl/xurl +0 -0
- package/bin/xurl.js +0 -141
package/README.md
CHANGED
|
@@ -12,19 +12,32 @@
|
|
|
12
12
|
- <img src="https://www.anthropic.com/favicon.ico" alt="Claude logo" width="16" height="16" /> Claude
|
|
13
13
|
- <img src="https://www.google.com/favicon.ico" alt="Gemini logo" width="16" height="16" /> Gemini
|
|
14
14
|
- <img src=".github/assets/pi-logo-dark.svg" alt="Pi logo" width="16" height="16" /> Pi
|
|
15
|
-
|
|
15
|
+
- <img src="https://opencode.ai/favicon.ico" alt="OpenCode logo" width="16" height="16" /> OpenCode
|
|
16
16
|
- Unified URI scheme: `agents://<provider>/<thread_path>` is the primary format.
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- `--list` outputs subagent status aggregation for providers that support subagent transcripts.
|
|
17
|
+
- Default output is markdown with YAML frontmatter header plus provider-specific body.
|
|
18
|
+
- `-I, --head` outputs frontmatter only.
|
|
19
|
+
- For Codex/Claude/Pi main URIs, head output includes discovery fields (`subagents` / `entries`) that replace list-mode aggregation.
|
|
21
20
|
- Subagent markdown views print full parent/subagent URIs in `agents://...` format.
|
|
22
21
|
- Non-fatal diagnostics are kept internal; only fatal errors are printed to `stderr`.
|
|
23
22
|
- Automatically respects official environment variables and default local data roots for each supported agent.
|
|
24
23
|
|
|
25
24
|
## Install
|
|
26
25
|
|
|
27
|
-
Install from
|
|
26
|
+
Install from PyPI via `uv`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
uv tool install xuanwo-xurl
|
|
30
|
+
xurl --help
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Or install from PyPI via `pipx`:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pipx install xuanwo-xurl
|
|
37
|
+
xurl --help
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or run directly from npm with `npx`:
|
|
28
41
|
|
|
29
42
|
```bash
|
|
30
43
|
npx @xuanwo/xurl --help
|
|
@@ -65,7 +78,6 @@ scheme provider thread_path (provider-specific: main thread, optional child th
|
|
|
65
78
|
|
|
66
79
|
- Supported URIs:
|
|
67
80
|
- `agents://amp/<thread_id>`
|
|
68
|
-
- legacy: `amp://<thread_id>`
|
|
69
81
|
- Thread id format:
|
|
70
82
|
- `T-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
71
83
|
- Resolution:
|
|
@@ -83,9 +95,8 @@ xurl agents://amp/T-019c0797-c402-7389-bd80-d785c98df295
|
|
|
83
95
|
- `agents://codex/<session_id>`
|
|
84
96
|
- `agents://codex/threads/<session_id>`
|
|
85
97
|
- `agents://codex/<main_session_id>/<agent_id>`
|
|
86
|
-
- legacy: `codex://<session_id>`, `codex://threads/<session_id>`, `codex://<main_session_id>/<agent_id>`
|
|
87
98
|
- Subagent modes:
|
|
88
|
-
- Aggregate: `xurl agents://codex/<main_session_id
|
|
99
|
+
- Aggregate header only: `xurl -I agents://codex/<main_session_id>`
|
|
89
100
|
- Drill-down: `xurl agents://codex/<main_session_id>/<agent_id>`
|
|
90
101
|
- Resolution order:
|
|
91
102
|
- SQLite thread index under `CODEX_HOME` (`state_<version>.sqlite` first, then `state.sqlite`) via `threads(id, rollout_path, archived)`.
|
|
@@ -95,7 +106,7 @@ xurl agents://amp/T-019c0797-c402-7389-bd80-d785c98df295
|
|
|
95
106
|
```bash
|
|
96
107
|
xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
97
108
|
xurl agents://codex/threads/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
98
|
-
xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
109
|
+
xurl -I agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
99
110
|
xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592/019c87fb-38b9-7843-92b1-832f02598495
|
|
100
111
|
```
|
|
101
112
|
|
|
@@ -104,15 +115,14 @@ xurl agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592/019c87fb-38b9-7843-92b1
|
|
|
104
115
|
- Supported URIs:
|
|
105
116
|
- `agents://claude/<session_id>`
|
|
106
117
|
- `agents://claude/<main_session_id>/<agent_id>`
|
|
107
|
-
- legacy: `claude://<session_id>`, `claude://<main_session_id>/<agent_id>`
|
|
108
118
|
- Subagent modes:
|
|
109
|
-
- Aggregate: `xurl agents://claude/<main_session_id
|
|
119
|
+
- Aggregate header only: `xurl -I agents://claude/<main_session_id>`
|
|
110
120
|
- Drill-down: `xurl agents://claude/<main_session_id>/<agent_id>`
|
|
111
121
|
- Example:
|
|
112
122
|
|
|
113
123
|
```bash
|
|
114
124
|
xurl agents://claude/2823d1df-720a-4c31-ac55-ae8ba726721f
|
|
115
|
-
xurl agents://claude/2823d1df-720a-4c31-ac55-ae8ba726721f
|
|
125
|
+
xurl -I agents://claude/2823d1df-720a-4c31-ac55-ae8ba726721f
|
|
116
126
|
xurl agents://claude/2823d1df-720a-4c31-ac55-ae8ba726721f/acompact-69d537
|
|
117
127
|
```
|
|
118
128
|
|
|
@@ -120,7 +130,6 @@ xurl agents://claude/2823d1df-720a-4c31-ac55-ae8ba726721f/acompact-69d537
|
|
|
120
130
|
|
|
121
131
|
- Supported URIs:
|
|
122
132
|
- `agents://opencode/<session_id>`
|
|
123
|
-
- legacy: `opencode://<session_id>`
|
|
124
133
|
- Example:
|
|
125
134
|
|
|
126
135
|
```bash
|
|
@@ -131,7 +140,6 @@ xurl agents://opencode/ses_43a90e3adffejRgrTdlJa48CtE
|
|
|
131
140
|
|
|
132
141
|
- Supported URI:
|
|
133
142
|
- `agents://gemini/<session_id>`
|
|
134
|
-
- legacy: `gemini://<session_id>`
|
|
135
143
|
- Session id format:
|
|
136
144
|
- `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
137
145
|
- Resolution:
|
|
@@ -148,7 +156,6 @@ xurl agents://gemini/29d207db-ca7e-40ba-87f7-e14c9de60613
|
|
|
148
156
|
- Supported URIs:
|
|
149
157
|
- `agents://pi/<session_id>`
|
|
150
158
|
- `agents://pi/<session_id>/<entry_id>`
|
|
151
|
-
- legacy: `pi://<session_id>`, `pi://<session_id>/<entry_id>`
|
|
152
159
|
- Session id format:
|
|
153
160
|
- `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
|
|
154
161
|
- Resolution:
|
|
@@ -157,11 +164,11 @@ xurl agents://gemini/29d207db-ca7e-40ba-87f7-e14c9de60613
|
|
|
157
164
|
- Rendering:
|
|
158
165
|
- `agents://pi/<session_id>` renders the latest leaf branch in the session tree.
|
|
159
166
|
- `agents://pi/<session_id>/<entry_id>` renders the branch ending at the specified entry id.
|
|
160
|
-
- `agents://pi/<session_id
|
|
167
|
+
- `xurl -I agents://pi/<session_id>` outputs `entries` in frontmatter for drill-down discovery.
|
|
161
168
|
- Example:
|
|
162
169
|
|
|
163
170
|
```bash
|
|
164
171
|
xurl agents://pi/12cb4c19-2774-4de4-a0d0-9fa32fbae29f
|
|
165
172
|
xurl agents://pi/12cb4c19-2774-4de4-a0d0-9fa32fbae29f/d1b2c3d4
|
|
166
|
-
xurl agents://pi/12cb4c19-2774-4de4-a0d0-9fa32fbae29f
|
|
173
|
+
xurl -I agents://pi/12cb4c19-2774-4de4-a0d0-9fa32fbae29f
|
|
167
174
|
```
|
package/package.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xuanwo/xurl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13-darwin-x64",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
5
|
+
"os": [
|
|
6
|
+
"darwin"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
12
11
|
"files": [
|
|
13
|
-
"
|
|
12
|
+
"vendor"
|
|
14
13
|
],
|
|
15
14
|
"repository": {
|
|
16
15
|
"type": "git",
|
|
17
16
|
"url": "git+https://github.com/Xuanwo/xurl.git"
|
|
18
17
|
},
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"@xuanwo/xurl-linux-arm64": "npm:@xuanwo/xurl@0.0.12-linux-arm64",
|
|
22
|
-
"@xuanwo/xurl-darwin-x64": "npm:@xuanwo/xurl@0.0.12-darwin-x64",
|
|
23
|
-
"@xuanwo/xurl-darwin-arm64": "npm:@xuanwo/xurl@0.0.12-darwin-arm64",
|
|
24
|
-
"@xuanwo/xurl-win32-x64": "npm:@xuanwo/xurl@0.0.12-win32-x64",
|
|
25
|
-
"@xuanwo/xurl-win32-arm64": "npm:@xuanwo/xurl@0.0.12-win32-arm64"
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=16"
|
|
26
20
|
}
|
|
27
21
|
}
|
|
Binary file
|
package/bin/xurl.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Unified entry point for the xurl CLI.
|
|
3
|
-
|
|
4
|
-
import { spawn } from "node:child_process";
|
|
5
|
-
import { existsSync } from "node:fs";
|
|
6
|
-
import { createRequire } from "node:module";
|
|
7
|
-
import path from "node:path";
|
|
8
|
-
import { fileURLToPath } from "node:url";
|
|
9
|
-
|
|
10
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = path.dirname(__filename);
|
|
12
|
-
const require = createRequire(import.meta.url);
|
|
13
|
-
|
|
14
|
-
const PLATFORM_PACKAGE_BY_TARGET = {
|
|
15
|
-
"x86_64-unknown-linux-gnu": "@xuanwo/xurl-linux-x64",
|
|
16
|
-
"aarch64-unknown-linux-gnu": "@xuanwo/xurl-linux-arm64",
|
|
17
|
-
"x86_64-apple-darwin": "@xuanwo/xurl-darwin-x64",
|
|
18
|
-
"aarch64-apple-darwin": "@xuanwo/xurl-darwin-arm64",
|
|
19
|
-
"x86_64-pc-windows-msvc": "@xuanwo/xurl-win32-x64",
|
|
20
|
-
"aarch64-pc-windows-msvc": "@xuanwo/xurl-win32-arm64",
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
function detectTargetTriple(platformName, archName) {
|
|
24
|
-
switch (platformName) {
|
|
25
|
-
case "linux":
|
|
26
|
-
if (archName === "x64") {
|
|
27
|
-
return "x86_64-unknown-linux-gnu";
|
|
28
|
-
}
|
|
29
|
-
if (archName === "arm64") {
|
|
30
|
-
return "aarch64-unknown-linux-gnu";
|
|
31
|
-
}
|
|
32
|
-
break;
|
|
33
|
-
case "darwin":
|
|
34
|
-
if (archName === "x64") {
|
|
35
|
-
return "x86_64-apple-darwin";
|
|
36
|
-
}
|
|
37
|
-
if (archName === "arm64") {
|
|
38
|
-
return "aarch64-apple-darwin";
|
|
39
|
-
}
|
|
40
|
-
break;
|
|
41
|
-
case "win32":
|
|
42
|
-
if (archName === "x64") {
|
|
43
|
-
return "x86_64-pc-windows-msvc";
|
|
44
|
-
}
|
|
45
|
-
if (archName === "arm64") {
|
|
46
|
-
return "aarch64-pc-windows-msvc";
|
|
47
|
-
}
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function detectPackageManager() {
|
|
56
|
-
const userAgent = process.env.npm_config_user_agent || "";
|
|
57
|
-
if (/\bbun\//.test(userAgent)) {
|
|
58
|
-
return "bun";
|
|
59
|
-
}
|
|
60
|
-
return userAgent ? "npm" : null;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const targetTriple = detectTargetTriple(process.platform, process.arch);
|
|
64
|
-
if (!targetTriple) {
|
|
65
|
-
throw new Error(`Unsupported platform: ${process.platform} (${process.arch})`);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const platformPackage = PLATFORM_PACKAGE_BY_TARGET[targetTriple];
|
|
69
|
-
if (!platformPackage) {
|
|
70
|
-
throw new Error(`Unsupported target triple: ${targetTriple}`);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const binaryName = process.platform === "win32" ? "xurl.exe" : "xurl";
|
|
74
|
-
const localVendorRoot = path.join(__dirname, "..", "vendor");
|
|
75
|
-
const localBinaryPath = path.join(localVendorRoot, targetTriple, "xurl", binaryName);
|
|
76
|
-
|
|
77
|
-
let vendorRoot;
|
|
78
|
-
try {
|
|
79
|
-
const packageJsonPath = require.resolve(`${platformPackage}/package.json`);
|
|
80
|
-
vendorRoot = path.join(path.dirname(packageJsonPath), "vendor");
|
|
81
|
-
} catch {
|
|
82
|
-
if (existsSync(localBinaryPath)) {
|
|
83
|
-
vendorRoot = localVendorRoot;
|
|
84
|
-
} else {
|
|
85
|
-
const manager = detectPackageManager();
|
|
86
|
-
const updateCommand =
|
|
87
|
-
manager === "bun"
|
|
88
|
-
? "bun install -g @xuanwo/xurl@latest"
|
|
89
|
-
: "npm install -g @xuanwo/xurl@latest";
|
|
90
|
-
throw new Error(
|
|
91
|
-
`Missing optional dependency ${platformPackage}. Reinstall xurl: ${updateCommand}`,
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const binaryPath = path.join(vendorRoot, targetTriple, "xurl", binaryName);
|
|
97
|
-
const env = { ...process.env };
|
|
98
|
-
env[detectPackageManager() === "bun" ? "XURL_MANAGED_BY_BUN" : "XURL_MANAGED_BY_NPM"] =
|
|
99
|
-
"1";
|
|
100
|
-
|
|
101
|
-
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
102
|
-
stdio: "inherit",
|
|
103
|
-
env,
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
child.on("error", (err) => {
|
|
107
|
-
// eslint-disable-next-line no-console
|
|
108
|
-
console.error(err);
|
|
109
|
-
process.exit(1);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
const forwardSignal = (signal) => {
|
|
113
|
-
if (child.killed) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
try {
|
|
117
|
-
child.kill(signal);
|
|
118
|
-
} catch {
|
|
119
|
-
// Ignore errors when the child already exited.
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
["SIGINT", "SIGTERM", "SIGHUP"].forEach((signal) => {
|
|
124
|
-
process.on(signal, () => forwardSignal(signal));
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
const childResult = await new Promise((resolve) => {
|
|
128
|
-
child.on("exit", (code, signal) => {
|
|
129
|
-
if (signal) {
|
|
130
|
-
resolve({ type: "signal", signal });
|
|
131
|
-
} else {
|
|
132
|
-
resolve({ type: "code", exitCode: code ?? 1 });
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
if (childResult.type === "signal") {
|
|
138
|
-
process.kill(process.pid, childResult.signal);
|
|
139
|
-
} else {
|
|
140
|
-
process.exit(childResult.exitCode);
|
|
141
|
-
}
|