@agent-ix/quire-cli 0.7.5

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Agent IX
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @agent-ix/quire-cli
2
+
3
+ Prebuilt distribution of [`quire`](https://github.com/agent-ix/quire-cli), a
4
+ static CLI over [`quire-rs`](https://github.com/agent-ix/quire-rs) for parsing,
5
+ extracting, looking up, editing, validating, and inspecting Markdown artifacts.
6
+
7
+ This npm package is a thin launcher. The actual binary ships in a per-platform
8
+ optional dependency (`@agent-ix/quire-cli-<os>-<arch>`); npm installs only the
9
+ one matching your machine. No source build and no `quire-rs` checkout is
10
+ required.
11
+
12
+ ## Install
13
+
14
+ This package is published to **GitHub Packages**, so point the `@agent-ix` scope
15
+ at that registry. In `.npmrc`:
16
+
17
+ ```
18
+ @agent-ix:registry=https://npm.pkg.github.com
19
+ //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
20
+ ```
21
+
22
+ Then:
23
+
24
+ ```bash
25
+ npm install -g @agent-ix/quire-cli
26
+ quire --help
27
+ ```
28
+
29
+ Or run without installing:
30
+
31
+ ```bash
32
+ npx @agent-ix/quire-cli parse README.md
33
+ ```
34
+
35
+ ## Supported platforms
36
+
37
+ | os / arch | Rust target |
38
+ |-----------------|---------------------------------|
39
+ | linux-x64 | `x86_64-unknown-linux-musl` |
40
+ | linux-arm64 | `aarch64-unknown-linux-musl` |
41
+ | darwin-arm64 | `aarch64-apple-darwin` |
42
+ | win32-x64 | `x86_64-pc-windows-msvc` |
43
+
44
+ Linux x64 covers both Intel and AMD servers; win32-x64 covers both Intel and AMD
45
+ Windows machines. macOS support targets Apple Silicon. The Linux binaries are
46
+ statically linked against musl.
47
+
48
+ See the [main repository](https://github.com/agent-ix/quire-cli) for command
49
+ documentation.
package/bin/quire.js ADDED
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // Thin launcher: resolve the prebuilt `quire` binary that matches this
5
+ // platform/arch (shipped as an optional dependency) and exec it transparently,
6
+ // forwarding argv, stdio, and the exit status / terminating signal.
7
+
8
+ const { spawnSync } = require("node:child_process");
9
+ const fs = require("node:fs");
10
+
11
+ const PLATFORM = process.platform; // 'linux' | 'darwin' | 'win32' | ...
12
+ const ARCH = process.arch; // 'x64' | 'arm64' | ...
13
+ const SUPPORTED = [
14
+ "linux-x64",
15
+ "linux-arm64",
16
+ "darwin-arm64",
17
+ "win32-x64",
18
+ ];
19
+
20
+ function resolveBinary() {
21
+ const key = `${PLATFORM}-${ARCH}`;
22
+ if (!SUPPORTED.includes(key)) {
23
+ throw new Error(
24
+ `quire-cli: unsupported platform "${key}".\n` +
25
+ `Prebuilt binaries exist for: ${SUPPORTED.join(", ")}.\n` +
26
+ `Build from source instead: https://github.com/agent-ix/quire-cli`
27
+ );
28
+ }
29
+ const pkg = `@agent-ix/quire-cli-${key}`;
30
+ const binName = PLATFORM === "win32" ? "quire.exe" : "quire";
31
+ try {
32
+ return require.resolve(`${pkg}/bin/${binName}`);
33
+ } catch (_) {
34
+ throw new Error(
35
+ `quire-cli: the prebuilt binary package "${pkg}" is not installed.\n` +
36
+ `It is an optional dependency — reinstall without --no-optional, or\n` +
37
+ `add "${pkg}" explicitly. (--ignore-optional / CPU-VM mismatches skip it.)`
38
+ );
39
+ }
40
+ }
41
+
42
+ let bin;
43
+ try {
44
+ bin = resolveBinary();
45
+ } catch (err) {
46
+ process.stderr.write(String(err.message) + "\n");
47
+ process.exit(1);
48
+ }
49
+
50
+ // npm does not always preserve the executable bit through publish/install;
51
+ // best-effort restore it on POSIX before exec.
52
+ if (PLATFORM !== "win32") {
53
+ try {
54
+ fs.chmodSync(bin, 0o755);
55
+ } catch (_) {
56
+ /* non-fatal: the file may already be executable or read-only */
57
+ }
58
+ }
59
+
60
+ const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
61
+
62
+ if (result.error) {
63
+ process.stderr.write(`quire-cli: failed to launch binary: ${result.error.message}\n`);
64
+ process.exit(1);
65
+ }
66
+ if (result.signal) {
67
+ // Re-raise the child's terminating signal so callers observe the same
68
+ // signal-driven exit (e.g. SIGABRT -> 134 on a panic, per FR-007).
69
+ process.kill(process.pid, result.signal);
70
+ }
71
+ process.exit(result.status === null ? 1 : result.status);
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@agent-ix/quire-cli",
3
+ "version": "0.7.5",
4
+ "description": "Static CLI over quire-rs (parse, extract, lookup, edit, validate, schema, lint) for Markdown artifacts.",
5
+ "keywords": [
6
+ "quire",
7
+ "cli",
8
+ "markdown",
9
+ "spec",
10
+ "filament",
11
+ "agent-ix"
12
+ ],
13
+ "homepage": "https://github.com/agent-ix/quire-cli#readme",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/agent-ix/quire-cli.git"
17
+ },
18
+ "license": "MIT",
19
+ "author": "Agent IX <kreneskyp@gmail.com>",
20
+ "type": "commonjs",
21
+ "bin": {
22
+ "quire": "bin/quire.js"
23
+ },
24
+ "files": [
25
+ "bin/",
26
+ "LICENSE"
27
+ ],
28
+ "engines": {
29
+ "node": ">=16"
30
+ },
31
+ "optionalDependencies": {
32
+ "@agent-ix/quire-cli-linux-x64": "0.7.5",
33
+ "@agent-ix/quire-cli-linux-arm64": "0.7.5",
34
+ "@agent-ix/quire-cli-darwin-arm64": "0.7.5",
35
+ "@agent-ix/quire-cli-win32-x64": "0.7.5"
36
+ },
37
+ "publishConfig": {
38
+ "registry": "https://registry.npmjs.org/",
39
+ "access": "public"
40
+ }
41
+ }