@carrierllc/mcp 0.10.2 → 0.10.4
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/{chunk-PYXTCG4L.js → chunk-KC3FPQ7P.js} +2 -2
- package/dist/{chunk-PYXTCG4L.js.map → chunk-KC3FPQ7P.js.map} +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/marketplace.json +2 -2
- package/plugin/carrier/.claude-plugin/plugin.json +2 -2
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
usageOverPeriodParams,
|
|
52
52
|
verifyStorefront,
|
|
53
53
|
withOcsListSummary
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-KC3FPQ7P.js";
|
|
55
55
|
import "./chunk-SHKKVIIA.js";
|
|
56
56
|
|
|
57
57
|
// src/index.ts
|
|
@@ -631,6 +631,7 @@ async function beginUiAgentRun(prompt, title, env, opts) {
|
|
|
631
631
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
632
632
|
};
|
|
633
633
|
await putTask(env, dispatched);
|
|
634
|
+
await bumpUsageCounter(env);
|
|
634
635
|
const complete = async () => {
|
|
635
636
|
let run;
|
|
636
637
|
try {
|
|
@@ -738,6 +739,13 @@ async function putTask(env, task) {
|
|
|
738
739
|
expirationTtl: TASK_TTL_SECONDS
|
|
739
740
|
});
|
|
740
741
|
}
|
|
742
|
+
var USAGE_COUNTER_TTL_SECONDS = 35 * 24 * 3600;
|
|
743
|
+
async function bumpUsageCounter(env, now = /* @__PURE__ */ new Date()) {
|
|
744
|
+
const monthKey = `steel_usage:${now.getUTCFullYear()}-${String(now.getUTCMonth() + 1).padStart(2, "0")}`;
|
|
745
|
+
const raw = await env.store.get(monthKey).catch(() => null);
|
|
746
|
+
const count = raw ? parseInt(raw, 10) || 0 : 0;
|
|
747
|
+
await env.store.put(monthKey, String(count + 1), { expirationTtl: USAGE_COUNTER_TTL_SECONDS }).catch(() => void 0);
|
|
748
|
+
}
|
|
741
749
|
async function writePendingAsk(env, task) {
|
|
742
750
|
const entry = {
|
|
743
751
|
task_id: task.task_id,
|