lody 0.91.0 → 0.91.1

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.
@@ -80,7 +80,7 @@ let __tla = Promise.all([
80
80
  }
81
81
  })()
82
82
  ]).then(async () => {
83
- const reviewViewerVersion = "0.91.0";
83
+ const reviewViewerVersion = "0.91.1";
84
84
  const reviewViewerSha256 = "dc9c7fc1dde49bb39c5fe86392d69219b469c0cab4fd492d8b562045e7f676e4";
85
85
  const reviewViewerFileName = "standalone.html";
86
86
  const DEFAULT_CDN_BASES = [
@@ -41,7 +41,7 @@ import { isIPv4, isIPv6 } from "net";
41
41
  import { R as RequestError, a as CreateElicitationResponse, n as ndJsonStream, b as agent$1, m as methods } from "./chunks/acp-DBqkNziA.js";
42
42
  import { L as LODY_EXTENSION_METHODS } from "./chunks/methods-CvEDMahD.js";
43
43
  import { p as packageJson } from "./chunks/package-DlotPnLa.js";
44
- import { s as string, b as boolean, c as array } from "./chunks/schemas-Du3qLZPS.js";
44
+ import { s as string, b as boolean, c as array, o as object, n as number, l as literal } from "./chunks/schemas-Du3qLZPS.js";
45
45
  import { WritableStream, ReadableStream as ReadableStream$1 } from "node:stream/web";
46
46
  (async () => {
47
47
  var One = Object.create;
@@ -68082,6 +68082,16 @@ ${content.text}
68082
68082
  }
68083
68083
  logger.error(`Unexpected case: ${valueAsString}`);
68084
68084
  }
68085
+ const ScopedWeeklyLimitSchema = object({
68086
+ kind: literal("weekly_scoped"),
68087
+ percent: number(),
68088
+ resets_at: string().nullish(),
68089
+ scope: object({
68090
+ model: object({
68091
+ display_name: string().trim().min(1)
68092
+ })
68093
+ })
68094
+ });
68085
68095
  const KEYCHAIN_TIMEOUT_MS = 5e3;
68086
68096
  const KEYCHAIN_BACKOFF_MS = 6e4;
68087
68097
  const defaultDeps = {
@@ -68130,6 +68140,22 @@ ${content.text}
68130
68140
  resetsAtEpochSeconds: sevenDayResetAt
68131
68141
  });
68132
68142
  }
68143
+ if (Array.isArray(apiResponse.limits)) {
68144
+ for (const rawLimit of apiResponse.limits) {
68145
+ const parsed = ScopedWeeklyLimitSchema.safeParse(rawLimit);
68146
+ if (!parsed.success) continue;
68147
+ const limit = parsed.data;
68148
+ const usedPercent = parseUtilization(limit.percent);
68149
+ if (usedPercent === null) continue;
68150
+ const window2 = {
68151
+ label: limit.scope.model.display_name,
68152
+ usedPercent,
68153
+ windowDurationSeconds: 7 * 24 * 60 * 60,
68154
+ resetsAtEpochSeconds: parseDate(limit.resets_at ?? void 0)
68155
+ };
68156
+ windows.push(window2);
68157
+ }
68158
+ }
68133
68159
  const result = {
68134
68160
  rateLimits: [
68135
68161
  {
@@ -72078,7 +72104,8 @@ ${explanation}` : fallbackSummary;
72078
72104
  return {
72079
72105
  sessionId,
72080
72106
  modes,
72081
- configOptions
72107
+ configOptions,
72108
+ ...buildModelCapabilitiesMeta(modelInfos)
72082
72109
  };
72083
72110
  }
72084
72111
  async enqueueProviderUpdate(config) {
@@ -72290,6 +72317,31 @@ ${explanation}` : fallbackSummary;
72290
72317
  function clientSupportsBooleanConfigOptions(clientCapabilities) {
72291
72318
  return clientCapabilities?.session?.configOptions?.boolean != null;
72292
72319
  }
72320
+ function buildModelCapabilitiesMeta(modelInfos) {
72321
+ if (modelInfos.length === 0) {
72322
+ return {};
72323
+ }
72324
+ return {
72325
+ _meta: {
72326
+ lody: {
72327
+ modelCapabilities: {
72328
+ version: 1,
72329
+ models: Object.fromEntries(modelInfos.map((info) => [
72330
+ info.value,
72331
+ {
72332
+ ...info.supportsEffort && info.supportedEffortLevels ? {
72333
+ effortValues: [
72334
+ ...info.supportedEffortLevels
72335
+ ]
72336
+ } : {},
72337
+ fastMode: info.supportsFastMode === true
72338
+ }
72339
+ ]))
72340
+ }
72341
+ }
72342
+ }
72343
+ };
72344
+ }
72293
72345
  function createFastModeConfigOption(enabled, useBooleanOption, disabledReason) {
72294
72346
  const explanation = enabled ? void 0 : disabledReason && FAST_MODE_UNAVAILABLE_EXPLANATIONS[disabledReason];
72295
72347
  const base = {
package/dist/index.js CHANGED
@@ -4325,7 +4325,7 @@ Upgrade Node, then re-run: npx lody@latest`;
4325
4325
  }
4326
4326
  const name$2 = "lody";
4327
4327
  const name$1 = "@lody/cli-cloud";
4328
- const version$9 = "0.91.0";
4328
+ const version$9 = "0.91.1";
4329
4329
  const type$2 = "module";
4330
4330
  const scripts = {
4331
4331
  "dev": "node dev.mjs",
@@ -114805,6 +114805,7 @@ ${incoming}`).output;
114805
114805
  modelUsage: record$1(string$1(), ModelUsageSchema).optional()
114806
114806
  });
114807
114807
  const RateLimitWindowSchema = object$1({
114808
+ label: string$1().optional(),
114808
114809
  usedPercent: number$4().min(0).max(100),
114809
114810
  windowDurationSeconds: number$4().nonnegative().nullable(),
114810
114811
  resetsAtEpochSeconds: number$4().int().positive().nullable()
@@ -222285,7 +222286,7 @@ ${page}${helpTipBottom}${choiceDescription}${ansiEscapes.cursorHide}`;
222285
222286
  data = createReviewBundleSnapshot(bundle);
222286
222287
  }
222287
222288
  const { injectReviewSnapshot } = await import("./chunks/index-VoI6Ds2-.js");
222288
- const { resolveReviewViewerTemplate } = await import("./chunks/review-viewer-BxVOWMjT.js").then(async (m) => {
222289
+ const { resolveReviewViewerTemplate } = await import("./chunks/review-viewer-C_L6J8dc.js").then(async (m) => {
222289
222290
  await m.__tla;
222290
222291
  return m;
222291
222292
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lody",
3
- "version": "0.91.0",
3
+ "version": "0.91.1",
4
4
  "description": "Lody Agent CLI tool for managing remote command execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",