@dopemarkets/agent 0.1.0 → 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 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.0';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dopemarkets/agent",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "DOPE Agent Mode CLI. Run agentic Stack trades on DOPE from the terminal.",
5
5
  "bin": {
6
6
  "dope": "bin/dope.js"
@@ -10,7 +10,8 @@
10
10
  "scripts": {
11
11
  "build": "tsc -p tsconfig.json",
12
12
  "clean": "rm -rf dist",
13
- "dev": "node --import tsx src/index.ts"
13
+ "dev": "node --import tsx src/index.ts",
14
+ "postinstall": "node scripts/postinstall.js"
14
15
  },
15
16
  "dependencies": {
16
17
  "@dopemarkets/agent-client": "0.1.0"
@@ -26,6 +27,7 @@
26
27
  "files": [
27
28
  "dist",
28
29
  "bin",
30
+ "scripts",
29
31
  "README.md"
30
32
  ],
31
33
  "publishConfig": {
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ // Banner printed after `npm install [-g] @dopemarkets/agent`.
3
+ //
4
+ // Goal: replace npm's opaque "changed N packages in Ns" with an
5
+ // unambiguous "the install succeeded — here's what to do next" line.
6
+ // Non-developers won't otherwise know the install worked.
7
+ //
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.
20
+ // - Never throw. Postinstall failures bubble up as install failures,
21
+ // and a banner is not worth breaking somebody's machine over.
22
+
23
+ 'use strict';
24
+
25
+ try {
26
+ const lines = [
27
+ '',
28
+ 'DOPE Agent Mode installed.',
29
+ '',
30
+ ' Next: dope login',
31
+ ' Docs: https://dope.markets/agent',
32
+ '',
33
+ 'Run `dope --help` to see every command.',
34
+ '',
35
+ ];
36
+ process.stderr.write(lines.join('\n'));
37
+ } catch {
38
+ // Intentionally swallow. A banner is never worth a failed install.
39
+ }