convene-cli 1.2.0 → 1.3.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/dist/api.js +23 -0
- package/dist/cache.js +83 -1
- package/dist/catalog/catalog.generated.js +860 -0
- package/dist/catalog/index.js +26 -0
- package/dist/catalog/manifest.js +71 -0
- package/dist/catalog/materialize.js +516 -0
- package/dist/catalog/prompt.js +89 -0
- package/dist/catalog/report.js +45 -0
- package/dist/catalog/select.js +86 -0
- package/dist/catalog/types.js +14 -0
- package/dist/commands/auth.js +44 -0
- package/dist/commands/fetch.js +50 -0
- package/dist/commands/init.js +49 -0
- package/dist/commands/offboard.js +95 -10
- package/dist/commands/override.js +65 -0
- package/dist/commands/practice-guard.js +291 -0
- package/dist/commands/setup.js +11 -1
- package/dist/commands/update.js +249 -0
- package/dist/config.js +19 -1
- package/dist/index.js +43 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -57,14 +57,27 @@ const lane_1 = require("./commands/lane");
|
|
|
57
57
|
const deploy_1 = require("./commands/deploy");
|
|
58
58
|
const guard_1 = require("./commands/guard");
|
|
59
59
|
const gate_push_1 = require("./commands/gate-push");
|
|
60
|
+
const practice_guard_1 = require("./commands/practice-guard");
|
|
61
|
+
const override_1 = require("./commands/override");
|
|
60
62
|
const watch_1 = require("./commands/watch");
|
|
61
63
|
const explain_1 = require("./commands/explain");
|
|
64
|
+
const update_1 = require("./commands/update");
|
|
62
65
|
const program = new commander_1.Command();
|
|
63
66
|
// Read the version from package.json so `convene --version` always tracks the
|
|
64
67
|
// published version (npm includes package.json in the tarball). dist/index.js
|
|
65
68
|
// sits one level below package.json; in dev (tsx) src/index.ts does too.
|
|
66
69
|
const { version } = JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../package.json'), 'utf8'));
|
|
67
70
|
program.name(brand_1.BRAND.bin).description('Convene — AI development coordination bus').version(version);
|
|
71
|
+
/**
|
|
72
|
+
* Commander maps `--no-practices` to `practices: false`; the catalog selection logic
|
|
73
|
+
* reads `noPractices`. Translate it (leaving every other option untouched) so init /
|
|
74
|
+
* setup see the field they expect.
|
|
75
|
+
*/
|
|
76
|
+
function withPracticeOpts(opts) {
|
|
77
|
+
if (opts.practices === false)
|
|
78
|
+
opts.noPractices = true;
|
|
79
|
+
return opts;
|
|
80
|
+
}
|
|
68
81
|
program
|
|
69
82
|
.command('login')
|
|
70
83
|
.description('authenticate and save config (0600)')
|
|
@@ -142,6 +155,18 @@ program
|
|
|
142
155
|
.option('--dry-run', 'classify + report; do not gate or hit the network for the verdict')
|
|
143
156
|
.option('--project <slug>')
|
|
144
157
|
.action((opts) => (0, gate_push_1.gatePush)(opts));
|
|
158
|
+
program
|
|
159
|
+
.command('practice-guard <id>')
|
|
160
|
+
.description('PreToolUse/Stop hook: level-aware best-practice gate (fail-open-loud)')
|
|
161
|
+
.option('--stdin', 'read the PreToolUse JSON payload from stdin')
|
|
162
|
+
.option('--project <slug>')
|
|
163
|
+
.action((id, opts) => (0, practice_guard_1.practiceGuard)(id, opts));
|
|
164
|
+
program
|
|
165
|
+
.command('override <id>')
|
|
166
|
+
.description('grant a short-lived, attributed bypass for a best-practice gate')
|
|
167
|
+
.option('--reason <text>', 'why the gate is being overridden (required; attributed to the bus)')
|
|
168
|
+
.option('--project <slug>')
|
|
169
|
+
.action((id, opts) => (0, override_1.override)(id, opts));
|
|
145
170
|
program
|
|
146
171
|
.command('watch')
|
|
147
172
|
.description('SessionStart-launched detached long-poll for directed halts (fail-open, self-healing)')
|
|
@@ -233,7 +258,11 @@ program
|
|
|
233
258
|
.option('--yes', 'confirm onboarding non-interactively (required for agents/CI)')
|
|
234
259
|
.option('--commit', 'commit ONLY the convene files as one isolated commit (never `git add -A`)')
|
|
235
260
|
.option('--offline', 'write local files only (no API calls)')
|
|
236
|
-
.
|
|
261
|
+
.option('--tier <names>', 'best practices: comma-separated tiers to adopt (essentials,recommended,advanced)')
|
|
262
|
+
.option('--practice <id[=level]>', 'best practice to adopt (id or id=level; repeatable)', (v, acc) => (acc.push(v), acc), [])
|
|
263
|
+
.option('--all-practices', 'adopt every catalog best practice at its default level')
|
|
264
|
+
.option('--no-practices', 'adopt no best practices (skip the catalog + interactive picker)')
|
|
265
|
+
.action((opts) => (0, init_1.init)(withPracticeOpts(opts)));
|
|
237
266
|
program
|
|
238
267
|
.command('off-board')
|
|
239
268
|
.alias('offboard')
|
|
@@ -264,7 +293,11 @@ program
|
|
|
264
293
|
.option('--force', 'commit a join token even if the repo looks public')
|
|
265
294
|
.option('--yes', 'confirm onboarding non-interactively (required for agents/CI)')
|
|
266
295
|
.option('--commit', 'commit ONLY the convene files as one isolated commit')
|
|
267
|
-
.
|
|
296
|
+
.option('--tier <names>', 'best practices: comma-separated tiers to adopt (essentials,recommended,advanced)')
|
|
297
|
+
.option('--practice <id[=level]>', 'best practice to adopt (id or id=level; repeatable)', (v, acc) => (acc.push(v), acc), [])
|
|
298
|
+
.option('--all-practices', 'adopt every catalog best practice at its default level')
|
|
299
|
+
.option('--no-practices', 'adopt no best practices (skip the catalog + interactive picker)')
|
|
300
|
+
.action((opts) => (0, setup_1.setup)(withPracticeOpts(opts)));
|
|
268
301
|
program
|
|
269
302
|
.command('join')
|
|
270
303
|
.description('self-provision: redeem a project join token for your own key + hook')
|
|
@@ -283,6 +316,14 @@ program
|
|
|
283
316
|
.option('--yes')
|
|
284
317
|
.option('--offline')
|
|
285
318
|
.action((opts) => (0, migrate_1.migrate)(opts));
|
|
319
|
+
program
|
|
320
|
+
.command('update')
|
|
321
|
+
.description('check for + apply best-practices catalog updates (review in your working tree; never auto-commits)')
|
|
322
|
+
.option('--apply', 're-materialize adopted practices to the live catalog (default: dry run)')
|
|
323
|
+
.option('--auto-patch', 'limit an unattended --apply to patch-only bumps')
|
|
324
|
+
.option('--force', 're-materialize MAJOR bumps and locally-edited (drifted) practices too')
|
|
325
|
+
.option('--project <slug>', 'project slug (defaults to .convene/project.json)')
|
|
326
|
+
.action((opts) => (0, update_1.update)(opts));
|
|
286
327
|
program.command('doctor').description('diagnose setup').option('--fix', 'attempt safe fixes').action((opts) => (0, auth_1.doctor)(opts));
|
|
287
328
|
program.parseAsync(process.argv).catch((err) => {
|
|
288
329
|
process.stderr.write(`convene: ${err?.message || err}\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "convene-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Convene CLI — AI development coordination bus client + UserPromptSubmit hook. Install: npm i -g convene-cli; then `convene setup`.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://dev.convene.live",
|