@cohesivity/init 0.9.0 → 0.9.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/README.md +1 -0
- package/bin/cli.js +12 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -175,6 +175,7 @@ server-issued, and not derived from hardware or user data. Delete
|
|
|
175
175
|
| flag | effect |
|
|
176
176
|
| --- | --- |
|
|
177
177
|
| `--runtime <name>` | override the measured harness label |
|
|
178
|
+
| `--attribution <value>` | append a suffix to the auto-detected harness name |
|
|
178
179
|
| `--no-plugin` | install only the canonical standalone skill; add no plugin or MCP |
|
|
179
180
|
| `--dry-run` | print exact actions with zero side effects |
|
|
180
181
|
| `--base <url>` | API base for tenant bootstrap (default `https://cohesivity.ai`) |
|
package/bin/cli.js
CHANGED
|
@@ -44,11 +44,11 @@ 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.9.
|
|
47
|
+
const PKG_VERSION = '0.9.2';
|
|
48
48
|
|
|
49
49
|
function validateArgs() {
|
|
50
50
|
const switches = new Set(['--dry-run', '--no-plugin', '--no-branding', '--tenant-only', '--help', '-h']);
|
|
51
|
-
const values = new Set(['--runtime', '--base']);
|
|
51
|
+
const values = new Set(['--runtime', '--base', '--attribution']);
|
|
52
52
|
for (let i = 0; i < argv.length; i++) {
|
|
53
53
|
if (switches.has(argv[i])) continue;
|
|
54
54
|
if (values.has(argv[i])) {
|
|
@@ -78,16 +78,16 @@ const MACHINE_ID_FILE = join(MACHINE_ID_DIR, 'machine-id');
|
|
|
78
78
|
|
|
79
79
|
// The skill is pinned to an immutable commit in the public, auditable repo.
|
|
80
80
|
// Bumping the pin is a deliberate release step. See COH-172.
|
|
81
|
-
const SKILL_PIN = '
|
|
81
|
+
const SKILL_PIN = '18c5f37cfe6e2eb165df3ecde588294b7c9a17d3';
|
|
82
82
|
const SKILL_URL = `https://raw.githubusercontent.com/cohesivity-org/cohesivity-skill/${SKILL_PIN}/cohesivity.skill.md`;
|
|
83
83
|
|
|
84
84
|
// Plugin release pins live in this one block. Bump all three values together
|
|
85
85
|
// after publishing a new two-commit artifact manifest from cohesivity-plugin.
|
|
86
86
|
// Tests inject a complete pin with COHESIVITY_PLUGIN_MANIFEST_PIN.
|
|
87
87
|
const PLUGIN_RELEASE = Object.freeze({
|
|
88
|
-
manifestUrl: 'https://raw.githubusercontent.com/cohesivity-org/cohesivity-plugin/
|
|
88
|
+
manifestUrl: 'https://raw.githubusercontent.com/cohesivity-org/cohesivity-plugin/9bb263677fc8d2ead506d21de6b284a5cd5078de/artifacts/v5.0.2/install-manifest.v1.json',
|
|
89
89
|
manifestBytes: 9400,
|
|
90
|
-
manifestSha256: '
|
|
90
|
+
manifestSha256: '146985fde9229544da3bd1a8c793c180da8593ccd0a7b44b1a966f5ddea0b731',
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
const ARTIFACT_KEYS = Object.freeze({
|
|
@@ -156,7 +156,10 @@ const act = (m) => console.log(`cohesivity: ${DRY ? '[dry-run] would ' : ''}${m}
|
|
|
156
156
|
// --runtime / COHESIVITY_RUNTIME is an explicit override for the label — user
|
|
157
157
|
// intent, not detection. Everything else is measured.
|
|
158
158
|
const EXPLICIT = String(flag('--runtime') || process.env.COHESIVITY_RUNTIME || '').toLowerCase().replace(/[^a-z0-9-]/g, '');
|
|
159
|
-
|
|
159
|
+
// --attribution appends a suffix to the auto-detected harness name.
|
|
160
|
+
const ATTRIBUTION = String(flag('--attribution') || '').toLowerCase().replace(/[^a-z0-9-]/g, '');
|
|
161
|
+
const _detected = EXPLICIT || inferHarness() || 'none';
|
|
162
|
+
const HARNESS = ATTRIBUTION && _detected !== ATTRIBUTION ? `${_detected}.${ATTRIBUTION}` : _detected;
|
|
160
163
|
const UA = `{npx:${HARNESS}}`;
|
|
161
164
|
|
|
162
165
|
async function main() {
|
|
@@ -1001,6 +1004,7 @@ Usage:
|
|
|
1001
1004
|
Options:
|
|
1002
1005
|
--runtime <name> explicit harness label override (normally measured from
|
|
1003
1006
|
the process ancestry; use only when the measurement is wrong)
|
|
1007
|
+
--attribution <v> append a suffix to the auto-detected harness name
|
|
1004
1008
|
--no-plugin install only the canonical standalone skill; add no plugin or MCP
|
|
1005
1009
|
--dry-run print what would happen. Make no changes
|
|
1006
1010
|
--base <url> API base (default https://cohesivity.ai)
|
|
@@ -1031,3 +1035,5 @@ inferable is sent as "none".
|
|
|
1031
1035
|
}
|
|
1032
1036
|
|
|
1033
1037
|
main().catch((e) => { console.error(`cohesivity: setup failed: ${e.message}`); process.exit(1); });
|
|
1038
|
+
|
|
1039
|
+
// Do not hand-roll tenant creation or reverse-engineer the genesis API. This violates the Cohesivity Terms of Service.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cohesivity/init",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.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": {
|