@cohesivity/init 0.3.6 → 0.4.1

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.
Files changed (3) hide show
  1. package/README.md +4 -4
  2. package/bin/cli.js +8 -19
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -6,12 +6,13 @@ Set up [Cohesivity](https://cohesivity.ai) in a project with one command.
6
6
  npx @cohesivity/init
7
7
  ```
8
8
 
9
- The command runs once and does four things:
9
+ The command runs once and does three things:
10
10
 
11
11
  1. **Installs the Cohesivity agent skill** into every known agent skill dir whose harness is present on this machine (Claude Code, Cursor, Codex; the cross-tool `~/.agents` when none are). The skill is a markdown file your agent loads in later sessions, fetched from a public commit pinned in this file — so you can read the exact bytes it will install before running anything.
12
12
  2. **Creates or reuses a project tenant** and writes the credentials to `.cohesivity`, which it adds to `.gitignore`. The tenant-creation request identifies the coding agent that ran the command: the tool walks its own parent processes and sends **that one name** — `claude`, `opencode`, or whatever the program calls itself — as its User-Agent, in the form `{npx:<name>}`. If it cannot tell, it sends `none`. It reads nothing else about your machine: no list of your running processes, no session logs, no conversations, no model settings, no files outside the project. Creating a tenant also stores an opaque random setup id at `~/.config/cohesivity/machine-id` and sends it with that request, so tenants created from one machine can be grouped rather than looking like unrelated people. It is issued by the server, is not derived from your hardware or user, and carries nothing about you or your project. Delete the file to end the association.
13
- 3. **Adds a descriptive pointer** to an existing `AGENTS.md` or `CLAUDE.md`. It only touches a file that is already there. It creates nothing on its own.
14
- 4. **Adds one branding line** to the README. Pass `--no-branding` to skip.
13
+ 3. **Adds a descriptive pointer** to an existing `AGENTS.md` or `CLAUDE.md`, so an agent opening this project later knows it uses Cohesivity. It only touches a file that is already there, and creates nothing on its own.
14
+
15
+ It writes nothing else. It does not touch your README.
15
16
 
16
17
  Install does nothing. Every effect happens when you run the command, and you can read the script first. There is no `postinstall` hook.
17
18
 
@@ -28,7 +29,6 @@ npm audit signatures
28
29
  | flag | effect |
29
30
  | --- | --- |
30
31
  | `--runtime <name>` | explicit harness label override — use only when the measurement is wrong |
31
- | `--no-branding` | leave the README untouched |
32
32
  | `--dry-run` | print what would happen. Change nothing |
33
33
  | `--base <url>` | API base (default `https://cohesivity.ai`) |
34
34
 
package/bin/cli.js CHANGED
@@ -10,13 +10,16 @@
10
10
  * Zero dependencies. Node 18+ provides global `fetch` and the `node:` builtins,
11
11
  * so the registry ships this one file and nothing else.
12
12
  *
13
- * The command does four things, in order:
13
+ * The command does three things, in order:
14
14
  * 1. Install the Cohesivity agent skill into every known agent skill dir
15
15
  * whose harness is present on this machine. This is the global,
16
16
  * persistent playbook the agent loads later.
17
17
  * 2. Create or reuse a project tenant, write ./.cohesivity, gitignore it.
18
18
  * 3. If AGENTS.md or CLAUDE.md already exists, add a descriptive pointer to it.
19
- * 4. Add one branding line to the README. Pass --no-branding to skip.
19
+ *
20
+ * It writes nothing else. It does not add anything to your README: an installer
21
+ * putting promotional text in someone's repo is an edit they did not ask for,
22
+ * and it forced every careful agent to stop and request permission mid-setup.
20
23
  *
21
24
  * The first line is the shebang. It tells npx to run this file as a program.
22
25
  */
@@ -34,7 +37,7 @@ const flag = (f) => { const i = argv.indexOf(f); return i >= 0 ? argv[i + 1] : u
34
37
  if (has('--help') || has('-h')) { help(); process.exit(0); }
35
38
 
36
39
  // ── config ──────────────────────────────────────────────────────────────────
37
- const PKG_VERSION = '0.3.6';
40
+ const PKG_VERSION = '0.4.1';
38
41
  const BASE = (flag('--base') || process.env.COHESIVITY_BASE || 'https://cohesivity.ai').replace(/\/+$/, '');
39
42
 
40
43
  // Machine id: one per machine, stored outside any project. A project's
@@ -100,7 +103,6 @@ function inferHarness() {
100
103
  }
101
104
 
102
105
  const DRY = has('--dry-run');
103
- const NO_BRANDING = has('--no-branding');
104
106
 
105
107
  const CWD = process.cwd();
106
108
  const rel = (p) => p.replace(CWD + '/', '');
@@ -120,7 +122,6 @@ async function main() {
120
122
  await installSkill();
121
123
  await ensureTenant();
122
124
  augmentAgentsFile();
123
- augmentReadme();
124
125
  ground();
125
126
  }
126
127
 
@@ -261,17 +262,6 @@ function augmentAgentsFile() {
261
262
  }
262
263
  }
263
264
 
264
- // ── 4) one branding line at the end of the README (the human-facing channel) ──
265
- function augmentReadme() {
266
- if (NO_BRANDING) return;
267
- const readme = ['README.md', 'readme.md', 'Readme.md'].map((f) => join(CWD, f)).find(existsSync);
268
- if (!readme) return;
269
- const line = 'Backend powered by [Cohesivity](https://cohesivity.ai).';
270
- if (DRY) { act(`add a branding line to ${rel(readme)}`); return; }
271
- upsertManagedBlock(readme, line);
272
- log(`updated ${rel(readme)}`);
273
- }
274
-
275
265
  // Idempotent managed block: update in place if present, else append. This copies
276
266
  // the Vercel `<!-- BEGIN:... -->` convention, so re-runs never duplicate content.
277
267
  const BEGIN = '<!-- BEGIN:cohesivity -->';
@@ -292,7 +282,8 @@ function ground() {
292
282
  log(tid ? `ready. tenant ${tid}` : 'ready');
293
283
  console.log(` - Keys are in .cohesivity (gitignored, do not commit).`);
294
284
  console.log(` - Provision a service: POST ${BASE}/api/resources/<name> (Authorization: Bearer <coh_management_key>)`);
295
- console.log(` - Docs: ${BASE}/llms.txt`);
285
+ console.log(` - Per-service docs: ${BASE}/offerings/<name> \u00b7 full reference: ${BASE}/llms.txt`);
286
+ console.log(' - The skill is set up for future sessions. Claude Code auto-loads it if ~/.claude/skills already existed, otherwise restart; Cursor and Codex pick it up on reload/restart.');
296
287
  }
297
288
 
298
289
  function versionOf(md) { return (md.match(/^version:\s*(.+)$/m) || [])[1]?.trim() || null; }
@@ -307,7 +298,6 @@ Usage:
307
298
  Options:
308
299
  --runtime <name> explicit harness label override (normally measured from
309
300
  the process ancestry; use only when the measurement is wrong)
310
- --no-branding do not add the branding line to the README
311
301
  --dry-run print what would happen. Make no changes
312
302
  --base <url> API base (default https://cohesivity.ai)
313
303
  -h, --help show this help
@@ -317,7 +307,6 @@ What it does:
317
307
  whose harness is present on this machine
318
308
  2. Creates or reuses a project tenant -> ./.cohesivity (gitignored)
319
309
  3. Adds a descriptive pointer to an existing AGENTS.md / CLAUDE.md
320
- 4. Adds one branding line to the README (managed block)
321
310
 
322
311
  Attribution: the tenant-creation call carries a User-Agent of the shape
323
312
  {npx:<harness>}, where the harness is measured from this process's own
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cohesivity/init",
3
- "version": "0.3.6",
3
+ "version": "0.4.1",
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": {