@cartanova/qgrid-cli 2.6.1 → 2.6.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.
Files changed (81) hide show
  1. package/README.ko.md +2 -0
  2. package/README.md +2 -0
  3. package/bundle/dist/application/qgrid/oauth.js +21 -3
  4. package/bundle/dist/application/qgrid/qgrid.dispatcher.js +40 -6
  5. package/bundle/dist/application/qgrid/qgrid.frame.js +47 -19
  6. package/bundle/dist/application/qgrid/qgrid.types.js +13 -3
  7. package/bundle/dist/application/qgrid/token-death.js +77 -0
  8. package/bundle/dist/application/queries.generated.js +3 -2
  9. package/bundle/dist/application/request-log/request-log.model.js +105 -31
  10. package/bundle/dist/application/request-log-step/request-log-step.model.js +1 -1
  11. package/bundle/dist/application/sonamu.generated.js +60 -5
  12. package/bundle/dist/application/sonamu.generated.sso.js +18 -2
  13. package/bundle/dist/application/token/token.model.js +53 -2
  14. package/bundle/dist/i18n/en.js +3 -1
  15. package/bundle/dist/i18n/ko.js +3 -1
  16. package/bundle/dist/i18n/sd.generated.js +18 -1
  17. package/bundle/dist/migrations/20260807133553_manual__backfill_request_log_cost.js +49 -0
  18. package/bundle/dist/migrations/20260807145144_alter_request_logs_alter1.js +13 -0
  19. package/bundle/dist/migrations/20260807164057_alter_request_logs_alter1.js +13 -0
  20. package/bundle/dist/server-error-handler.js +5 -3
  21. package/bundle/dist/sonamu.config.js +5 -1
  22. package/bundle/dist/utils/providers/openai/openai-refresh.js +12 -1
  23. package/bundle/dist/utils/slack-notify.js +65 -0
  24. package/bundle/src/application/qgrid/oauth.ts +20 -1
  25. package/bundle/src/application/qgrid/qgrid-oauth-redirect.test.ts +15 -3
  26. package/bundle/src/application/qgrid/qgrid.dispatcher.test.ts +30 -2
  27. package/bundle/src/application/qgrid/qgrid.dispatcher.ts +44 -6
  28. package/bundle/src/application/qgrid/qgrid.frame.ts +67 -47
  29. package/bundle/src/application/qgrid/qgrid.types.ts +10 -0
  30. package/bundle/src/application/qgrid/token-death.test.ts +150 -0
  31. package/bundle/src/application/qgrid/token-death.ts +96 -0
  32. package/bundle/src/application/queries.generated.ts +5 -2
  33. package/bundle/src/application/request-log/request-log.entity.json +46 -7
  34. package/bundle/src/application/request-log/request-log.model.test.ts +153 -42
  35. package/bundle/src/application/request-log/request-log.model.ts +136 -50
  36. package/bundle/src/application/sonamu.generated.http +19 -1
  37. package/bundle/src/application/sonamu.generated.sso.ts +16 -0
  38. package/bundle/src/application/sonamu.generated.ts +58 -3
  39. package/bundle/src/application/token/token.model.test.ts +49 -0
  40. package/bundle/src/application/token/token.model.ts +75 -0
  41. package/bundle/src/i18n/en.ts +3 -0
  42. package/bundle/src/i18n/ko.ts +3 -0
  43. package/bundle/src/i18n/sd.generated.ts +17 -0
  44. package/bundle/src/migrations/20260807133553_manual__backfill_request_log_cost.ts +110 -0
  45. package/bundle/src/migrations/20260807145144_alter_request_logs_alter1.ts +13 -0
  46. package/bundle/src/migrations/20260807164057_alter_request_logs_alter1.ts +13 -0
  47. package/bundle/src/server-error-handler.test.ts +58 -0
  48. package/bundle/src/server-error-handler.ts +16 -5
  49. package/bundle/src/sonamu.config.ts +6 -0
  50. package/bundle/src/utils/providers/openai/openai-refresh.ts +17 -0
  51. package/bundle/src/utils/slack-notify.test.ts +97 -0
  52. package/bundle/src/utils/slack-notify.ts +74 -0
  53. package/bundle/web-dist/client/assets/index-BGQSGMcK.css +1 -0
  54. package/bundle/web-dist/client/assets/index-CnNT0mdq.js +78 -0
  55. package/bundle/web-dist/client/assets/logs-DCY81UWb.js +1 -0
  56. package/bundle/web-dist/client/assets/{monit-CyqMmy1G.js → monit-D5OoAday.js} +1 -1
  57. package/bundle/web-dist/client/assets/routes-B4D9C86u.js +5 -0
  58. package/bundle/web-dist/client/assets/{sd.generated-CjW3rfJ8.js → sd.generated-DYdwSB2I.js} +1 -1
  59. package/bundle/web-dist/client/assets/{services.generated-BuT6Gp8V.js → services.generated-BsAvotjG.js} +1 -1
  60. package/bundle/web-dist/client/assets/{show-C5WxfoAt.js → show-BSX8ii7Z.js} +3 -3
  61. package/bundle/web-dist/client/assets/tokens-Gapk41cz.js +1 -0
  62. package/bundle/web-dist/client/assets/{use-update-token-mutation-DBkxL29Y.js → use-update-token-mutation-DqEpK7It.js} +1 -1
  63. package/bundle/web-dist/client/index.html +3 -3
  64. package/bundle/web-dist/server/assets/{lazyRouteComponent-PRxXWW3t.js → lazyRouteComponent-BaZaveNc.js} +1 -1
  65. package/bundle/web-dist/server/assets/{logs-D0z1Ghj1.js → logs-DMOw3SjD.js} +91 -42
  66. package/bundle/web-dist/server/assets/{monit-dBXxnAyI.js → monit-UmcqHroX.js} +2 -2
  67. package/bundle/web-dist/server/assets/{routes-B3p7fuwk.js → routes-Sv_4FjtH.js} +52 -46
  68. package/bundle/web-dist/server/assets/{sd.generated-ek-tz-7H.js → sd.generated-B0xqnHEo.js} +21 -0
  69. package/bundle/web-dist/server/assets/{services.generated-BNuxWs7K.js → services.generated-DqAKskAS.js} +23 -8
  70. package/bundle/web-dist/server/assets/{show-0iNioJ2I.js → show-C-oSdzHX.js} +31 -25
  71. package/bundle/web-dist/server/assets/{tokens-CvytQ9Xy.js → tokens-h-2A3wfD.js} +292 -191
  72. package/bundle/web-dist/server/assets/{use-update-token-mutation-BBCC2GKM.js → use-update-token-mutation-DHCaa7Ku.js} +1 -1
  73. package/bundle/web-dist/server/entry-server.generated.js +70 -29
  74. package/package.json +1 -1
  75. package/skills/qgrid/references/cli-env-and-server-boot.md +8 -0
  76. package/skills/qgrid/references/token-auth-quota-lifecycle.md +11 -0
  77. package/bundle/web-dist/client/assets/index-BGGBFmzE.js +0 -78
  78. package/bundle/web-dist/client/assets/index-GA9b-zy4.css +0 -1
  79. package/bundle/web-dist/client/assets/logs-Dh19u6Tk.js +0 -1
  80. package/bundle/web-dist/client/assets/routes-Cy0gCq8c.js +0 -5
  81. package/bundle/web-dist/client/assets/tokens-Ciolqw4l.js +0 -1
@@ -1,6 +1,6 @@
1
- import { J as __commonJSMin, Y as __exportAll, Z as __toESM, _ as require_jsx_runtime, v as require_react } from "./sd.generated-ek-tz-7H.js";
2
- import { i as RequestLogStepService, r as RequestLogService } from "./services.generated-BNuxWs7K.js";
3
- import { a as Link } from "./lazyRouteComponent-PRxXWW3t.js";
1
+ import { J as __commonJSMin, Y as __exportAll, Z as __toESM, _ as require_jsx_runtime, v as require_react } from "./sd.generated-B0xqnHEo.js";
2
+ import { i as RequestLogStepService, r as RequestLogService } from "./services.generated-DqAKskAS.js";
3
+ import { a as Link } from "./lazyRouteComponent-BaZaveNc.js";
4
4
  import { t as Route } from "../entry-server.generated.js";
5
5
  import { n as formatMicroUsd, t as cacheHitRate } from "./cost-CSH_t17I.js";
6
6
  import minpath from "node:path";
@@ -25269,13 +25269,16 @@ function Section({ title, defaultOpen = true, children }) {
25269
25269
  });
25270
25270
  }
25271
25271
  function Metric({ label, value }) {
25272
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
25273
- className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium",
25274
- children: label
25275
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
25276
- className: "text-[15px] font-semibold text-sand-800 tabular-nums mt-0.5",
25277
- children: value
25278
- })] });
25272
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25273
+ className: "min-w-0",
25274
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", {
25275
+ className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium truncate",
25276
+ children: label
25277
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", {
25278
+ className: "text-[15px] font-semibold text-sand-800 tabular-nums mt-0.5 truncate",
25279
+ children: value
25280
+ })]
25281
+ });
25279
25282
  }
25280
25283
  var STATUS_STYLE = {
25281
25284
  running: "bg-blue-100 text-blue-600",
@@ -25306,10 +25309,10 @@ function HeaderBar({ data }) {
25306
25309
  const hasFallback = !isRunning && data.requested_model_name !== null && data.model_name !== null && data.requested_model_name !== data.model_name;
25307
25310
  const hasRequestedOnly = !isRunning && data.requested_model_name !== null && data.model_name === null;
25308
25311
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25309
- className: "panel overflow-hidden px-5 py-3 flex items-center gap-2",
25312
+ className: "panel overflow-hidden px-4 py-3 flex flex-wrap items-center gap-x-2 gap-y-1.5 sm:px-5",
25310
25313
  children: [
25311
25314
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
25312
- className: "text-[15px] font-semibold text-sand-900",
25315
+ className: "text-[15px] font-semibold text-sand-900 break-all",
25313
25316
  children: isRunning ? "실행 중" : hasFallback ? `${data.requested_model_name} → ${data.model_name}` : data.model_name ?? data.requested_model_name ?? "Unknown model"
25314
25317
  }),
25315
25318
  hasRequestedOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
@@ -25441,13 +25444,16 @@ function formatTokensPerSec(outputTokens, durationMs, ttftMs, enabled) {
25441
25444
  return `${Math.round(outputTokens / (generationMs / 1e3)).toLocaleString()} tok/s`;
25442
25445
  }
25443
25446
  function CompactMetric({ label, value }) {
25444
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25445
- className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium",
25446
- children: label
25447
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25448
- className: "mt-0.5 text-[13px] font-semibold text-sand-800 tabular-nums",
25449
- children: value
25450
- })] });
25447
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25448
+ className: "min-w-0",
25449
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25450
+ className: "text-[10px] uppercase tracking-wider text-sand-400 font-medium truncate",
25451
+ children: label
25452
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25453
+ className: "mt-0.5 text-[13px] font-semibold text-sand-800 tabular-nums truncate",
25454
+ children: value
25455
+ })]
25456
+ });
25451
25457
  }
25452
25458
  function readToolInputImages(args) {
25453
25459
  if (!args || typeof args !== "object" || Array.isArray(args)) return [];
@@ -25662,7 +25668,7 @@ function StepTreeItem({ entry, tokensPerSecEnabled }) {
25662
25668
  children: [generate && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25663
25669
  className: "rounded-md border border-sand-100 bg-sand-50/70 p-3",
25664
25670
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25665
- className: "grid grid-cols-2 md:grid-cols-4 xl:grid-cols-8 gap-3",
25671
+ className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-8 gap-x-4 gap-y-3",
25666
25672
  children: [
25667
25673
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompactMetric, {
25668
25674
  label: "Duration",
@@ -25928,16 +25934,16 @@ function RequestDetail({ id }) {
25928
25934
  hasHistory && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HistorySection, { history }),
25929
25935
  hasTools && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolsSection, { tools }),
25930
25936
  hasSteps ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
25931
- className: "flex gap-4 items-start",
25937
+ className: "flex flex-col lg:flex-row gap-4 items-stretch lg:items-start",
25932
25938
  children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25933
- className: "flex-1 min-w-0",
25934
- children: promptSections
25935
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25936
- className: "flex-1 min-w-0 space-y-4",
25939
+ className: "order-1 lg:order-2 flex-1 min-w-0 space-y-4",
25937
25940
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StepTreeSection, {
25938
25941
  steps: stepTree,
25939
25942
  tokensPerSecEnabled
25940
25943
  })
25944
+ }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
25945
+ className: "order-2 lg:order-1 flex-1 min-w-0",
25946
+ children: promptSections
25941
25947
  })]
25942
25948
  }) : promptSections,
25943
25949
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Section, {