@xuanwo/xurl 0.0.23 → 0.0.24-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 +35 -2
- 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
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
- Read an agent conversation as markdown.
|
|
10
10
|
- Query recent threads and keyword matches for a provider.
|
|
11
|
+
- Query conversations by local path across providers.
|
|
11
12
|
- Query role-scoped threads with `agents://<provider>/<role>`.
|
|
12
13
|
- Discover subagent/branch navigation targets.
|
|
13
14
|
- Start a new conversation with agents.
|
|
@@ -59,6 +60,15 @@ xurl codex
|
|
|
59
60
|
xurl 'codex?q=spawn_agent'
|
|
60
61
|
```
|
|
61
62
|
|
|
63
|
+
Query conversations by path:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
xurl agents:///Users/alice/work/xurl
|
|
67
|
+
xurl 'agents:///Users/alice/work/xurl?q=refactor&limit=5'
|
|
68
|
+
xurl 'agents://.?q=refactor&providers=codex,claude'
|
|
69
|
+
xurl 'agents://~/work/xurl?providers=opencode'
|
|
70
|
+
```
|
|
71
|
+
|
|
62
72
|
Query role-scoped threads:
|
|
63
73
|
|
|
64
74
|
```bash
|
|
@@ -67,13 +77,15 @@ xurl agents://codex/reviewer
|
|
|
67
77
|
xurl codex/reviewer
|
|
68
78
|
```
|
|
69
79
|
|
|
80
|
+
Query results include the same reduced thread metadata used by `--head` when it is available, so you can inspect fields like `payload.git.branch` without opening each thread individually.
|
|
81
|
+
|
|
70
82
|
Discover child targets:
|
|
71
83
|
|
|
72
84
|
```bash
|
|
73
85
|
xurl -I agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
74
86
|
```
|
|
75
87
|
|
|
76
|
-
Frontmatter includes provider metadata flattened into readable key-value lines such as `payload.git.branch = ...`,
|
|
88
|
+
Frontmatter includes the first provider metadata record flattened into readable key-value lines such as `payload.git.branch = ...`, and skips oversized instruction-like fields.
|
|
77
89
|
|
|
78
90
|
Drill down into a discovered child target:
|
|
79
91
|
|
|
@@ -119,7 +131,7 @@ xurl -o /tmp/conversation.md agents://codex/019c871c-b1f9-7f60-9c4f-87ed09f13592
|
|
|
119
131
|
xurl [OPTIONS] <URI>
|
|
120
132
|
```
|
|
121
133
|
|
|
122
|
-
- `-I, --head`: output frontmatter/discovery info only, including provider metadata flattened into key-value lines when available.
|
|
134
|
+
- `-I, --head`: output frontmatter/discovery info only, including the first provider metadata record flattened into key-value lines when available.
|
|
123
135
|
- `-d, --data <DATA>`: write payload (repeatable).
|
|
124
136
|
- text: `-d "hello"`
|
|
125
137
|
- file: `-d @prompt.txt`
|
|
@@ -143,10 +155,29 @@ xurl [OPTIONS] <URI>
|
|
|
143
155
|
- `child_id`: child/subagent identifier under a main conversation.
|
|
144
156
|
- `query`: optional key-value parameters, interpreted by context.
|
|
145
157
|
|
|
158
|
+
### Path-Scoped Query URI
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
agents:///abs/path[?<query>]
|
|
162
|
+
agents://.[?<query>]
|
|
163
|
+
agents://./subdir[?<query>]
|
|
164
|
+
agents://..[?<query>]
|
|
165
|
+
agents://../repo[?<query>]
|
|
166
|
+
agents://~[?<query>]
|
|
167
|
+
agents://~/repo[?<query>]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
- `agents:///abs/path`: canonical local path query form.
|
|
171
|
+
- `agents://.` / `agents://./subdir`: query relative to the current working directory.
|
|
172
|
+
- `agents://..` / `agents://../repo`: query relative to the parent of the current working directory.
|
|
173
|
+
- `agents://~` / `agents://~/repo`: query relative to the home directory.
|
|
174
|
+
- path-scoped query always returns a conversation list.
|
|
175
|
+
|
|
146
176
|
### Agents Query
|
|
147
177
|
|
|
148
178
|
- `q=<keyword>`: filters discovery results by keyword. Use when you want to find conversations by topic.
|
|
149
179
|
- `limit=<n>`: limits discovery result count (default `10`). Use when you need a shorter or longer result list.
|
|
180
|
+
- `providers=<name[,name...]>`: restricts a path-scoped query to selected providers.
|
|
150
181
|
- `<key>=<value>`: in write mode (`-d`), `xurl` forwards as `--<key> <value>` to the provider CLI.
|
|
151
182
|
- `<flag>`: in write mode (`-d`), `xurl` forwards as `--<flag>` to the provider CLI.
|
|
152
183
|
|
|
@@ -154,6 +185,8 @@ Examples:
|
|
|
154
185
|
|
|
155
186
|
```text
|
|
156
187
|
agents://codex?q=spawn_agent&limit=10
|
|
188
|
+
agents:///Users/alice/work/xurl?q=refactor&providers=codex,claude
|
|
189
|
+
agents://.?q=refactor&providers=codex
|
|
157
190
|
agents://codex/threads/<conversation_id>
|
|
158
191
|
agents://codex/reviewer
|
|
159
192
|
agents://codex?cd=%2FUsers%2Falice%2Frepo&add-dir=%2FUsers%2Falice%2Fshared
|
package/package.json
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xuanwo/xurl",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.24-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.23-linux-arm64",
|
|
22
|
-
"@xuanwo/xurl-darwin-x64": "npm:@xuanwo/xurl@0.0.23-darwin-x64",
|
|
23
|
-
"@xuanwo/xurl-darwin-arm64": "npm:@xuanwo/xurl@0.0.23-darwin-arm64",
|
|
24
|
-
"@xuanwo/xurl-win32-x64": "npm:@xuanwo/xurl@0.0.23-win32-x64",
|
|
25
|
-
"@xuanwo/xurl-win32-arm64": "npm:@xuanwo/xurl@0.0.23-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
|
-
}
|