priiisk 0.1.19 → 0.1.20

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.
@@ -6,7 +6,7 @@ import {
6
6
  directToolBin,
7
7
  error,
8
8
  log
9
- } from "./chunk-37ROQVP3.js";
9
+ } from "./chunk-QDIMBK33.js";
10
10
  import {
11
11
  _void,
12
12
  cached,
@@ -1616,12 +1616,25 @@ var equipmentLines = (equipment, revision) => [
1616
1616
  ` mcp: ${mcpGrants(equipment.mcp)}`,
1617
1617
  ` skills: ${names([...equipment.skillNames])}`
1618
1618
  ];
1619
+ var usageLines = (usage) => {
1620
+ const context = usage.context === void 0 || usage.context.tokens === null ? "unknown" : `${String(usage.context.tokens)}/${String(usage.context.contextWindow)}${usage.context.percent === null ? "" : ` (${usage.context.percent.toFixed(1)}%)`}`;
1621
+ const cache = usage.latestCacheHitRate === void 0 ? "not reported" : `${usage.latestCacheHitRate.toFixed(1)}%`;
1622
+ return [
1623
+ ` context: ${context}, cache ${cache}`,
1624
+ ` tokens: ${String(usage.tokens.total)} total, ${String(usage.tokens.input)} in, ${String(usage.tokens.output)} out, ${String(usage.tokens.cacheRead)} cache read`,
1625
+ ` cost: $${usage.cost.toFixed(4)}, ${String(usage.totalMessages)} messages, ${String(usage.toolCalls)} tool calls`
1626
+ ];
1627
+ };
1619
1628
  var WORKER_ERROR_LIMIT = 160;
1620
1629
  var formatWorker = (worker) => {
1621
1630
  const alias = worker.alias === void 0 ? "" : ` (${worker.alias})`;
1622
1631
  const failure = worker.error === void 0 ? "" : ` \u2014 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0445\u043E\u0434: ${worker.error.code}: ${worker.error.message.slice(0, WORKER_ERROR_LIMIT)}`;
1623
1632
  const headline = `${worker.workerId}${alias}: ${worker.state}, session ${worker.sessionState}${failure}`;
1624
- return worker.equipment === void 0 ? headline : [headline, ...equipmentLines(worker.equipment, worker.equipmentVersion)].join("\n");
1633
+ return [
1634
+ headline,
1635
+ ...worker.equipment === void 0 ? [] : equipmentLines(worker.equipment, worker.equipmentVersion),
1636
+ ...worker.usage === void 0 ? [] : usageLines(worker.usage)
1637
+ ].join("\n");
1625
1638
  };
1626
1639
  var printWorkers = (json) => (effect) => effect.pipe(
1627
1640
  flatMap(
@@ -3,14 +3,14 @@ const require = __priiiskCreateRequire(import.meta.url);
3
3
  import {
4
4
  errorPayload,
5
5
  makeCapturedConsole
6
- } from "./chunk-WRNKCW6X.js";
6
+ } from "./chunk-FBRFN62A.js";
7
7
  import {
8
8
  withCampRpcSession,
9
9
  withConsole
10
- } from "./chunk-37ROQVP3.js";
10
+ } from "./chunk-QDIMBK33.js";
11
11
  import {
12
12
  PRIIISK_CLI_VERSION
13
- } from "./chunk-5IO2ETKC.js";
13
+ } from "./chunk-XLZHFINK.js";
14
14
  import {
15
15
  _await2 as _await,
16
16
  addFinalizer2 as addFinalizer,