@invaro/opentax 0.3.0 → 0.3.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/bundle/index.js +2 -2
- package/bundle/main.js +45 -13
- package/package.json +3 -3
package/bundle/index.js
CHANGED
|
@@ -13015,7 +13015,7 @@ var StdioServerTransport = class {
|
|
|
13015
13015
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
13016
13016
|
import { homedir } from "node:os";
|
|
13017
13017
|
import { join } from "node:path";
|
|
13018
|
-
var VERSION = "0.3.
|
|
13018
|
+
var VERSION = "0.3.2";
|
|
13019
13019
|
var ENDPOINT = "https://opentax.invaro.ai/api/t";
|
|
13020
13020
|
function optedOut() {
|
|
13021
13021
|
return process.env.OPENTAX_TELEMETRY === "0" || process.env.OPENTAX_TELEMETRY === "false" || process.env.DO_NOT_TRACK === "1";
|
|
@@ -13031,7 +13031,7 @@ function firstRunNotice() {
|
|
|
13031
13031
|
}
|
|
13032
13032
|
mkdirSync(dir, { recursive: true });
|
|
13033
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:
|
|
13034
|
+
process.stderr.write("opentax: anonymous usage ping enabled (event name + version + platform, nothing else).\n Disable with OPENTAX_TELEMETRY=0. Updates: opentax signup <email>\n");
|
|
13035
13035
|
} catch {
|
|
13036
13036
|
}
|
|
13037
13037
|
}
|
package/bundle/main.js
CHANGED
|
@@ -45009,8 +45009,37 @@ function runCompare(flags) {
|
|
|
45009
45009
|
}
|
|
45010
45010
|
}
|
|
45011
45011
|
|
|
45012
|
-
// ../cli/dist/commands/
|
|
45012
|
+
// ../cli/dist/commands/signup.js
|
|
45013
45013
|
var import_picocolors11 = __toESM(require_picocolors(), 1);
|
|
45014
|
+
async function runSignup(email2, flags) {
|
|
45015
|
+
try {
|
|
45016
|
+
const res = await fetch("https://opentax.invaro.ai/api/waitlist", {
|
|
45017
|
+
method: "POST",
|
|
45018
|
+
headers: { "Content-Type": "application/json" },
|
|
45019
|
+
body: JSON.stringify({ email: email2, source: "cli" })
|
|
45020
|
+
});
|
|
45021
|
+
const body = await res.json();
|
|
45022
|
+
if (flags.json) {
|
|
45023
|
+
print({ ok: Boolean(body.ok), ...body.error ? { error: body.error } : {} });
|
|
45024
|
+
return body.ok ? EXIT.OK : EXIT.ERROR;
|
|
45025
|
+
}
|
|
45026
|
+
if (body.ok) {
|
|
45027
|
+
console.log(import_picocolors11.default.bold("Check your inbox \u2014 one click on the confirmation link and you're in."));
|
|
45028
|
+
return EXIT.OK;
|
|
45029
|
+
}
|
|
45030
|
+
console.error(import_picocolors11.default.red(`signup failed: ${body.error ?? "unknown error"}`));
|
|
45031
|
+
return EXIT.ERROR;
|
|
45032
|
+
} catch {
|
|
45033
|
+
if (flags.json)
|
|
45034
|
+
print({ ok: false, error: "network" });
|
|
45035
|
+
else
|
|
45036
|
+
console.error(import_picocolors11.default.red("could not reach opentax.invaro.ai \u2014 check your connection"));
|
|
45037
|
+
return EXIT.ERROR;
|
|
45038
|
+
}
|
|
45039
|
+
}
|
|
45040
|
+
|
|
45041
|
+
// ../cli/dist/commands/state.js
|
|
45042
|
+
var import_picocolors12 = __toESM(require_picocolors(), 1);
|
|
45014
45043
|
init_zod();
|
|
45015
45044
|
init_dist();
|
|
45016
45045
|
init_dist2();
|
|
@@ -45033,7 +45062,7 @@ function runState(flags) {
|
|
|
45033
45062
|
if (flags.json) {
|
|
45034
45063
|
print({ ok: false, error: { code: "BAD_INPUT", message } });
|
|
45035
45064
|
} else {
|
|
45036
|
-
console.error(
|
|
45065
|
+
console.error(import_picocolors12.default.red(`bad facts file: ${message}`));
|
|
45037
45066
|
}
|
|
45038
45067
|
return EXIT.ERROR;
|
|
45039
45068
|
}
|
|
@@ -45055,7 +45084,7 @@ function runState(flags) {
|
|
|
45055
45084
|
return EXIT.OK;
|
|
45056
45085
|
}
|
|
45057
45086
|
console.log();
|
|
45058
|
-
console.log(
|
|
45087
|
+
console.log(import_picocolors12.default.bold(`${String(args.jurisdiction).toUpperCase()} return \u2014 as of ${asOf}:`));
|
|
45059
45088
|
const width = Math.max(...Object.keys(lines).map((k) => k.length)) + 2;
|
|
45060
45089
|
for (const [line, amount] of Object.entries(lines)) {
|
|
45061
45090
|
console.log(` ${line.padEnd(width)}${amount}`);
|
|
@@ -45063,7 +45092,7 @@ function runState(flags) {
|
|
|
45063
45092
|
if (notes.length) {
|
|
45064
45093
|
console.log();
|
|
45065
45094
|
for (const n of notes)
|
|
45066
|
-
console.log(
|
|
45095
|
+
console.log(import_picocolors12.default.dim(` ${n}`));
|
|
45067
45096
|
}
|
|
45068
45097
|
console.log();
|
|
45069
45098
|
return EXIT.OK;
|
|
@@ -45071,14 +45100,14 @@ function runState(flags) {
|
|
|
45071
45100
|
if (flags.json) {
|
|
45072
45101
|
print(err instanceof OpenTaxError ? { ok: false, error: err.toJSON() } : { ok: false, error: { code: "ERROR", message: String(err?.message ?? err) } });
|
|
45073
45102
|
} else {
|
|
45074
|
-
console.error(
|
|
45103
|
+
console.error(import_picocolors12.default.red(String(err?.message ?? err)));
|
|
45075
45104
|
}
|
|
45076
45105
|
return EXIT.ERROR;
|
|
45077
45106
|
}
|
|
45078
45107
|
}
|
|
45079
45108
|
|
|
45080
45109
|
// ../cli/dist/commands/verify.js
|
|
45081
|
-
var
|
|
45110
|
+
var import_picocolors13 = __toESM(require_picocolors(), 1);
|
|
45082
45111
|
init_dist();
|
|
45083
45112
|
init_dist2();
|
|
45084
45113
|
import { readFileSync as readFileSync5 } from "node:fs";
|
|
@@ -45128,19 +45157,19 @@ function runVerify(proofPath, flags) {
|
|
|
45128
45157
|
}
|
|
45129
45158
|
if (result.ok) {
|
|
45130
45159
|
console.log();
|
|
45131
|
-
console.log(`${
|
|
45132
|
-
console.log(` value ${
|
|
45160
|
+
console.log(`${import_picocolors13.default.green("\u2713 VERIFIED")} ${import_picocolors13.default.bold(artifact.target)}`);
|
|
45161
|
+
console.log(` value ${import_picocolors13.default.green(formatValue(artifact.root.value))} (as of ${artifact.asOf})`);
|
|
45133
45162
|
console.log(` corpus ${result.corpusMerkleRoot}`);
|
|
45134
45163
|
console.log(` artifact ${artifact.artifactHash}`);
|
|
45135
|
-
console.log(
|
|
45164
|
+
console.log(import_picocolors13.default.dim(" independently re-derived from the corpus; every node matches the recorded derivation"));
|
|
45136
45165
|
console.log();
|
|
45137
45166
|
return EXIT.OK;
|
|
45138
45167
|
}
|
|
45139
45168
|
console.error();
|
|
45140
|
-
console.error(`${
|
|
45169
|
+
console.error(`${import_picocolors13.default.red("\u2717 VERIFICATION FAILED")} (${result.reason})`);
|
|
45141
45170
|
console.error(` ${result.message}`);
|
|
45142
45171
|
if (result.path)
|
|
45143
|
-
console.error(` divergence at: ${
|
|
45172
|
+
console.error(` divergence at: ${import_picocolors13.default.bold(result.path)}`);
|
|
45144
45173
|
if (result.expected)
|
|
45145
45174
|
console.error(` expected: ${result.expected}`);
|
|
45146
45175
|
if (result.actual)
|
|
@@ -45227,6 +45256,9 @@ program2.command("lookup").description("find the dollar amounts and citations be
|
|
|
45227
45256
|
program2.command("state").description("compose a state return (IL-1040, VA 760, CA 540, NY IT-201) from a composer-facts JSON file").requiredOption("--facts <file>", "composer facts JSON (same shape as the MCP compute_state_return tool)").option("--as-of <date>", "law in force on this ISO date (default: today)").option("--json", "machine-readable output").action((flags) => {
|
|
45228
45257
|
process.exitCode = runState({ facts: flags.facts, asOf: flags.asOf, json: flags.json });
|
|
45229
45258
|
});
|
|
45259
|
+
program2.command("signup").description("get OpenTax updates by email (new features and other things worth knowing)").argument("<email>", "your email address").option("--json", "machine-readable output").action(async (email2, flags) => {
|
|
45260
|
+
process.exitCode = await runSignup(email2, { json: flags.json });
|
|
45261
|
+
});
|
|
45230
45262
|
program2.command("verify").description("re-execute a proof artifact and confirm or refute it").argument("<proof>", "proof artifact JSON file").option("--json", "machine-readable output").action((proofPath, flags) => {
|
|
45231
45263
|
process.exitCode = runVerify(proofPath, { json: flags.json });
|
|
45232
45264
|
});
|
|
@@ -45270,7 +45302,7 @@ function runCli(argv) {
|
|
|
45270
45302
|
import { mkdirSync, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
|
|
45271
45303
|
import { homedir } from "node:os";
|
|
45272
45304
|
import { join } from "node:path";
|
|
45273
|
-
var VERSION = "0.3.
|
|
45305
|
+
var VERSION = "0.3.2";
|
|
45274
45306
|
var ENDPOINT = "https://opentax.invaro.ai/api/t";
|
|
45275
45307
|
function optedOut() {
|
|
45276
45308
|
return process.env.OPENTAX_TELEMETRY === "0" || process.env.OPENTAX_TELEMETRY === "false" || process.env.DO_NOT_TRACK === "1";
|
|
@@ -45286,7 +45318,7 @@ function firstRunNotice() {
|
|
|
45286
45318
|
}
|
|
45287
45319
|
mkdirSync(dir, { recursive: true });
|
|
45288
45320
|
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:
|
|
45321
|
+
process.stderr.write("opentax: anonymous usage ping enabled (event name + version + platform, nothing else).\n Disable with OPENTAX_TELEMETRY=0. Updates: opentax signup <email>\n");
|
|
45290
45322
|
} catch {
|
|
45291
45323
|
}
|
|
45292
45324
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@invaro/opentax",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
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",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@invaro/opentax-compose": "0.1.0",
|
|
26
26
|
"@invaro/opentax-solve": "0.1.0",
|
|
27
27
|
"@invaro/opentax-core": "0.1.0",
|
|
28
|
-
"@invaro/opentax-
|
|
29
|
-
"@invaro/opentax-
|
|
28
|
+
"@invaro/opentax-cli": "0.1.1",
|
|
29
|
+
"@invaro/opentax-corpus-us-federal": "0.6.0"
|
|
30
30
|
},
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|