@gorsee/code 0.1.3 → 0.1.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/README.md +5 -5
- package/npm/postinstall.js +24 -3
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Gorsee Code
|
|
2
2
|
|
|
3
3
|
Gorsee Code is a local NeuroGate-native coding workspace.
|
|
4
|
-
Install it once, run `gcode`, add your NeuroGate API key,
|
|
5
|
-
|
|
4
|
+
Install it once, run `gcode`, add your NeuroGate API key, and work inside the
|
|
5
|
+
full coding workspace.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -11,8 +11,8 @@ npm install -g @gorsee/code
|
|
|
11
11
|
gcode
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
The first `gcode` launch asks for a NeuroGate API key, stores it locally,
|
|
15
|
-
|
|
14
|
+
The first `gcode` launch asks for a NeuroGate API key, stores it locally, and
|
|
15
|
+
opens the coding workspace. Tasks are entered directly inside the TUI.
|
|
16
16
|
|
|
17
17
|
## Common Commands
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ gcode auth set
|
|
|
22
22
|
gcode doctor
|
|
23
23
|
gcode models
|
|
24
24
|
gcode limits
|
|
25
|
-
gcode
|
|
25
|
+
gcode exec "audit this repository"
|
|
26
26
|
gcode skills run repo-audit
|
|
27
27
|
gcode pause
|
|
28
28
|
gcode resume
|
package/npm/postinstall.js
CHANGED
|
@@ -6,12 +6,13 @@ const https = require("https");
|
|
|
6
6
|
const os = require("os");
|
|
7
7
|
const path = require("path");
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const pkg = require("../package.json");
|
|
10
|
+
const version = pkg.version;
|
|
10
11
|
const binDir = path.join(__dirname, "bin");
|
|
11
12
|
const target = platformTarget(process.platform, process.arch);
|
|
12
13
|
|
|
13
14
|
if (process.argv.includes("--check")) {
|
|
14
|
-
|
|
15
|
+
checkPackage();
|
|
15
16
|
process.exit(0);
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -51,6 +52,27 @@ function platformTarget(platform, arch) {
|
|
|
51
52
|
throw new Error(`unsupported platform: ${platform}-${arch}`);
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
function checkPackage() {
|
|
56
|
+
assert(pkg.bin && pkg.bin.gcode === "npm/gcode.js", "package bin.gcode must be npm/gcode.js");
|
|
57
|
+
assert(target.asset && target.exe, "platform target is incomplete");
|
|
58
|
+
assertFile("npm/gcode.js");
|
|
59
|
+
assertFile("npm/postinstall.js");
|
|
60
|
+
for (const file of pkg.files || []) {
|
|
61
|
+
assertFile(file);
|
|
62
|
+
}
|
|
63
|
+
console.log(`asset=${target.asset} bin=${pkg.bin.gcode} files=${(pkg.files || []).length}`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function assertFile(file) {
|
|
67
|
+
assert(fs.existsSync(path.join(__dirname, "..", file)), `missing package file: ${file}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function assert(condition, message) {
|
|
71
|
+
if (!condition) {
|
|
72
|
+
throw new Error(message);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
54
76
|
function download(url, output, redirects = 0) {
|
|
55
77
|
if (redirects > 5) {
|
|
56
78
|
return Promise.reject(new Error("too many redirects"));
|
|
@@ -108,7 +130,6 @@ function ensureCommandInPath() {
|
|
|
108
130
|
return;
|
|
109
131
|
}
|
|
110
132
|
|
|
111
|
-
// ponytail: npm can use a global bin dir outside PATH; this makes the one-command install work.
|
|
112
133
|
try {
|
|
113
134
|
fs.symlinkSync(path.join(__dirname, "gcode.js"), link);
|
|
114
135
|
} catch {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gorsee/code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "NeuroGate-native coding agent command center",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
21
|
"postinstall": "node npm/postinstall.js",
|
|
22
|
+
"test": "npm run test:npm",
|
|
22
23
|
"test:npm": "node npm/postinstall.js --check"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|