@dopemarkets/agent 0.1.1 → 0.1.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/dist/index.js +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +13 -9
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const markets_js_1 = require("./commands/markets.js");
|
|
|
15
15
|
const stack_js_1 = require("./commands/stack.js");
|
|
16
16
|
const agent_key_js_1 = require("./commands/agent_key.js");
|
|
17
17
|
const mcp_js_1 = require("./commands/mcp.js");
|
|
18
|
-
const VERSION = '0.1.
|
|
18
|
+
const VERSION = '0.1.2';
|
|
19
19
|
const HELP = `dope — DOPE Agent Mode CLI (v${VERSION})
|
|
20
20
|
|
|
21
21
|
Usage:
|
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Banner printed
|
|
2
|
+
// Banner printed after `npm install [-g] @dopemarkets/agent`.
|
|
3
3
|
//
|
|
4
4
|
// Goal: replace npm's opaque "changed N packages in Ns" with an
|
|
5
5
|
// unambiguous "the install succeeded — here's what to do next" line.
|
|
6
6
|
// Non-developers won't otherwise know the install worked.
|
|
7
7
|
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
8
|
+
// Note: we tried gating this on `process.env.npm_config_global === 'true'`
|
|
9
|
+
// so the banner would only appear on `-g` installs and stay quiet when
|
|
10
|
+
// the package was pulled in as a transitive dep. In practice npm 11
|
|
11
|
+
// does not reliably set that env var for postinstall scripts, so the
|
|
12
|
+
// banner never fired on the install path that actually matters.
|
|
13
|
+
// `@dopemarkets/agent` is a CLI; the global install is overwhelmingly
|
|
14
|
+
// the intended use, and a stray banner on a rare local install is not
|
|
15
|
+
// worth losing the signal on the common path. Always print.
|
|
16
|
+
//
|
|
17
|
+
// Rules that remain:
|
|
18
|
+
// - Print to stderr so it sits alongside npm's own install chatter
|
|
19
|
+
// and never contaminates a script's stdout.
|
|
13
20
|
// - Never throw. Postinstall failures bubble up as install failures,
|
|
14
21
|
// and a banner is not worth breaking somebody's machine over.
|
|
15
22
|
|
|
16
23
|
'use strict';
|
|
17
24
|
|
|
18
25
|
try {
|
|
19
|
-
const isGlobal = process.env.npm_config_global === 'true';
|
|
20
|
-
if (!isGlobal) return;
|
|
21
|
-
|
|
22
26
|
const lines = [
|
|
23
27
|
'',
|
|
24
28
|
'DOPE Agent Mode installed.',
|