@illuminis/comprism 0.1.1 → 0.1.3

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 CHANGED
@@ -4,26 +4,33 @@ The half of CompletionPrism that runs on your machine. It sits between the tool
4
4
  you already use and the AI provider, records what finishing your work actually
5
5
  cost, and changes nothing about what your tool does.
6
6
 
7
+ ## Install
8
+
7
9
  ```bash
8
- npm install && npm run build
10
+ npm install -g @illuminis/comprism
11
+ comprism login
12
+ ```
9
13
 
10
- export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY
11
- node out/cli.js setup
12
- node out/cli.js session
13
- node out/cli.js report
14
+ That is the whole install. It configures itself, including the one line it adds
15
+ to your shell profile, and it says what it touched. npm hides that message by
16
+ default, so add `--foreground-scripts` to the install if you want to read it.
17
+
18
+ No API key to export. The keys live in your workspace, and every decision is
19
+ made on our servers.
20
+
21
+ ```bash
22
+ comprism check # what this machine still needs, and how to add it
23
+ comprism uninstall # takes the line back out
14
24
  ```
15
25
 
16
26
  ## The coding agent
17
27
 
18
- `comprism agent` is a coding agent in your terminal. It reads your project,
19
- changes files, runs commands, runs your tests, and shows you every change before
20
- it makes it.
28
+ `comprism work` reads your project, changes files, runs commands, runs your
29
+ tests, and shows you every change before it makes it.
21
30
 
22
31
  ```bash
23
- npm install -g @illuminis/comprism
24
- comprism login # once, per machine
25
32
  cd ~/your-project
26
- comprism agent "the tests are failing, work out why and fix it"
33
+ comprism work "the tests are failing, work out why and fix it"
27
34
  ```
28
35
 
29
36
  **What makes it different from the others.** Every step is routed to whichever
@@ -63,7 +70,7 @@ production. Those are yours to do.
63
70
  ### Before you let it change anything
64
71
 
65
72
  ```bash
66
- comprism agent --plan "rename the parser module and update every caller"
73
+ comprism work --plan "rename the parser module and update every caller"
67
74
  ```
68
75
 
69
76
  It reads what it needs, tells you what it would do, and changes nothing. The
@@ -85,7 +92,7 @@ ran a command, the undo says so plainly rather than claiming to have reversed it
85
92
  ### Carrying on tomorrow
86
93
 
87
94
  ```bash
88
- comprism agent --resume <job-id> "also add a test for the empty case"
95
+ comprism work --resume <job-id> "also add a test for the empty case"
89
96
  ```
90
97
 
91
98
  It continues the conversation rather than starting a new one, so it already knows
@@ -94,7 +101,7 @@ what it read and decided.
94
101
  ### In a script, or in continuous integration
95
102
 
96
103
  ```bash
97
- comprism agent --yes --mode auto_edit "run the linter and fix what it reports"
104
+ comprism work --yes --mode auto_edit "run the linter and fix what it reports"
98
105
  echo $? # 0 if it finished, non-zero if it did not
99
106
  ```
100
107
 
@@ -108,8 +115,8 @@ By default, whichever finishes each step for least. Pin one when you want to
108
115
  decide yourself:
109
116
 
110
117
  ```bash
111
- comprism agent --model gpt-5 "..." # or any model your account can reach
112
- comprism agent --max-spend 2.00 "..." # stop here rather than running on
118
+ comprism work --model gpt-5 "..." # or any model your account can reach
119
+ comprism work --max-spend 2.00 "..." # stop here rather than running on
113
120
  ```
114
121
 
115
122
  Four providers are wired: Anthropic, OpenAI, Google and xAI. Which ones you can
@@ -123,13 +130,13 @@ Node 22 or newer, and a workspace you have signed in to with `comprism login`.
123
130
 
124
131
  ## Instrument a tool you already use
125
132
 
126
- ```bash
127
- node out/cli.js proxy
128
- export ANTHROPIC_BASE_URL=http://127.0.0.1:8787
129
- ```
133
+ Nothing to do. The install configured this, by adding one fenced line to your
134
+ shell profile that points your existing tools at the recorder. Open a new
135
+ terminal and `claude` is already measured.
130
136
 
131
137
  Requests are forwarded to the provider byte for byte. Your key is forwarded,
132
- never read or stored. Unset the variable and we are gone, with nothing to undo.
138
+ never read or stored. `comprism uninstall` takes the line back out and every
139
+ tool goes straight to its provider again.
133
140
 
134
141
  ## Whose Anthropic account pays
135
142
 
@@ -138,7 +145,7 @@ surface can carry a credential.
138
145
 
139
146
  | How you work | Where the key comes from | Stored anywhere? |
140
147
  |---|---|---|
141
- | `comprism session`, `comprism proxy`, or an IDE pointed at your workspace | this machine, per request | no |
148
+ | `comprism`, the interception the install configured, or an IDE pointed at your workspace | this machine, per request | no |
142
149
  | The developer API and the SDKs | the `X-Anthropic-Key` header, per request | no |
143
150
  | Claude Desktop and claude.ai | your workspace's own stored key | yes, encrypted, and only this one |
144
151
 
@@ -148,16 +155,14 @@ answering those prompts at all means the workspace holding a key. A workspace
148
155
  that holds none gets its connector answers refused - never billed to illuminis.
149
156
 
150
157
  ```bash
151
- node out/cli.js key # whose account pays, here and in your workspace
152
- node out/cli.js key push # send this machine's key, for the connector surface
153
- node out/cli.js key clear # take it back out
158
+ comprism keys # whose account pays, here and in your workspace
154
159
  ```
155
160
 
156
- `push` is the one command that deliberately sends a provider key anywhere. It
157
- sends the key this machine already resolves, over TLS, to the workspace you are
158
- signed in to; Anthropic validates it before it is stored; nothing is written to
159
- disk here either way. An administrator can do the same in the app, under Policy
160
- and Data Controls.
161
+ Sending a key to your workspace, for the connector row above, is deliberate and
162
+ it is the one action that puts a provider key anywhere. It goes over TLS to the
163
+ workspace you are signed in to, the provider validates it before it is stored,
164
+ and nothing is written to disk here either way. An administrator can do the same
165
+ in the app, under Policy and Data Controls.
161
166
 
162
167
  ## The stats footer
163
168
 
@@ -192,11 +197,9 @@ failure is logged rather than shown. Nothing is added at all when the turn ends
192
197
  in a tool call, a refusal, a truncation, an error event, an empty response, or a
193
198
  model with no published price.
194
199
 
195
- ```bash
196
- node out/cli.js footer # what it is doing now
197
- node out/cli.js footer off # byte-faithful in both directions
198
- node out/cli.js footer on
199
- ```
200
+ Switch it off with `"enabled": false` under `footer` in
201
+ `~/.comprism/config.json`, which makes the proxy byte faithful in both
202
+ directions.
200
203
 
201
204
  ### Configuring pricing, the baseline and the template
202
205
 
@@ -6,8 +6,7 @@
6
6
  * behavior behind them changes, never on a whim, because consumers select by
7
7
  * version and old records keep meaning what they meant.
8
8
  */
9
- /** The package version. Stamped on every row the Companion writes. */
10
- export declare const COMPRISM_VERSION = "0.1.0";
9
+ export declare const COMPRISM_VERSION: string;
11
10
  /** The structural classifier. Bump when a signal is added, removed or retuned. */
12
11
  export declare const CLASSIFIER_VERSION = "structural-v1";
13
12
  /**
@@ -9,8 +9,27 @@
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.ESTIMATOR_VERSION = exports.POLICY_VERSION = exports.CLASSIFIER_VERSION = exports.COMPRISM_VERSION = void 0;
12
- /** The package version. Stamped on every row the Companion writes. */
13
- exports.COMPRISM_VERSION = '0.1.0';
12
+ /**
13
+ * The package version. Stamped on every row the Companion writes.
14
+ *
15
+ * Read from the package's own manifest rather than typed here. It was typed
16
+ * here once, and a published 0.1.1 went on reporting itself as 0.1.0 to every
17
+ * customer and onto every record it wrote, which is the one number a version
18
+ * stamp exists to get right. A literal drifts the moment `npm version` runs;
19
+ * the manifest cannot.
20
+ */
21
+ function packageVersion() {
22
+ try {
23
+ // Two levels up from out/lib, which is where the manifest sits in both the
24
+ // built package and a checkout.
25
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
26
+ return String(require('../../package.json').version || '0.0.0');
27
+ }
28
+ catch {
29
+ return '0.0.0';
30
+ }
31
+ }
32
+ exports.COMPRISM_VERSION = packageVersion();
14
33
  /** The structural classifier. Bump when a signal is added, removed or retuned. */
15
34
  exports.CLASSIFIER_VERSION = 'structural-v1';
16
35
  /**
@@ -61,8 +61,11 @@ async function main() {
61
61
  ' Open a new terminal and just work:',
62
62
  ' claude your tools, instrumented, unchanged',
63
63
  ' comprism our own session',
64
- ' comprism report what finishing your work cost',
64
+ ' comprism check what this machine still needs',
65
65
  '',
66
+ ...(report.baseUrl
67
+ ? [` What your work cost: ${report.baseUrl}`, '']
68
+ : []),
66
69
  ' If our recorder is ever down your tools are unaffected. Undo with `comprism uninstall`.',
67
70
  '',
68
71
  ].join('\n'));
package/out/thin.js CHANGED
@@ -86,6 +86,7 @@ function usage() {
86
86
  ['comprism status', 'is this machine signed in, and to what'],
87
87
  ['comprism check', 'what this machine still needs, and how to add it'],
88
88
  ['comprism logout', 'sign out, and revoke this machine\'s key'],
89
+ ['comprism uninstall', 'undo the setup this machine got at install'],
89
90
  ]));
90
91
  out();
91
92
  out(ui.c.dim(` v${version_1.COMPRISM_VERSION} · every decision is made on our servers`));
@@ -229,6 +230,31 @@ async function main() {
229
230
  out();
230
231
  return;
231
232
  }
233
+ // The undo. The install edits a shell profile, and the message it prints
234
+ // has always promised this command could take the line back out. The
235
+ // function that does it was written and exported and never wired to a
236
+ // word, so a customer following our own instruction got "there is no
237
+ // command called uninstall" and was left to edit their profile by hand.
238
+ case 'uninstall': {
239
+ const { uninstall } = await Promise.resolve().then(() => __importStar(require('./commands/install')));
240
+ const report = uninstall();
241
+ out();
242
+ out(ui.banner('Removed from this machine'));
243
+ out();
244
+ if (report.profilesCleaned.length === 0) {
245
+ out(ui.c.dim(' Nothing to take out: no shell profile carried our line.'));
246
+ }
247
+ else {
248
+ for (const profile of report.profilesCleaned) {
249
+ out(` removed our line from ${profile}`);
250
+ }
251
+ }
252
+ out();
253
+ out(ui.c.dim(' Every AI tool on this machine now talks straight to its provider.'));
254
+ out(ui.c.dim(' To remove the command itself: npm uninstall -g @illuminis/comprism'));
255
+ out();
256
+ return;
257
+ }
232
258
  case '--version':
233
259
  case '-v':
234
260
  out(version_1.COMPRISM_VERSION);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@illuminis/comprism",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CompletionPrism Companion. Records what finishing a piece of work actually costs - every attempt, and the human time spent noticing and repairing the ones that failed.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,