sandoichi 0.1.2 → 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
@@ -1,25 +1,21 @@
1
1
  # sandoichi
2
2
 
3
- Cuts what Claude Code and Codex charge you to re-read their own output. Redacts secrets, caps oversized tool results, and, if you turn it on, trims request history before it's sent — all without calling an LLM itself.
3
+ Sando's local JavaScript library for reducing repeated tool-output context.
4
4
 
5
- This is the core library (`@sando/core` renamed `sandoichi` for npm). For the Claude Code plugin, Codex plugin, and provider proxy, see the [main repo](https://github.com/yuzushi-dev/Sando).
6
-
7
- ## Install
8
-
9
- ```sh
5
+ ```bash
10
6
  npm install sandoichi
11
7
  ```
12
8
 
13
- Requires Node.js `22.22.x`.
14
-
15
- ## Usage
16
-
17
9
  ```js
18
10
  import { optimizeToolOutput, createProviderProxy } from 'sandoichi';
19
11
  ```
20
12
 
21
- See [index.mjs](./index.mjs) for the full list of exports (tool-output optimization, provider request transforms, semantic compaction, metrics, status line rendering).
13
+ Telemetry is off by default. The npm install asks once for consent.
14
+
15
+ The Claude Code and Codex plugins are installed from the Yuzushi marketplace:
22
16
 
23
- ## License
17
+ ```text
18
+ /plugin install sando@yuzushi
19
+ ```
24
20
 
25
- MIT
21
+ MIT.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sandoichi",
3
- "version": "0.1.2",
4
- "description": "Cuts what Claude Code and Codex charge you to re-read their own output.",
3
+ "version": "0.1.3",
4
+ "description": "Reduce repeated tool-output context in Claude Code and Codex.",
5
5
  "license": "MIT",
6
6
  "author": "yuzushi",
7
7
  "repository": {
@@ -0,0 +1,28 @@
1
+ import path from 'node:path';
2
+
3
+ import { defaultTelemetryConfigPath, readTelemetryConfig } from './telemetry.mjs';
4
+
5
+ export function runSessionStart({
6
+ env = process.env,
7
+ stdout = process.stdout,
8
+ rootEnv = 'PLUGIN_ROOT',
9
+ } = {}) {
10
+ try {
11
+ const config = readTelemetryConfig(defaultTelemetryConfigPath(env));
12
+ if (config.prompted_consent_version > 0) {
13
+ stdout.write('{}\n');
14
+ return;
15
+ }
16
+ const pluginRoot = env[rootEnv] || path.resolve(import.meta.dirname, '..');
17
+ const cli = path.join(pluginRoot, 'lib', 'telemetry-cli.mjs');
18
+ stdout.write(`${JSON.stringify({
19
+ hookSpecificOutput: {
20
+ hookEventName: 'SessionStart',
21
+ systemMessage: 'Sando can send anonymous aggregate telemetry (opt-in, off by default). '
22
+ + `Run \`node "${cli}" enable\` to turn it on. Details: TELEMETRY.md`,
23
+ },
24
+ })}\n`);
25
+ } catch {
26
+ stdout.write('{}\n');
27
+ }
28
+ }