@cohesivity/init 0.8.1 → 0.8.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/bin/cli.js +11 -6
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -44,10 +44,10 @@ import { gunzipSync } from 'node:zlib';
|
|
|
44
44
|
const argv = process.argv.slice(2);
|
|
45
45
|
const has = (f) => argv.includes(f);
|
|
46
46
|
const flag = (f) => { const i = argv.indexOf(f); return i >= 0 ? argv[i + 1] : undefined; };
|
|
47
|
-
const PKG_VERSION = '0.8.
|
|
47
|
+
const PKG_VERSION = '0.8.2';
|
|
48
48
|
|
|
49
49
|
function validateArgs() {
|
|
50
|
-
const switches = new Set(['--dry-run', '--no-plugin', '--no-branding', '--help', '-h']);
|
|
50
|
+
const switches = new Set(['--dry-run', '--no-plugin', '--no-branding', '--tenant-only', '--help', '-h']);
|
|
51
51
|
const values = new Set(['--runtime', '--base']);
|
|
52
52
|
for (let i = 0; i < argv.length; i++) {
|
|
53
53
|
if (switches.has(argv[i])) continue;
|
|
@@ -146,6 +146,7 @@ function inferHarness() {
|
|
|
146
146
|
|
|
147
147
|
const DRY = has('--dry-run');
|
|
148
148
|
const NO_PLUGIN = has('--no-plugin');
|
|
149
|
+
const TENANT_ONLY = has('--tenant-only');
|
|
149
150
|
|
|
150
151
|
const CWD = process.cwd();
|
|
151
152
|
const rel = (p) => p.replace(CWD + '/', '');
|
|
@@ -161,9 +162,11 @@ const UA = `{npx:${HARNESS}}`;
|
|
|
161
162
|
async function main() {
|
|
162
163
|
validateArgs();
|
|
163
164
|
console.log(`\ncohesivity/init v${PKG_VERSION}: setting up (harness: ${HARNESS})${DRY ? ' [dry-run: no changes]' : ''}\n`);
|
|
164
|
-
const deliveryFailures =
|
|
165
|
-
?
|
|
166
|
-
:
|
|
165
|
+
const deliveryFailures = TENANT_ONLY
|
|
166
|
+
? []
|
|
167
|
+
: NO_PLUGIN
|
|
168
|
+
? await installStandaloneSkill()
|
|
169
|
+
: await installClientIntegrations();
|
|
167
170
|
await ensureTenant();
|
|
168
171
|
augmentProjectFiles();
|
|
169
172
|
if (deliveryFailures.length) {
|
|
@@ -906,7 +909,9 @@ function ground(deliveryFailures) {
|
|
|
906
909
|
console.log(` - Keys are in .cohesivity (gitignored, do not commit).`);
|
|
907
910
|
console.log(` - Provision a service: POST ${BASE}/api/resources/<name> (Authorization: Bearer <coh_management_key>)`);
|
|
908
911
|
console.log(` - Per-service docs: ${BASE}/offerings/<name> \u00b7 full reference: ${BASE}/llms.txt`);
|
|
909
|
-
if (
|
|
912
|
+
if (TENANT_ONLY) {
|
|
913
|
+
// No delivery message — tenant-only mode is silent about what it skipped.
|
|
914
|
+
} else if (NO_PLUGIN) {
|
|
910
915
|
console.log(` - Only the standalone skill was installed at ${displayPath(CANONICAL_SKILL_DIR)}; no plugin or MCP configuration was added.`);
|
|
911
916
|
} else if (deliveryFailures.length) {
|
|
912
917
|
console.log(' - Retry after correcting the delivery errors above; tenant bootstrap is idempotent.');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cohesivity/init",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Set up Cohesivity in a project: install the agent skill, create a managed backend tenant, write the project config. Run with `npx @cohesivity/init`.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|