costclaw 0.12.1 → 0.12.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/dist/index.js +21 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import {
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
import { realpathSync } from "fs";
|
|
5
6
|
import { homedir as homedir7 } from "os";
|
|
6
7
|
|
|
7
8
|
// ../../packages/engine/src/types.ts
|
|
@@ -14,15 +15,16 @@ function isPlan(value) {
|
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
// ../../packages/engine/src/pricing.ts
|
|
17
|
-
var PRICING_SNAPSHOT_DATE = "2026-
|
|
18
|
+
var PRICING_SNAPSHOT_DATE = "2026-09-14";
|
|
18
19
|
var PRICES_PER_MTOK = Object.freeze({
|
|
20
|
+
"claude-fable-5-1": { input: 10, output: 50, cache_write: 12.5, cache_read: 0.25 },
|
|
19
21
|
"claude-fable-5": { input: 10, output: 50, cache_write: 12.5, cache_read: 1 },
|
|
20
22
|
"claude-opus-5": { input: 5, output: 25, cache_write: 6.25, cache_read: 0.5 },
|
|
21
23
|
"claude-opus-4-8": { input: 5, output: 25, cache_write: 6.25, cache_read: 0.5 },
|
|
22
|
-
"claude-sonnet-5": { input:
|
|
23
|
-
"claude-opus-4-7": { input:
|
|
24
|
-
"claude-opus-4-7[1m]": { input:
|
|
25
|
-
"claude-opus-4-6": { input:
|
|
24
|
+
"claude-sonnet-5": { input: 2, output: 10, cache_write: 2.5, cache_read: 0.2 },
|
|
25
|
+
"claude-opus-4-7": { input: 5, output: 25, cache_write: 6.25, cache_read: 0.5 },
|
|
26
|
+
"claude-opus-4-7[1m]": { input: 5, output: 25, cache_write: 6.25, cache_read: 0.5 },
|
|
27
|
+
"claude-opus-4-6": { input: 5, output: 25, cache_write: 6.25, cache_read: 0.5 },
|
|
26
28
|
"claude-sonnet-4-6": { input: 3, output: 15, cache_write: 3.75, cache_read: 0.3 },
|
|
27
29
|
"claude-sonnet-4-5": { input: 3, output: 15, cache_write: 3.75, cache_read: 0.3 },
|
|
28
30
|
"claude-haiku-4-5": { input: 1, output: 5, cache_write: 1.25, cache_read: 0.1 },
|
|
@@ -7053,7 +7055,7 @@ function parseApplyFlags(args) {
|
|
|
7053
7055
|
};
|
|
7054
7056
|
}
|
|
7055
7057
|
function cliVersion() {
|
|
7056
|
-
return true ? "0.12.
|
|
7058
|
+
return true ? "0.12.3" : "0.0.0-dev";
|
|
7057
7059
|
}
|
|
7058
7060
|
function isHelpRequest(command, args) {
|
|
7059
7061
|
if (command === void 0) return false;
|
|
@@ -7264,8 +7266,17 @@ Run: costclaw optimize
|
|
|
7264
7266
|
process.stderr.write(helpText() + "\n");
|
|
7265
7267
|
process.exit(command ? 1 : 0);
|
|
7266
7268
|
}
|
|
7267
|
-
|
|
7268
|
-
if (
|
|
7269
|
+
function isEntryPoint(argvPath, moduleUrl) {
|
|
7270
|
+
if (argvPath === void 0) return false;
|
|
7271
|
+
const modulePath = fileURLToPath(moduleUrl);
|
|
7272
|
+
if (argvPath === modulePath) return true;
|
|
7273
|
+
try {
|
|
7274
|
+
return realpathSync(argvPath) === realpathSync(modulePath);
|
|
7275
|
+
} catch {
|
|
7276
|
+
return false;
|
|
7277
|
+
}
|
|
7278
|
+
}
|
|
7279
|
+
if (isEntryPoint(process.argv[1], import.meta.url)) {
|
|
7269
7280
|
main().catch((err) => {
|
|
7270
7281
|
console.error(err instanceof Error ? err.message : String(err));
|
|
7271
7282
|
process.exit(1);
|
|
@@ -7274,6 +7285,7 @@ if (isEntryPoint) {
|
|
|
7274
7285
|
export {
|
|
7275
7286
|
cliVersion,
|
|
7276
7287
|
helpText,
|
|
7288
|
+
isEntryPoint,
|
|
7277
7289
|
isHelpRequest,
|
|
7278
7290
|
parseApplyFlags,
|
|
7279
7291
|
parseAuditFlags,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "costclaw",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.3",
|
|
4
4
|
"description": "Local cost and setup audit for Claude Code. Finds recoverable token spend and scores your setup across six pillars, with your prompts never leaving your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|