@openagile/avc 0.0.1 → 1.0.0-beta.2

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,143 @@
1
+ OpenAgile.AI End-User License Agreement
2
+ Version 1.0 — Effective 2026-05-12
3
+
4
+ Canonical text: https://openagile.ai/eula/
5
+
6
+ This End-User License Agreement ("Agreement") is a legal contract between
7
+ you ("Licensee") and BWS Inc., a Delaware corporation ("Licensor"), for
8
+ the OpenAgile.AI command-line tool, related software, and accompanying
9
+ documentation (collectively, the "Software"). By installing, copying, or
10
+ using the Software, you agree to be bound by this Agreement. If you do
11
+ not agree, do not install or use the Software.
12
+
13
+ 1. Definitions
14
+
15
+ 1.1 "Individual Use" means use by a single natural person for
16
+ personal, educational, evaluation, research, or hobby purposes, not
17
+ in the course of employment and not in connection with any
18
+ revenue-generating activity.
19
+
20
+ 1.2 "Commercial Use" means any use of the Software (a) by, on behalf
21
+ of, or for the benefit of any company, partnership, government
22
+ agency, or other legal entity; (b) in connection with any product,
23
+ service, or activity that generates revenue; (c) by an employee,
24
+ contractor, or agent in the course of their work; or (d) in any
25
+ production environment operated by an entity other than a natural
26
+ person acting in an individual capacity.
27
+
28
+ 1.3 "Software" includes the OpenAgile.AI CLI, generated artifacts of
29
+ the CLI, related documentation, and any updates Licensor provides.
30
+
31
+ 2. Grant of License (Individual Use)
32
+
33
+ Subject to Licensee's compliance with this Agreement, Licensor grants
34
+ Licensee a personal, limited, non-exclusive, non-transferable,
35
+ non-sublicensable, revocable license to install and use the Software
36
+ for Individual Use, free of charge.
37
+
38
+ 3. Commercial Use Requires Separate License
39
+
40
+ Commercial Use is not licensed under this Agreement. Any Commercial
41
+ Use requires a separate written commercial license agreement with
42
+ Licensor and payment of applicable fees. Contact info@bws.ninja for
43
+ commercial terms.
44
+
45
+ 4. Restrictions
46
+
47
+ Licensee shall not, and shall not permit any third party to:
48
+
49
+ (a) copy, modify, adapt, translate, or create derivative works of the
50
+ Software;
51
+
52
+ (b) reverse engineer, decompile, disassemble, or attempt to derive
53
+ the source code or underlying ideas of the Software, except to the
54
+ extent such activity is expressly permitted by applicable law and
55
+ cannot be contractually waived;
56
+
57
+ (c) sell, rent, lease, sublicense, distribute, redistribute, host,
58
+ publicly perform, publicly display, or otherwise transfer the
59
+ Software or any rights granted hereunder, in whole or in part;
60
+
61
+ (d) remove, alter, or obscure any copyright, trademark, or other
62
+ proprietary notice on or in the Software;
63
+
64
+ (e) use the Software to develop, train, or evaluate a product or
65
+ service that competes with the Software;
66
+
67
+ (f) use the Software in any manner not expressly permitted by this
68
+ Agreement.
69
+
70
+ 5. Ownership
71
+
72
+ The Software is licensed, not sold. Licensor retains all right,
73
+ title, and interest in and to the Software, including all
74
+ intellectual property rights. No rights are granted to Licensee other
75
+ than those expressly set forth in this Agreement.
76
+
77
+ 6. Updates
78
+
79
+ Licensor may, in its discretion, provide updates or new versions of
80
+ the Software. Updates are governed by this Agreement unless
81
+ accompanied by separate terms.
82
+
83
+ 7. No Telemetry
84
+
85
+ The Software does not transmit usage telemetry, analytics, or any
86
+ data about Licensee's projects, prompts, or generated artifacts to
87
+ Licensor. The Software runs entirely on Licensee's machine and
88
+ communicates only with third-party services (e.g., LLM providers)
89
+ that Licensee configures directly.
90
+
91
+ 8. Termination
92
+
93
+ 8.1 This Agreement is effective upon installation and continues
94
+ until terminated.
95
+
96
+ 8.2 Licensee's rights under this Agreement terminate automatically
97
+ and without notice upon any breach by Licensee. Licensor may also
98
+ terminate this Agreement at any time, for any reason, on notice.
99
+
100
+ 8.3 Upon termination, Licensee shall immediately cease all use of
101
+ the Software and destroy all copies in Licensee's possession or
102
+ control. Sections 4, 5, 9, 10, 11, and 12 survive termination.
103
+
104
+ 9. Disclaimer of Warranties
105
+
106
+ The Software is provided "AS IS" and "AS AVAILABLE," without warranty
107
+ of any kind. To the maximum extent permitted by law, Licensor
108
+ disclaims all warranties, express, implied, or statutory, including
109
+ warranties of merchantability, fitness for a particular purpose, and
110
+ non-infringement.
111
+
112
+ 10. Limitation of Liability
113
+
114
+ To the maximum extent permitted by law, Licensor shall not be liable
115
+ for any indirect, incidental, special, consequential, or punitive
116
+ damages, or for any loss of profits, revenue, data, or use, arising
117
+ out of or relating to this Agreement or the Software, whether in
118
+ contract, tort, or any other legal theory. Licensor's total
119
+ cumulative liability under this Agreement shall not exceed USD 50.
120
+
121
+ 11. Governing Law and Venue
122
+
123
+ This Agreement is governed by the laws of the State of Delaware,
124
+ United States of America, without regard to its conflict-of-laws
125
+ rules. The parties consent to the exclusive jurisdiction of the
126
+ state and federal courts located in Delaware for any dispute arising
127
+ out of or relating to this Agreement.
128
+
129
+ 12. Miscellaneous
130
+
131
+ 12.1 If any provision of this Agreement is held unenforceable, the
132
+ remaining provisions shall continue in full force.
133
+
134
+ 12.2 This Agreement is the entire agreement between the parties
135
+ regarding the Software and supersedes all prior or contemporaneous
136
+ communications.
137
+
138
+ 12.3 Licensor may update this Agreement from time to time. Continued
139
+ use of the Software after such updates constitutes acceptance.
140
+
141
+ Contact
142
+ BWS Inc.
143
+ info@bws.ninja
package/README.md CHANGED
@@ -1,7 +1,12 @@
1
1
  # @openagile/avc
2
2
 
3
- This package name is reserved for the Open Agile CLI.
3
+ Open Agile (AVC) CLI — installs the native binary for your platform.
4
4
 
5
- The real release lives at [@agile-vibe-coding/avc](https://www.npmjs.com/package/@agile-vibe-coding/avc) and will be migrated here. Track progress at https://github.com/NachoColl/agilevibecoding.
5
+ ## Install
6
6
 
7
- This 0.0.1 publish is a placeholder so the package can be configured for GitHub Actions Trusted Publisher (OIDC). Do not install it.
7
+ ```
8
+ npm install -g @openagile/avc
9
+ from there: `avc` to launch the REPL
10
+ ```
11
+
12
+ See https://github.com/blockchain-web-services/openagile-cli for documentation.
package/bin/avc.exe ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+ // Stub binary — replaced by postinstall (install.cjs) with the platform-
3
+ // specific native binary. Falls back to cli-wrapper.cjs if postinstall
4
+ // hasn't run or didn't place the binary.
5
+ require('../cli-wrapper.cjs');
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Fallback wrapper for @openagile/avc. Used when the postinstall hardlink
4
+ // failed (rare — occurs with --omit=optional or sandboxed installs). At
5
+ // runtime, re-resolves the matching native package and exec's the binary
6
+ // directly. Also handles the case where bin/avc.exe is still the 500-byte
7
+ // placeholder.
8
+
9
+ const { spawn, spawnSync } = require('child_process');
10
+ const path = require('path');
11
+ const { arch } = require('os');
12
+
13
+ const PACKAGE_PREFIX = '@openagile/avc';
14
+ const BINARY_NAME = 'avc';
15
+
16
+ const PLATFORMS = {
17
+ 'darwin-arm64': { pkg: PACKAGE_PREFIX + '-darwin-arm64', bin: BINARY_NAME },
18
+ 'darwin-x64': { pkg: PACKAGE_PREFIX + '-darwin-x64', bin: BINARY_NAME },
19
+ 'linux-x64': { pkg: PACKAGE_PREFIX + '-linux-x64', bin: BINARY_NAME },
20
+ 'linux-arm64': { pkg: PACKAGE_PREFIX + '-linux-arm64', bin: BINARY_NAME },
21
+ 'linux-x64-musl': { pkg: PACKAGE_PREFIX + '-linux-x64-musl', bin: BINARY_NAME },
22
+ 'linux-arm64-musl': { pkg: PACKAGE_PREFIX + '-linux-arm64-musl', bin: BINARY_NAME },
23
+ 'win32-x64': { pkg: PACKAGE_PREFIX + '-win32-x64', bin: BINARY_NAME + '.exe' },
24
+ };
25
+
26
+ function detectMusl() {
27
+ if (process.platform !== 'linux') return false;
28
+ const report = typeof process.report?.getReport === 'function'
29
+ ? process.report.getReport()
30
+ : null;
31
+ return report != null && report.header?.glibcVersionRuntime === undefined;
32
+ }
33
+
34
+ function getPlatformKey() {
35
+ const platform = process.platform;
36
+ let cpu = arch();
37
+ if (platform === 'linux') return 'linux-' + cpu + (detectMusl() ? '-musl' : '');
38
+ if (platform === 'darwin' && cpu === 'x64') {
39
+ const r = spawnSync('sysctl', ['-n', 'sysctl.proc_translated'], { encoding: 'utf8' });
40
+ if (r.stdout?.trim() === '1') cpu = 'arm64';
41
+ }
42
+ return platform + '-' + cpu;
43
+ }
44
+
45
+ const platformKey = getPlatformKey();
46
+ const info = PLATFORMS[platformKey];
47
+ if (!info) {
48
+ console.error(`[avc] Unsupported platform: ${process.platform} ${arch()}`);
49
+ console.error(` Supported: ${Object.keys(PLATFORMS).join(', ')}`);
50
+ process.exit(1);
51
+ }
52
+
53
+ let binPath;
54
+ try {
55
+ const pkgDir = path.dirname(require.resolve(info.pkg + '/package.json'));
56
+ binPath = path.join(pkgDir, info.bin);
57
+ } catch {
58
+ console.error(`[avc] Native package "${info.pkg}" not installed.`);
59
+ console.error(' Try reinstalling without --omit=optional:');
60
+ console.error(` npm install -g ${require('./package.json').name}`);
61
+ process.exit(1);
62
+ }
63
+
64
+ const child = spawn(binPath, process.argv.slice(2), {
65
+ stdio: 'inherit',
66
+ windowsHide: true,
67
+ });
68
+ child.on('exit', (code, signal) => {
69
+ if (signal) process.kill(process.pid, signal);
70
+ else process.exit(code ?? 0);
71
+ });
72
+ child.on('error', (err) => {
73
+ console.error(`[avc] Failed to exec native binary: ${err.message}`);
74
+ process.exit(1);
75
+ });
package/install.cjs ADDED
@@ -0,0 +1,162 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Postinstall for @openagile/avc.
4
+ //
5
+ // Detects the platform, finds the matching native binary inside the
6
+ // platform-specific optionalDependency package that npm just installed,
7
+ // and hardlinks it over the bin/avc.exe stub. Adapted from Claude Code's
8
+ // install.cjs (same pattern Bun, esbuild, swc, biome use).
9
+ //
10
+ // If the matching native package is missing (--omit=optional, network
11
+ // failure during install, unsupported platform), prints diagnostics and
12
+ // leaves the stub in place. cli-wrapper.cjs is a fallback that re-resolves
13
+ // at runtime via require.resolve + spawn.
14
+
15
+ const { spawnSync } = require('child_process');
16
+ const { copyFileSync, linkSync, unlinkSync, chmodSync, readFileSync, writeFileSync, statSync, existsSync } = require('fs');
17
+ const { arch } = require('os');
18
+ const path = require('path');
19
+
20
+ const PACKAGE_PREFIX = '@openagile/avc';
21
+ const BINARY_NAME = 'avc';
22
+ const WRAPPER_NAME = require('./package.json').name;
23
+
24
+ const PLATFORMS = {
25
+ 'darwin-arm64': { pkg: PACKAGE_PREFIX + '-darwin-arm64', bin: BINARY_NAME },
26
+ 'darwin-x64': { pkg: PACKAGE_PREFIX + '-darwin-x64', bin: BINARY_NAME },
27
+ 'linux-x64': { pkg: PACKAGE_PREFIX + '-linux-x64', bin: BINARY_NAME },
28
+ 'linux-arm64': { pkg: PACKAGE_PREFIX + '-linux-arm64', bin: BINARY_NAME },
29
+ 'linux-x64-musl': { pkg: PACKAGE_PREFIX + '-linux-x64-musl', bin: BINARY_NAME },
30
+ 'linux-arm64-musl': { pkg: PACKAGE_PREFIX + '-linux-arm64-musl', bin: BINARY_NAME },
31
+ 'win32-x64': { pkg: PACKAGE_PREFIX + '-win32-x64', bin: BINARY_NAME + '.exe' },
32
+ };
33
+
34
+ function detectMusl() {
35
+ if (process.platform !== 'linux') return false;
36
+ // process.report.getReport().header.glibcVersionRuntime is undefined on
37
+ // musl libc (Alpine, distroless). Faster than spawning ldd and avoids
38
+ // false positives when ldd isn't on PATH.
39
+ const report = typeof process.report?.getReport === 'function'
40
+ ? process.report.getReport()
41
+ : null;
42
+ return report != null && report.header?.glibcVersionRuntime === undefined;
43
+ }
44
+
45
+ function getPlatformKey() {
46
+ const platform = process.platform;
47
+ let cpu = arch();
48
+ if (platform === 'linux') {
49
+ return 'linux-' + cpu + (detectMusl() ? '-musl' : '');
50
+ }
51
+ // Rosetta 2: x64 Node on Apple Silicon reports arch()==='x64'. Prefer the
52
+ // native arm64 binary — the x64 Bun build needs AVX, which Rosetta doesn't
53
+ // emulate.
54
+ if (platform === 'darwin' && cpu === 'x64') {
55
+ const r = spawnSync('sysctl', ['-n', 'sysctl.proc_translated'], { encoding: 'utf8' });
56
+ if (r.stdout?.trim() === '1') cpu = 'arm64';
57
+ }
58
+ return platform + '-' + cpu;
59
+ }
60
+
61
+ function placeBinary(src, dest) {
62
+ // Try hardlink first — instant, zero extra disk for a ~100MB binary;
63
+ // src and dest are both under node_modules/ so same-filesystem is
64
+ // typical. We attempt the link BEFORE touching dest so a missing src
65
+ // (partial extraction) leaves the stub untouched.
66
+ try {
67
+ linkSync(src, dest);
68
+ } catch (err) {
69
+ if (err.code === 'EEXIST') {
70
+ const stub = statSync(dest).size < 4096 ? readFileSync(dest) : null;
71
+ unlinkSync(dest);
72
+ try {
73
+ linkSync(src, dest);
74
+ } catch {
75
+ try {
76
+ copyFileSync(src, dest);
77
+ } catch (copyErr) {
78
+ if (stub) try { writeFileSync(dest, stub, { mode: 0o755 }); } catch {}
79
+ throw copyErr;
80
+ }
81
+ }
82
+ } else if (err.code === 'EXDEV' || err.code === 'EPERM') {
83
+ copyFileSync(src, dest);
84
+ } else {
85
+ throw err;
86
+ }
87
+ }
88
+ if (process.platform !== 'win32') chmodSync(dest, 0o755);
89
+ }
90
+
91
+ function main() {
92
+ const platformKey = getPlatformKey();
93
+ const info = PLATFORMS[platformKey];
94
+
95
+ if (!info) {
96
+ console.error(`[${WRAPPER_NAME} postinstall] Unsupported platform: ${process.platform} ${arch()}`);
97
+ console.error(` Supported: ${Object.keys(PLATFORMS).join(', ')}`);
98
+ return;
99
+ }
100
+
101
+ let srcBinary;
102
+ let srcClientDist;
103
+ try {
104
+ const pkgDir = path.dirname(require.resolve(info.pkg + '/package.json'));
105
+ srcBinary = path.join(pkgDir, info.bin);
106
+ srcClientDist = path.join(pkgDir, 'client-dist');
107
+ } catch {
108
+ console.error(`[${WRAPPER_NAME} postinstall] Native package "${info.pkg}" not found.`);
109
+ if (platformKey === 'darwin-arm64' && arch() === 'x64') {
110
+ console.error(' You are running x64 Node under Rosetta 2 on Apple Silicon. npm only');
111
+ console.error(' installed the darwin-x64 binary, which requires AVX (not emulated by');
112
+ console.error(' Rosetta). Install arm64 Node and reinstall — e.g. via nvm:');
113
+ console.error(` arch -arm64 zsh -c "nvm install --lts && npm i -g ${WRAPPER_NAME}"`);
114
+ return;
115
+ }
116
+ console.error(' This happens with --omit=optional or when the install download failed.');
117
+ console.error(' The `avc` command will print instructions when invoked.');
118
+ console.error(` Fallback: node ${path.join(__dirname, 'cli-wrapper.cjs')}`);
119
+ return;
120
+ }
121
+
122
+ // bin/avc.exe is the published stub; the npm bin shim was generated at
123
+ // install time pointing here, so we must write to the same path. The
124
+ // .exe extension lets cmd.exe exec it directly on Windows; Unix ignores
125
+ // the extension. Same trick as Bun's npm package.
126
+ const dest = path.join(__dirname, 'bin', 'avc.exe');
127
+
128
+ try {
129
+ placeBinary(srcBinary, dest);
130
+ } catch (err) {
131
+ console.error(`[${WRAPPER_NAME} postinstall] Failed to place binary: ${err.message}`);
132
+ console.error(` Fallback: node ${path.join(__dirname, 'cli-wrapper.cjs')}`);
133
+ process.exitCode = 1;
134
+ return;
135
+ }
136
+
137
+ // Inform the user where the React UI assets live, and (for native mode)
138
+ // hardlink/symlink the client-dist next to the binary so the kanban
139
+ // server's process.execPath-relative resolution finds them. The client
140
+ // assets stay inside the platform package; we just give the binary a
141
+ // sibling directory it can read from.
142
+ if (existsSync(srcClientDist)) {
143
+ const destClientDist = path.join(__dirname, 'bin', 'client-dist');
144
+ try {
145
+ // symlink is fine here — readers only need to traverse the dir.
146
+ const { symlinkSync, rmSync } = require('fs');
147
+ try { rmSync(destClientDist, { recursive: true, force: true }); } catch {}
148
+ symlinkSync(srcClientDist, destClientDist, 'dir');
149
+ } catch (err) {
150
+ // On Windows without admin, symlink creation may fail. Fall back
151
+ // to copying the directory.
152
+ try {
153
+ const { cpSync } = require('fs');
154
+ cpSync(srcClientDist, destClientDist, { recursive: true });
155
+ } catch (copyErr) {
156
+ console.error(`[${WRAPPER_NAME} postinstall] Could not place client-dist (${err.message}); kanban UI may not load.`);
157
+ }
158
+ }
159
+ }
160
+ }
161
+
162
+ main();
package/package.json CHANGED
@@ -1,20 +1,52 @@
1
1
  {
2
2
  "name": "@openagile/avc",
3
- "version": "0.0.1",
4
- "description": "Open Agile (AVC) — placeholder. The real CLI release will replace this version. See https://github.com/NachoColl/agilevibecoding for the source.",
3
+ "version": "1.0.0-beta.2",
4
+ "description": "Open Agile (AVC) — native CLI for AI agent-based software development. Installs the right binary for your platform.",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "bin": {
7
+ "avc": "bin/avc.exe"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node install.cjs"
11
+ },
12
+ "files": [
13
+ "install.cjs",
14
+ "cli-wrapper.cjs",
15
+ "bin/avc.exe",
16
+ "LICENSE",
17
+ "README.md"
18
+ ],
19
+ "engines": {
20
+ "node": ">=18.0.0"
21
+ },
22
+ "optionalDependencies": {
23
+ "@openagile/avc-darwin-arm64": "1.0.0-beta.2",
24
+ "@openagile/avc-darwin-x64": "1.0.0-beta.2",
25
+ "@openagile/avc-linux-arm64": "1.0.0-beta.2",
26
+ "@openagile/avc-linux-arm64-musl": "1.0.0-beta.2",
27
+ "@openagile/avc-linux-x64": "1.0.0-beta.2",
28
+ "@openagile/avc-linux-x64-musl": "1.0.0-beta.2",
29
+ "@openagile/avc-win32-x64": "1.0.0-beta.2"
30
+ },
5
31
  "publishConfig": {
6
32
  "access": "public"
7
33
  },
8
- "license": "PolyForm-Noncommercial-1.0.0",
9
34
  "repository": {
10
35
  "type": "git",
11
- "url": "git+https://github.com/NachoColl/agilevibecoding.git",
36
+ "url": "git+https://github.com/blockchain-web-services/openagile-cli.git",
12
37
  "directory": "src"
13
38
  },
14
39
  "homepage": "https://agilevibecoding.org",
15
40
  "bugs": {
16
- "url": "https://github.com/NachoColl/agilevibecoding/issues"
41
+ "url": "https://github.com/blockchain-web-services/openagile-cli/issues"
17
42
  },
18
43
  "author": "Nacho Coll",
19
- "keywords": ["avc", "openagile", "agile-vibe-coding", "placeholder"]
44
+ "keywords": [
45
+ "avc",
46
+ "openagile",
47
+ "agile-vibe-coding",
48
+ "ai-agents",
49
+ "llm",
50
+ "cli"
51
+ ]
20
52
  }