@invaro/opentax 0.2.2 → 0.3.0

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/bundle/index.js CHANGED
@@ -6891,7 +6891,7 @@ var require_dist = __commonJS({
6891
6891
  });
6892
6892
 
6893
6893
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
6894
- import process from "node:process";
6894
+ import process2 from "node:process";
6895
6895
 
6896
6896
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v4/core/core.js
6897
6897
  var NEVER = Object.freeze({
@@ -12952,7 +12952,7 @@ function serializeMessage(message) {
12952
12952
 
12953
12953
  // ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.29.0_zod@3.25.76/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
12954
12954
  var StdioServerTransport = class {
12955
- constructor(_stdin = process.stdin, _stdout = process.stdout) {
12955
+ constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
12956
12956
  this._stdin = _stdin;
12957
12957
  this._stdout = _stdout;
12958
12958
  this._readBuffer = new ReadBuffer();
@@ -13011,6 +13011,53 @@ var StdioServerTransport = class {
13011
13011
  }
13012
13012
  };
13013
13013
 
13014
+ // dist/phone-home.js
13015
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
13016
+ import { homedir } from "node:os";
13017
+ import { join } from "node:path";
13018
+ var VERSION = "0.3.0";
13019
+ var ENDPOINT = "https://opentax.invaro.ai/api/t";
13020
+ function optedOut() {
13021
+ return process.env.OPENTAX_TELEMETRY === "0" || process.env.OPENTAX_TELEMETRY === "false" || process.env.DO_NOT_TRACK === "1";
13022
+ }
13023
+ function firstRunNotice() {
13024
+ try {
13025
+ const dir = join(homedir(), ".config", "opentax");
13026
+ const flag = join(dir, "notice-shown");
13027
+ try {
13028
+ readFileSync(flag);
13029
+ return;
13030
+ } catch {
13031
+ }
13032
+ mkdirSync(dir, { recursive: true });
13033
+ writeFileSync(flag, String(Date.now()));
13034
+ process.stderr.write("opentax: anonymous usage ping enabled (event name + version + platform, nothing else).\n Disable with OPENTAX_TELEMETRY=0. Updates: https://opentax.invaro.ai\n");
13035
+ } catch {
13036
+ }
13037
+ }
13038
+ function phoneHome(event) {
13039
+ if (optedOut())
13040
+ return;
13041
+ firstRunNotice();
13042
+ try {
13043
+ const controller = new AbortController();
13044
+ const timer = setTimeout(() => controller.abort(), 600);
13045
+ void fetch(ENDPOINT, {
13046
+ method: "POST",
13047
+ headers: { "Content-Type": "application/json" },
13048
+ body: JSON.stringify({
13049
+ e: event,
13050
+ v: VERSION,
13051
+ os: process.platform,
13052
+ node: process.version.split(".")[0]
13053
+ }),
13054
+ signal: controller.signal
13055
+ }).catch(() => {
13056
+ }).finally(() => clearTimeout(timer));
13057
+ } catch {
13058
+ }
13059
+ }
13060
+
13014
13061
  // ../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
13015
13062
  var external_exports = {};
13016
13063
  __export(external_exports, {
@@ -36284,6 +36331,7 @@ function createServer() {
36284
36331
  }
36285
36332
 
36286
36333
  // dist/index.js
36334
+ phoneHome("mcp-stdio");
36287
36335
  var server = createServer();
36288
36336
  var transport = new StdioServerTransport();
36289
36337
  await server.connect(transport);
package/bundle/main.js CHANGED
@@ -45266,16 +45266,66 @@ function runCli(argv) {
45266
45266
  program2.parse(argv);
45267
45267
  }
45268
45268
 
45269
+ // dist/phone-home.js
45270
+ import { mkdirSync, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
45271
+ import { homedir } from "node:os";
45272
+ import { join } from "node:path";
45273
+ var VERSION = "0.3.0";
45274
+ var ENDPOINT = "https://opentax.invaro.ai/api/t";
45275
+ function optedOut() {
45276
+ return process.env.OPENTAX_TELEMETRY === "0" || process.env.OPENTAX_TELEMETRY === "false" || process.env.DO_NOT_TRACK === "1";
45277
+ }
45278
+ function firstRunNotice() {
45279
+ try {
45280
+ const dir = join(homedir(), ".config", "opentax");
45281
+ const flag = join(dir, "notice-shown");
45282
+ try {
45283
+ readFileSync6(flag);
45284
+ return;
45285
+ } catch {
45286
+ }
45287
+ mkdirSync(dir, { recursive: true });
45288
+ writeFileSync3(flag, String(Date.now()));
45289
+ process.stderr.write("opentax: anonymous usage ping enabled (event name + version + platform, nothing else).\n Disable with OPENTAX_TELEMETRY=0. Updates: https://opentax.invaro.ai\n");
45290
+ } catch {
45291
+ }
45292
+ }
45293
+ function phoneHome(event) {
45294
+ if (optedOut())
45295
+ return;
45296
+ firstRunNotice();
45297
+ try {
45298
+ const controller = new AbortController();
45299
+ const timer = setTimeout(() => controller.abort(), 600);
45300
+ void fetch(ENDPOINT, {
45301
+ method: "POST",
45302
+ headers: { "Content-Type": "application/json" },
45303
+ body: JSON.stringify({
45304
+ e: event,
45305
+ v: VERSION,
45306
+ os: process.platform,
45307
+ node: process.version.split(".")[0]
45308
+ }),
45309
+ signal: controller.signal
45310
+ }).catch(() => {
45311
+ }).finally(() => clearTimeout(timer));
45312
+ } catch {
45313
+ }
45314
+ }
45315
+
45269
45316
  // dist/main.js
45270
45317
  init_server3();
45271
45318
  var arg = process.argv[2];
45272
45319
  if (arg === "mcp" || arg === void 0 && !process.stdin.isTTY) {
45320
+ phoneHome("mcp-stdio");
45273
45321
  const server = createServer();
45274
45322
  await server.connect(new StdioServerTransport());
45275
45323
  } else if (arg === "mcp-http") {
45324
+ phoneHome("mcp-http");
45276
45325
  await Promise.resolve().then(() => (init_http(), http_exports));
45277
45326
  } else if (arg === void 0) {
45278
45327
  runCli([process.argv[0], process.argv[1], "--help"]);
45279
45328
  } else {
45329
+ phoneHome("cli");
45280
45330
  runCli();
45281
45331
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invaro/opentax",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "The verifiable US tax oracle: MCP server for AI agents + full CLI in one self-contained package — every answer cited to statute and machine-checkable",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -23,10 +23,10 @@
23
23
  "@modelcontextprotocol/sdk": "^1.12.0",
24
24
  "zod": "^3.24.0",
25
25
  "@invaro/opentax-compose": "0.1.0",
26
+ "@invaro/opentax-solve": "0.1.0",
26
27
  "@invaro/opentax-core": "0.1.0",
27
- "@invaro/opentax-cli": "0.1.1",
28
28
  "@invaro/opentax-corpus-us-federal": "0.6.0",
29
- "@invaro/opentax-solve": "0.1.0"
29
+ "@invaro/opentax-cli": "0.1.1"
30
30
  },
31
31
  "repository": {
32
32
  "type": "git",