@ory/gemini-cli 0.7.2 → 0.7.3
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/dist/cli/main.js +15 -5
- package/package.json +2 -2
package/dist/cli/main.js
CHANGED
|
@@ -46,11 +46,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
47
|
const path = __importStar(require("node:path"));
|
|
48
48
|
const fs = __importStar(require("node:fs"));
|
|
49
|
+
const os = __importStar(require("node:os"));
|
|
49
50
|
const node_child_process_1 = require("node:child_process");
|
|
50
51
|
const argus_1 = require("@ory/argus");
|
|
51
52
|
const assets_js_1 = require("./assets.js");
|
|
52
53
|
const EXTENSION_DIR = path.resolve(__dirname, "..", "..", "gemini-extension");
|
|
53
54
|
const PACKAGE_ROOT = path.resolve(__dirname, "..", "..");
|
|
55
|
+
/**
|
|
56
|
+
* On Windows, npm-installed CLIs are `.cmd` shims that Node's spawn only
|
|
57
|
+
* finds via the shell. POSIX shells resolve the bare name directly.
|
|
58
|
+
*/
|
|
59
|
+
const SPAWN_VIA_SHELL = process.platform === "win32";
|
|
54
60
|
function main() {
|
|
55
61
|
const [command, ...args] = process.argv.slice(2);
|
|
56
62
|
switch (command) {
|
|
@@ -115,11 +121,12 @@ function install(args) {
|
|
|
115
121
|
(0, assets_js_1.installGeminiOryAssets)(EXTENSION_DIR);
|
|
116
122
|
const geminiAvailable = (0, node_child_process_1.spawnSync)("gemini", ["--version"], {
|
|
117
123
|
stdio: "pipe",
|
|
124
|
+
shell: SPAWN_VIA_SHELL,
|
|
118
125
|
}).status === 0;
|
|
119
126
|
if (geminiAvailable) {
|
|
120
127
|
if (isLink) {
|
|
121
128
|
console.log("Linking Ory extension for development...");
|
|
122
|
-
const result = (0, node_child_process_1.spawnSync)("gemini", ["extensions", "link", EXTENSION_DIR], { stdio: "inherit" });
|
|
129
|
+
const result = (0, node_child_process_1.spawnSync)("gemini", ["extensions", "link", EXTENSION_DIR], { stdio: "inherit", shell: SPAWN_VIA_SHELL });
|
|
123
130
|
if (result.status === 0) {
|
|
124
131
|
console.log("");
|
|
125
132
|
console.log("Ory extension linked for development.");
|
|
@@ -133,7 +140,7 @@ function install(args) {
|
|
|
133
140
|
}
|
|
134
141
|
else {
|
|
135
142
|
console.log("Installing Ory extension...");
|
|
136
|
-
const result = (0, node_child_process_1.spawnSync)("gemini", ["extensions", "install", EXTENSION_DIR], { stdio: "inherit" });
|
|
143
|
+
const result = (0, node_child_process_1.spawnSync)("gemini", ["extensions", "install", EXTENSION_DIR], { stdio: "inherit", shell: SPAWN_VIA_SHELL });
|
|
137
144
|
if (result.status === 0) {
|
|
138
145
|
console.log("");
|
|
139
146
|
console.log("Ory extension installed.");
|
|
@@ -155,10 +162,14 @@ function install(args) {
|
|
|
155
162
|
function uninstall(args) {
|
|
156
163
|
const geminiAvailable = (0, node_child_process_1.spawnSync)("gemini", ["--version"], {
|
|
157
164
|
stdio: "pipe",
|
|
165
|
+
shell: SPAWN_VIA_SHELL,
|
|
158
166
|
}).status === 0;
|
|
159
167
|
if (geminiAvailable) {
|
|
160
168
|
console.log("Uninstalling Ory extension...");
|
|
161
|
-
(0, node_child_process_1.spawnSync)("gemini", ["extensions", "uninstall", "ory"], {
|
|
169
|
+
(0, node_child_process_1.spawnSync)("gemini", ["extensions", "uninstall", "ory"], {
|
|
170
|
+
stdio: "inherit",
|
|
171
|
+
shell: SPAWN_VIA_SHELL,
|
|
172
|
+
});
|
|
162
173
|
}
|
|
163
174
|
else {
|
|
164
175
|
const setupArgs = ["--uninstall", ...args];
|
|
@@ -196,8 +207,7 @@ async function status() {
|
|
|
196
207
|
console.log(` Directory: ${EXTENSION_DIR}`);
|
|
197
208
|
console.log(` Manifest: ${fs.existsSync(path.join(EXTENSION_DIR, "gemini-extension.json")) ? "found" : "MISSING"}`);
|
|
198
209
|
console.log(` Hook script: ${fs.existsSync(path.join(PACKAGE_ROOT, "dist", "hook.js")) ? "built" : "NOT BUILT (run pnpm build)"}`);
|
|
199
|
-
const
|
|
200
|
-
const extensionInstalled = fs.existsSync(path.join(home, ".gemini", "extensions", "ory"));
|
|
210
|
+
const extensionInstalled = fs.existsSync(path.join(os.homedir(), ".gemini", "extensions", "ory"));
|
|
201
211
|
console.log(` Installed: ${extensionInstalled ? "yes (~/.gemini/extensions/ory)" : "no"}`);
|
|
202
212
|
},
|
|
203
213
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ory/gemini-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
4
4
|
"description": "Ory extension for Gemini CLI: scaffolding skills, a local Ory instance, and authentication, authorization, and audit for every tool call",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://ory.com",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"gemini-extension"
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@ory/argus": "0.7.
|
|
71
|
+
"@ory/argus": "0.7.3"
|
|
72
72
|
},
|
|
73
73
|
"engines": {
|
|
74
74
|
"node": ">=22"
|