@ironbee-ai/cli 0.7.3 → 0.8.0
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/CHANGELOG.md +2 -0
- package/README.md +62 -3
- package/dist/clients/claude/index.d.ts +10 -0
- package/dist/clients/claude/index.d.ts.map +1 -1
- package/dist/clients/claude/index.js +102 -22
- package/dist/clients/claude/index.js.map +1 -1
- package/dist/clients/cursor/index.d.ts +8 -0
- package/dist/clients/cursor/index.d.ts.map +1 -1
- package/dist/clients/cursor/index.js +67 -9
- package/dist/clients/cursor/index.js.map +1 -1
- package/dist/clients/registry.d.ts +35 -6
- package/dist/clients/registry.d.ts.map +1 -1
- package/dist/clients/registry.js +73 -6
- package/dist/clients/registry.js.map +1 -1
- package/dist/commands/config.d.ts +79 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +558 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/install.d.ts +14 -0
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +122 -16
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/register.d.ts +24 -0
- package/dist/commands/register.d.ts.map +1 -0
- package/dist/commands/register.js +67 -0
- package/dist/commands/register.js.map +1 -0
- package/dist/commands/uninstall.d.ts +18 -0
- package/dist/commands/uninstall.d.ts.map +1 -1
- package/dist/commands/uninstall.js +160 -16
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/unregister.d.ts +23 -0
- package/dist/commands/unregister.d.ts.map +1 -0
- package/dist/commands/unregister.js +67 -0
- package/dist/commands/unregister.js.map +1 -0
- package/dist/import/claude/discovery.js +4 -4
- package/dist/import/claude/discovery.js.map +1 -1
- package/dist/import/claude/encoding.d.ts.map +1 -1
- package/dist/import/claude/encoding.js +102 -21
- package/dist/import/claude/encoding.js.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +6 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/projects-registry.d.ts +102 -0
- package/dist/lib/projects-registry.d.ts.map +1 -0
- package/dist/lib/projects-registry.js +282 -0
- package/dist/lib/projects-registry.js.map +1 -0
- package/dist/lib/prompt.d.ts +40 -0
- package/dist/lib/prompt.d.ts.map +1 -0
- package/dist/lib/prompt.js +101 -0
- package/dist/lib/prompt.js.map +1 -0
- package/dist/lib/telemetry.d.ts +8 -0
- package/dist/lib/telemetry.d.ts.map +1 -1
- package/dist/lib/telemetry.js +44 -0
- package/dist/lib/telemetry.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — Projects Registry (raw CRUD)
|
|
4
|
+
*
|
|
5
|
+
* Tracks every project where `ironbee install` has been run so that
|
|
6
|
+
* cross-project operations (notably global config changes via
|
|
7
|
+
* `ironbee config set --global …`) can find the affected projects without
|
|
8
|
+
* walking the filesystem.
|
|
9
|
+
*
|
|
10
|
+
* Storage: `~/.ironbee/projects.json` — single JSON file, atomic
|
|
11
|
+
* write (temp + rename) to survive concurrent installs.
|
|
12
|
+
*
|
|
13
|
+
* {
|
|
14
|
+
* "version": 1,
|
|
15
|
+
* "projects": [
|
|
16
|
+
* {
|
|
17
|
+
* "path": "/abs/path/to/project",
|
|
18
|
+
* "clients": ["claude", "cursor"],
|
|
19
|
+
* "installedAt": "2026-05-07T10:30:00.000Z"
|
|
20
|
+
* }
|
|
21
|
+
* ]
|
|
22
|
+
* }
|
|
23
|
+
*
|
|
24
|
+
* Maintenance:
|
|
25
|
+
* - `install` / `register` → `upsertProject` (merges new clients into existing entry)
|
|
26
|
+
* - `uninstall` / `unregister` → `removeProject`
|
|
27
|
+
* - `install --all` reads via `loadRegistry` to drive the batch loop
|
|
28
|
+
*
|
|
29
|
+
* Active-vs-stale filtering lives in `clients/registry.ts` — that
|
|
30
|
+
* operation needs `IClient.detect()` which is per-client knowledge, and
|
|
31
|
+
* `lib/` must not depend on `clients/` (would create a cycle). This
|
|
32
|
+
* module exposes raw CRUD; the layer above composes it with detection
|
|
33
|
+
* to decide what's active.
|
|
34
|
+
*
|
|
35
|
+
* Errors are non-fatal: a corrupt registry returns an empty list and is
|
|
36
|
+
* overwritten on the next successful upsert. Registry maintenance MUST
|
|
37
|
+
* NEVER break `install` / `uninstall` — those are the user-facing
|
|
38
|
+
* commands; a registry write failure is a logger.debug, not an exit code.
|
|
39
|
+
*/
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.registryPath = registryPath;
|
|
42
|
+
exports.loadRegistry = loadRegistry;
|
|
43
|
+
exports.canonicalizePath = canonicalizePath;
|
|
44
|
+
exports.upsertProject = upsertProject;
|
|
45
|
+
exports.removeProject = removeProject;
|
|
46
|
+
exports.listProjects = listProjects;
|
|
47
|
+
const fs_1 = require("fs");
|
|
48
|
+
const os_1 = require("os");
|
|
49
|
+
const path_1 = require("path");
|
|
50
|
+
const logger_1 = require("./logger");
|
|
51
|
+
const REGISTRY_VERSION = 1;
|
|
52
|
+
function registryDir() {
|
|
53
|
+
return (0, path_1.join)((0, os_1.homedir)(), ".ironbee");
|
|
54
|
+
}
|
|
55
|
+
function registryPath() {
|
|
56
|
+
return (0, path_1.join)(registryDir(), "projects.json");
|
|
57
|
+
}
|
|
58
|
+
function emptyRegistry() {
|
|
59
|
+
return { version: REGISTRY_VERSION, projects: [] };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Read the registry. Returns an empty registry when the file is missing,
|
|
63
|
+
* unreadable, malformed, or carries an unexpected schema version. Never
|
|
64
|
+
* throws — keep the registry's failure mode soft so a corrupt file can't
|
|
65
|
+
* brick `install`.
|
|
66
|
+
*/
|
|
67
|
+
function loadRegistry() {
|
|
68
|
+
const path = registryPath();
|
|
69
|
+
if (!(0, fs_1.existsSync)(path)) {
|
|
70
|
+
return emptyRegistry();
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
const raw = (0, fs_1.readFileSync)(path, "utf-8");
|
|
74
|
+
if (raw.trim().length === 0) {
|
|
75
|
+
return emptyRegistry();
|
|
76
|
+
}
|
|
77
|
+
const parsed = JSON.parse(raw);
|
|
78
|
+
if (parsed === null || typeof parsed !== "object") {
|
|
79
|
+
logger_1.logger.debug(`projects-registry: ${path} is not a JSON object — ignoring`);
|
|
80
|
+
return emptyRegistry();
|
|
81
|
+
}
|
|
82
|
+
const obj = parsed;
|
|
83
|
+
if (obj.version !== REGISTRY_VERSION) {
|
|
84
|
+
logger_1.logger.debug(`projects-registry: unexpected schema version ${String(obj.version)} (expected ${REGISTRY_VERSION}) — ignoring`);
|
|
85
|
+
return emptyRegistry();
|
|
86
|
+
}
|
|
87
|
+
if (!Array.isArray(obj.projects)) {
|
|
88
|
+
return emptyRegistry();
|
|
89
|
+
}
|
|
90
|
+
const projects = obj.projects
|
|
91
|
+
.filter((p) => p !== null && typeof p === "object")
|
|
92
|
+
.map((p) => ({
|
|
93
|
+
path: typeof p.path === "string" ? p.path : "",
|
|
94
|
+
clients: Array.isArray(p.clients)
|
|
95
|
+
? p.clients.filter((c) => typeof c === "string")
|
|
96
|
+
: [],
|
|
97
|
+
installedAt: typeof p.installedAt === "string" ? p.installedAt : "",
|
|
98
|
+
}))
|
|
99
|
+
.filter((p) => p.path.length > 0);
|
|
100
|
+
return { version: REGISTRY_VERSION, projects };
|
|
101
|
+
}
|
|
102
|
+
catch (e) {
|
|
103
|
+
logger_1.logger.debug(`projects-registry: failed to read ${path}: ${e instanceof Error ? e.message : e}`);
|
|
104
|
+
return emptyRegistry();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Atomic write: serialize → write to `<path>.tmp.<pid>.<ts>` → rename. The
|
|
109
|
+
* rename is atomic on POSIX so a crash mid-write can never leave callers
|
|
110
|
+
* reading a half-written registry.
|
|
111
|
+
*
|
|
112
|
+
* **Concurrency caveat**: this does NOT lock the registry against other
|
|
113
|
+
* processes. The atomic rename protects against torn READS, not against
|
|
114
|
+
* lost WRITES under read-modify-write races (process A loads, B loads,
|
|
115
|
+
* A writes, B writes — A's change is silently overwritten). For the
|
|
116
|
+
* manual one-shot CLI use case (single user, occasional `install` /
|
|
117
|
+
* `register` calls) this is acceptable; if registry maintenance ever moves
|
|
118
|
+
* to a hot path or a multi-agent scenario, add proper file locking
|
|
119
|
+
* (e.g. `proper-lockfile`) and a read-mtime → check-on-write retry loop.
|
|
120
|
+
*/
|
|
121
|
+
function writeRegistry(file) {
|
|
122
|
+
const dir = registryDir();
|
|
123
|
+
(0, fs_1.mkdirSync)(dir, { recursive: true });
|
|
124
|
+
const path = registryPath();
|
|
125
|
+
const tmpPath = `${path}.tmp.${process.pid}.${Date.now()}`;
|
|
126
|
+
const body = JSON.stringify(file, null, 2) + "\n";
|
|
127
|
+
try {
|
|
128
|
+
(0, fs_1.writeFileSync)(tmpPath, body);
|
|
129
|
+
(0, fs_1.renameSync)(tmpPath, path);
|
|
130
|
+
}
|
|
131
|
+
catch (e) {
|
|
132
|
+
// Clean up tmp on failure so we don't leak debris.
|
|
133
|
+
try {
|
|
134
|
+
if ((0, fs_1.existsSync)(tmpPath)) {
|
|
135
|
+
(0, fs_1.unlinkSync)(tmpPath);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
// best-effort cleanup
|
|
140
|
+
}
|
|
141
|
+
throw e;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Normalize a project path to its absolute realpath form. Symlinks are
|
|
146
|
+
* resolved so that installing into `/Users/foo/sym` (a symlink) and
|
|
147
|
+
* `/Users/foo/real` (the target) collapse onto the SAME registry entry.
|
|
148
|
+
*
|
|
149
|
+
* If `realpathSync` fails (path doesn't exist, broken symlink, perms),
|
|
150
|
+
* we fall back to `path.resolve` so write paths are still well-formed.
|
|
151
|
+
*
|
|
152
|
+
* Exported so callers (e.g. the global-config notice in `commands/config.ts`)
|
|
153
|
+
* can compare against entries using the SAME canonicalization the registry
|
|
154
|
+
* stores them with.
|
|
155
|
+
*/
|
|
156
|
+
function canonicalizePath(projectDir) {
|
|
157
|
+
const resolved = (0, path_1.resolve)(projectDir);
|
|
158
|
+
try {
|
|
159
|
+
return (0, fs_1.realpathSync)(resolved);
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
return resolved;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Match a stored entry's path against a freshly canonicalized lookup
|
|
167
|
+
* key. Tolerates legacy entries written before realpath canonicalization
|
|
168
|
+
* was added (`stored` may still be a non-canonical `resolve()` form;
|
|
169
|
+
* realpath of that is what `canonical` looks like, so the second branch
|
|
170
|
+
* collapses old entries onto the new key on first hit).
|
|
171
|
+
*/
|
|
172
|
+
function pathMatches(stored, canonical) {
|
|
173
|
+
if (stored === canonical) {
|
|
174
|
+
return true;
|
|
175
|
+
}
|
|
176
|
+
try {
|
|
177
|
+
return (0, fs_1.realpathSync)(stored) === canonical;
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Add or update a project entry. Merges `clients` into any existing entry
|
|
185
|
+
* (so installing for cursor on a project that already has claude registered
|
|
186
|
+
* widens the entry rather than replacing it). `installedAt` is set only on
|
|
187
|
+
* first registration. The stored `path` is rewritten to the realpath form
|
|
188
|
+
* on every upsert so legacy entries get canonicalized on first re-touch.
|
|
189
|
+
*
|
|
190
|
+
* Failures are swallowed and logged — registry maintenance must not break
|
|
191
|
+
* the user-visible `install` / `register` flow.
|
|
192
|
+
*/
|
|
193
|
+
function upsertProject(projectDir, clients) {
|
|
194
|
+
if (clients.length === 0) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
try {
|
|
198
|
+
const canonical = canonicalizePath(projectDir);
|
|
199
|
+
const file = loadRegistry();
|
|
200
|
+
const now = new Date().toISOString();
|
|
201
|
+
const idx = file.projects.findIndex((p) => pathMatches(p.path, canonical));
|
|
202
|
+
if (idx === -1) {
|
|
203
|
+
file.projects.push({
|
|
204
|
+
path: canonical,
|
|
205
|
+
clients: dedupe(clients),
|
|
206
|
+
installedAt: now,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
const existing = file.projects[idx];
|
|
211
|
+
file.projects[idx] = {
|
|
212
|
+
path: canonical,
|
|
213
|
+
clients: dedupe([...existing.clients, ...clients]),
|
|
214
|
+
installedAt: existing.installedAt.length > 0 ? existing.installedAt : now,
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
writeRegistry(file);
|
|
218
|
+
}
|
|
219
|
+
catch (e) {
|
|
220
|
+
logger_1.logger.debug(`projects-registry: upsert failed for ${projectDir}: ${e instanceof Error ? e.message : e}`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Remove `clients` from a project entry. When the resulting `clients` list
|
|
225
|
+
* is empty (every client uninstalled), the entry itself is dropped. When
|
|
226
|
+
* `clients` is omitted, the entry is removed regardless of which clients
|
|
227
|
+
* are recorded — used by ad-hoc cleanup paths.
|
|
228
|
+
*
|
|
229
|
+
* Idempotent. Returns `true` when something was actually removed (entry
|
|
230
|
+
* dropped or clients trimmed); `false` when there was nothing matching to
|
|
231
|
+
* change. Lets callers like `ironbee unregister` distinguish "removed
|
|
232
|
+
* vs. nothing-to-remove" without re-implementing the `pathMatches` lookup.
|
|
233
|
+
*/
|
|
234
|
+
function removeProject(projectDir, clients) {
|
|
235
|
+
try {
|
|
236
|
+
const canonical = canonicalizePath(projectDir);
|
|
237
|
+
const file = loadRegistry();
|
|
238
|
+
const idx = file.projects.findIndex((p) => pathMatches(p.path, canonical));
|
|
239
|
+
if (idx === -1) {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
if (clients === undefined || clients.length === 0) {
|
|
243
|
+
file.projects.splice(idx, 1);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
const existing = file.projects[idx];
|
|
247
|
+
const remaining = existing.clients.filter((c) => !clients.includes(c));
|
|
248
|
+
if (remaining.length === existing.clients.length) {
|
|
249
|
+
// None of the requested clients were in the entry — nothing changed.
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
if (remaining.length === 0) {
|
|
253
|
+
file.projects.splice(idx, 1);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
file.projects[idx] = {
|
|
257
|
+
...existing,
|
|
258
|
+
clients: remaining,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
writeRegistry(file);
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
catch (e) {
|
|
266
|
+
logger_1.logger.debug(`projects-registry: remove failed for ${projectDir}: ${e instanceof Error ? e.message : e}`);
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Return every registered project, raw (no staleness filtering). Callers
|
|
272
|
+
* that want pruned results compose this with their own active-check —
|
|
273
|
+
* see `clients/registry.ts:listActiveProjects` for the canonical
|
|
274
|
+
* IClient-detect-based filter.
|
|
275
|
+
*/
|
|
276
|
+
function listProjects() {
|
|
277
|
+
return loadRegistry().projects;
|
|
278
|
+
}
|
|
279
|
+
function dedupe(items) {
|
|
280
|
+
return Array.from(new Set(items));
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=projects-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects-registry.js","sourceRoot":"","sources":["../../src/lib/projects-registry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;;AA2BH,oCAEC;AAYD,oCAsCC;AAkDD,4CAOC;AA8BD,sCA4BC;AAaD,sCAgCC;AAQD,oCAEC;AAvPD,2BAA8G;AAC9G,2B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CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG;oBACjB,GAAG,QAAQ;oBACX,OAAO,EAAE,SAAS;iBACrB,CAAC;YACN,CAAC;QACL,CAAC;QACD,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,wCAAwC,UAAU,KAAK,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1G,OAAO,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,YAAY;IACxB,OAAO,YAAY,EAAE,CAAC,QAAQ,CAAC;AACnC,CAAC;AAED,SAAS,MAAM,CAAC,KAAe;IAC3B,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IronBee — Interactive prompt helpers
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper around `readline.createInterface` for yes/no questions.
|
|
5
|
+
* Used by `ironbee config set --global` to ask the user whether to
|
|
6
|
+
* propagate an artifact-affecting change to all registered projects.
|
|
7
|
+
*
|
|
8
|
+
* Non-TTY environments: callers should NOT call `promptYesNo` (it would
|
|
9
|
+
* hang on a closed stdin). Use `isInteractive()` first; on non-TTY, skip
|
|
10
|
+
* the prompt and fall back to a notice + `--apply-all` flag hint.
|
|
11
|
+
*/
|
|
12
|
+
/** True when both stdin and stdout are TTYs — safe to prompt the user. */
|
|
13
|
+
export declare function isInteractive(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Ask the user to pick one of N choices. Returns the zero-based index of
|
|
16
|
+
* the picked choice. Empty input → `defaultIdx`. Accepts:
|
|
17
|
+
* - The displayed number (`1`, `2`, …)
|
|
18
|
+
* - The full choice name (case-insensitive exact match)
|
|
19
|
+
* Anything else falls through to `defaultIdx`.
|
|
20
|
+
*
|
|
21
|
+
* Display:
|
|
22
|
+
* <question>
|
|
23
|
+
* 1) choice0 (default)
|
|
24
|
+
* 2) choice1
|
|
25
|
+
* 3) choice2
|
|
26
|
+
* >
|
|
27
|
+
*
|
|
28
|
+
* Caller must verify `isInteractive()` first; without a TTY this hangs.
|
|
29
|
+
*/
|
|
30
|
+
export declare function promptChoice(question: string, choices: readonly string[], defaultIdx?: number): Promise<number>;
|
|
31
|
+
/**
|
|
32
|
+
* Ask a yes/no question. Empty input falls through to `defaultYes`.
|
|
33
|
+
* Accepts `y`, `yes`, `n`, `no` (case-insensitive). Anything else is
|
|
34
|
+
* treated as default.
|
|
35
|
+
*
|
|
36
|
+
* Caller is responsible for ensuring stdin is interactive (`isInteractive()`).
|
|
37
|
+
* Without that check this hangs in CI / piped contexts.
|
|
38
|
+
*/
|
|
39
|
+
export declare function promptYesNo(question: string, defaultYes: boolean): Promise<boolean>;
|
|
40
|
+
//# sourceMappingURL=prompt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/lib/prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,0EAA0E;AAC1E,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,UAAU,GAAE,MAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAiClH;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAsBnF"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* IronBee — Interactive prompt helpers
|
|
4
|
+
*
|
|
5
|
+
* Thin wrapper around `readline.createInterface` for yes/no questions.
|
|
6
|
+
* Used by `ironbee config set --global` to ask the user whether to
|
|
7
|
+
* propagate an artifact-affecting change to all registered projects.
|
|
8
|
+
*
|
|
9
|
+
* Non-TTY environments: callers should NOT call `promptYesNo` (it would
|
|
10
|
+
* hang on a closed stdin). Use `isInteractive()` first; on non-TTY, skip
|
|
11
|
+
* the prompt and fall back to a notice + `--apply-all` flag hint.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.isInteractive = isInteractive;
|
|
15
|
+
exports.promptChoice = promptChoice;
|
|
16
|
+
exports.promptYesNo = promptYesNo;
|
|
17
|
+
const readline_1 = require("readline");
|
|
18
|
+
/** True when both stdin and stdout are TTYs — safe to prompt the user. */
|
|
19
|
+
function isInteractive() {
|
|
20
|
+
return Boolean(process.stdin.isTTY) && Boolean(process.stdout.isTTY);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Ask the user to pick one of N choices. Returns the zero-based index of
|
|
24
|
+
* the picked choice. Empty input → `defaultIdx`. Accepts:
|
|
25
|
+
* - The displayed number (`1`, `2`, …)
|
|
26
|
+
* - The full choice name (case-insensitive exact match)
|
|
27
|
+
* Anything else falls through to `defaultIdx`.
|
|
28
|
+
*
|
|
29
|
+
* Display:
|
|
30
|
+
* <question>
|
|
31
|
+
* 1) choice0 (default)
|
|
32
|
+
* 2) choice1
|
|
33
|
+
* 3) choice2
|
|
34
|
+
* >
|
|
35
|
+
*
|
|
36
|
+
* Caller must verify `isInteractive()` first; without a TTY this hangs.
|
|
37
|
+
*/
|
|
38
|
+
function promptChoice(question, choices, defaultIdx = 0) {
|
|
39
|
+
const lines = [
|
|
40
|
+
question,
|
|
41
|
+
...choices.map((c, i) => {
|
|
42
|
+
const marker = i === defaultIdx ? " (default)" : "";
|
|
43
|
+
return ` ${i + 1}) ${c}${marker}`;
|
|
44
|
+
}),
|
|
45
|
+
];
|
|
46
|
+
const promptText = lines.join("\n") + "\n> ";
|
|
47
|
+
const rl = (0, readline_1.createInterface)({ input: process.stdin, output: process.stdout });
|
|
48
|
+
return new Promise((resolve) => {
|
|
49
|
+
rl.question(promptText, (answer) => {
|
|
50
|
+
rl.close();
|
|
51
|
+
const trimmed = answer.trim();
|
|
52
|
+
if (trimmed.length === 0) {
|
|
53
|
+
resolve(defaultIdx);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const num = Number.parseInt(trimmed, 10);
|
|
57
|
+
if (!Number.isNaN(num) && num >= 1 && num <= choices.length) {
|
|
58
|
+
resolve(num - 1);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const exactIdx = choices.findIndex((c) => c.toLowerCase() === trimmed.toLowerCase());
|
|
62
|
+
if (exactIdx !== -1) {
|
|
63
|
+
resolve(exactIdx);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
resolve(defaultIdx);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Ask a yes/no question. Empty input falls through to `defaultYes`.
|
|
72
|
+
* Accepts `y`, `yes`, `n`, `no` (case-insensitive). Anything else is
|
|
73
|
+
* treated as default.
|
|
74
|
+
*
|
|
75
|
+
* Caller is responsible for ensuring stdin is interactive (`isInteractive()`).
|
|
76
|
+
* Without that check this hangs in CI / piped contexts.
|
|
77
|
+
*/
|
|
78
|
+
function promptYesNo(question, defaultYes) {
|
|
79
|
+
const suffix = defaultYes ? " [Y/n] " : " [y/N] ";
|
|
80
|
+
const rl = (0, readline_1.createInterface)({ input: process.stdin, output: process.stdout });
|
|
81
|
+
return new Promise((resolve) => {
|
|
82
|
+
rl.question(question + suffix, (answer) => {
|
|
83
|
+
rl.close();
|
|
84
|
+
const normalized = answer.trim().toLowerCase();
|
|
85
|
+
if (normalized.length === 0) {
|
|
86
|
+
resolve(defaultYes);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (normalized === "y" || normalized === "yes") {
|
|
90
|
+
resolve(true);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (normalized === "n" || normalized === "no") {
|
|
94
|
+
resolve(false);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
resolve(defaultYes);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/lib/prompt.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAKH,sCAEC;AAkBD,oCAiCC;AAUD,kCAsBC;AAxFD,uCAAsD;AAEtD,0EAA0E;AAC1E,SAAgB,aAAa;IACzB,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACzE,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,YAAY,CAAC,QAAgB,EAAE,OAA0B,EAAE,aAAqB,CAAC;IAC7F,MAAM,KAAK,GAAa;QACpB,QAAQ;QACR,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAS,EAAE,CAAS,EAAU,EAAE;YAC5C,MAAM,MAAM,GAAW,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YAC5D,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC;QACvC,CAAC,CAAC;KACL,CAAC;IACF,MAAM,UAAU,GAAW,KAAK,CAAC,IAAI,C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,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,MAAM,EAAE,GAAc,IAAA,0BAAe,EAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACxF,OAAO,IAAI,OAAO,CAAU,CAAC,OAA6B,EAAQ,EAAE;QAChE,EAAE,CAAC,QAAQ,CAAC,QAAQ,GAAG,MAAM,EAAE,CAAC,MAAc,EAAQ,EAAE;YACpD,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,UAAU,GAAW,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;YACvD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC1B,OAAO,CAAC,UAAU,CAAC,CAAC;gBACpB,OAAO;YACX,CAAC;YACD,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;gBAC7C,OAAO,CAAC,IAAI,CAAC,CAAC;gBACd,OAAO;YACX,CAAC;YACD,IAAI,UAAU,KAAK,GAAG,IAAI,UAAU,KAAK,IAAI,EAAE,CAAC;gBAC5C,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,OAAO;YACX,CAAC;YACD,OAAO,CAAC,UAAU,CAAC,CAAC;QACxB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/lib/telemetry.d.ts
CHANGED
|
@@ -15,6 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function trackInstall(clients: string[]): Promise<void>;
|
|
17
17
|
export declare function trackUninstall(clients: string[]): Promise<void>;
|
|
18
|
+
/** Fire-and-forget event for `ironbee register` (inventory upsert only;
|
|
19
|
+
* no artifacts written). Intentionally a separate event from
|
|
20
|
+
* `cli_installed` so dashboards can distinguish "set up ironbee" from
|
|
21
|
+
* "added an existing setup to the inventory". */
|
|
22
|
+
export declare function trackRegister(clients: string[]): Promise<void>;
|
|
23
|
+
/** Fire-and-forget event for `ironbee unregister` (inventory remove only;
|
|
24
|
+
* no artifacts touched). Sibling of `trackRegister`. */
|
|
25
|
+
export declare function trackUnregister(clients: string[]): Promise<void>;
|
|
18
26
|
export declare function trackNpmInstall(): Promise<void>;
|
|
19
27
|
export declare function trackNpmUninstall(): Promise<void>;
|
|
20
28
|
export declare function trackSessionStart(client: string, sessionId: string, verificationEnabled: boolean): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/lib/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAqIH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBnE;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBrE;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAarD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAavD;AAID,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,mBAAmB,EAAE,OAAO,GAC7B,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBxF;AAED,wBAAsB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBjH"}
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/lib/telemetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAqIH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBnE;AAED,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBrE;AAED;;;kDAGkD;AAClD,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBpE;AAED;yDACyD;AACzD,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBtE;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAarD;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CAavD;AAID,wBAAsB,iBAAiB,CACnC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,mBAAmB,EAAE,OAAO,GAC7B,OAAO,CAAC,IAAI,CAAC,CAoBf;AAED,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBxF;AAED,wBAAsB,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBjH"}
|
package/dist/lib/telemetry.js
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.trackInstall = trackInstall;
|
|
19
19
|
exports.trackUninstall = trackUninstall;
|
|
20
|
+
exports.trackRegister = trackRegister;
|
|
21
|
+
exports.trackUnregister = trackUnregister;
|
|
20
22
|
exports.trackNpmInstall = trackNpmInstall;
|
|
21
23
|
exports.trackNpmUninstall = trackNpmUninstall;
|
|
22
24
|
exports.trackSessionStart = trackSessionStart;
|
|
@@ -173,6 +175,48 @@ async function trackUninstall(clients) {
|
|
|
173
175
|
logger_1.logger.debug("telemetry failed: cli_uninstalled");
|
|
174
176
|
}
|
|
175
177
|
}
|
|
178
|
+
/** Fire-and-forget event for `ironbee register` (inventory upsert only;
|
|
179
|
+
* no artifacts written). Intentionally a separate event from
|
|
180
|
+
* `cli_installed` so dashboards can distinguish "set up ironbee" from
|
|
181
|
+
* "added an existing setup to the inventory". */
|
|
182
|
+
async function trackRegister(clients) {
|
|
183
|
+
try {
|
|
184
|
+
if (!isTelemetryEnabled()) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const config = readOrCreateConfig();
|
|
188
|
+
if (!config.anonymousId) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
await sendEvent("cli_registered", config.anonymousId, {
|
|
192
|
+
...buildBaseProperties(),
|
|
193
|
+
clients,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
logger_1.logger.debug("telemetry failed: cli_registered");
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/** Fire-and-forget event for `ironbee unregister` (inventory remove only;
|
|
201
|
+
* no artifacts touched). Sibling of `trackRegister`. */
|
|
202
|
+
async function trackUnregister(clients) {
|
|
203
|
+
try {
|
|
204
|
+
if (!isTelemetryEnabled()) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const config = readOrCreateConfig();
|
|
208
|
+
if (!config.anonymousId) {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
await sendEvent("cli_unregistered", config.anonymousId, {
|
|
212
|
+
...buildBaseProperties(),
|
|
213
|
+
clients,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
logger_1.logger.debug("telemetry failed: cli_unregistered");
|
|
218
|
+
}
|
|
219
|
+
}
|
|
176
220
|
async function trackNpmInstall() {
|
|
177
221
|
try {
|
|
178
222
|
if (!isTelemetryEnabled()) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/lib/telemetry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAqIH,oCAgBC;AAED,wCAgBC;AAED,0CAaC;AAED,8CAaC;AAID,8CAwBC;AAED,8CAiBC;AAED,gEAkBC;
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/lib/telemetry.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAqIH,oCAgBC;AAED,wCAgBC;AAMD,sCAgBC;AAID,0CAgBC;AAED,0CAaC;AAED,8CAaC;AAID,8CAwBC;AAED,8CAiBC;AAED,gEAkBC;AAhTD,mCAAoC;AACpC,2BAAwE;AACxE,iCAAgC;AAChC,2BAA6B;AAC7B,+BAA4B;AAC5B,uCAA4C;AAC5C,qCAAkC;AAElC,MAAM,uBAAuB,GAAW,iDAAiD,CAAC;AAC1F,MAAM,eAAe,GAAW,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,uBAAuB,CAAC;AACvF,MAAM,YAAY,GAAW,kBAAkB,CAAC;AAChD,MAAM,YAAY,GAAW,UAAU,CAAC;AACxC,MAAM,eAAe,GAAW,IAAI,CAAC;AAErC,MAAM,UAAU,GAAW,IAAA,WAAI,EAAC,IAAA,YAAO,GAAE,EAAE,UAAU,CAAC,CAAC;AACvD,MAAM,WAAW,GAAW,IAAA,WAAI,EAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AAO/D,SAAS,kBAAkB;IACvB,IAAI,CAAC;QACD,IAAI,QAAQ,GAAoB,EAAE,CAAC;QACnC,IAAI,IAAA,eAAU,EAAC,WAAW,CAAC,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACD,MAAM,GAAG,GAA4B,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,WAAW,EAAE,OAAO,CAAC,CAA4B,CAAC;gBAC/G,QAAQ,GAAG;oBACP,WAAW,EAAE,OAAO,GAAG,CAAC,WAAW,KAAK,QAAQ,CAA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S;YACrB,cAAc,EAAE,MAAM;SACzB,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,oCAAoC,CAAC,EAAE,CAAC,CAAC;IAC1D,CAAC;AACL,CAAC;AAEM,KAAK,UAAU,0BAA0B,CAAC,SAAiB,EAAE,MAAc,EAAE,MAAc;IAC9F,IAAI,CAAC;QACD,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YACxB,OAAO;QACX,CAAC;QACD,MAAM,MAAM,GAAoB,kBAAkB,EAAE,CAAC;QACrD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACtB,OAAO;QACX,CAAC;QACD,MAAM,SAAS,CAAC,wBAAwB,EAAE,MAAM,CAAC,WAAW,EAAE;YAC1D,GAAG,mBAAmB,EAAE;YACxB,UAAU,EAAE,SAAS;YACrB,MAAM;YACN,MAAM;SACT,CAAC,CAAC;IACP,CAAC;IAAC,OAAO,CAAU,EAAE,CAAC;QAClB,eAAM,CAAC,KAAK,CAAC,6CAA6C,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ironbee-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "The CLI for IronBee — Verification and Intelligence Layer for Agentic Development",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"CHANGELOG.md"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tsc &&
|
|
16
|
+
"build": "tsc && node scripts/copy-assets.js",
|
|
17
17
|
"dev": "ts-node src/index.ts",
|
|
18
18
|
"start": "node dist/index.js",
|
|
19
19
|
"test": "jest",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
64
|
+
"node": ">=22"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"commander": "^12.1.0",
|