@dan-ai-studio/dshopencodego 0.1.64 → 0.1.65

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/lib/index.js CHANGED
@@ -74081,11 +74081,11 @@ function validReleaseDate(value) {
74081
74081
  }
74082
74082
  function rates(value) {
74083
74083
  const cost = record(value);
74084
- const rate = (key) => {
74084
+ const rate2 = (key) => {
74085
74085
  const entry = cost[key];
74086
74086
  return typeof entry === "number" && Number.isFinite(entry) && entry >= 0 ? entry : 0;
74087
74087
  };
74088
- return { input: rate("input"), output: rate("output"), cacheRead: rate("cache_read"), cacheWrite: rate("cache_write") };
74088
+ return { input: rate2("input"), output: rate2("output"), cacheRead: rate2("cache_read"), cacheWrite: rate2("cache_write") };
74089
74089
  }
74090
74090
  function thinkingLevels(metadata, known) {
74091
74091
  const options = metadata["reasoning_options"];
@@ -76931,16 +76931,16 @@ function parseGoQuota(value) {
76931
76931
  function parseCost(value) {
76932
76932
  if (value === null || typeof value !== "object") throw new Error("invalid model cost");
76933
76933
  const row = value;
76934
- const rate = (key) => {
76934
+ const rate2 = (key) => {
76935
76935
  const entry = row[key];
76936
76936
  if (typeof entry !== "number" || !Number.isFinite(entry) || entry < 0) throw new Error(`invalid model cost "${key}"`);
76937
76937
  return entry;
76938
76938
  };
76939
76939
  return {
76940
- input: rate("input"),
76941
- output: rate("output"),
76942
- ...typeof row["cacheRead"] === "number" ? { cacheRead: rate("cacheRead") } : {},
76943
- ...typeof row["cacheWrite"] === "number" ? { cacheWrite: rate("cacheWrite") } : {}
76940
+ input: rate2("input"),
76941
+ output: rate2("output"),
76942
+ ...typeof row["cacheRead"] === "number" ? { cacheRead: rate2("cacheRead") } : {},
76943
+ ...typeof row["cacheWrite"] === "number" ? { cacheWrite: rate2("cacheWrite") } : {}
76944
76944
  };
76945
76945
  }
76946
76946
  function parseModalities(value) {
@@ -77122,6 +77122,8 @@ function parseEntry(value) {
77122
77122
  ...row["cacheReadTokens"] === void 0 ? {} : { cacheReadTokens: count("cacheReadTokens", row) },
77123
77123
  ...row["durationMs"] === void 0 ? {} : { durationMs: count("durationMs", row) },
77124
77124
  ...row["firstTokenMs"] === void 0 ? {} : { firstTokenMs: count("firstTokenMs", row) },
77125
+ ...row["decodeMs"] === void 0 ? {} : { decodeMs: count("decodeMs", row) },
77126
+ ...row["tps"] === void 0 ? {} : { tps: rate("tps", row) },
77125
77127
  ok: row["ok"] === true,
77126
77128
  ...typeof row["code"] === "string" ? { code: row["code"] } : {},
77127
77129
  ...typeof row["poolKey"] === "string" ? { poolKey: row["poolKey"] } : {},
@@ -77140,6 +77142,13 @@ function parseEntry(value) {
77140
77142
  } : {}
77141
77143
  };
77142
77144
  }
77145
+ function rate(key, row) {
77146
+ const entry = row[key];
77147
+ if (typeof entry !== "number" || !Number.isFinite(entry) || entry < 0) {
77148
+ throw new Error(`invalid request-log entry "${key}"`);
77149
+ }
77150
+ return entry;
77151
+ }
77143
77152
  function parsePoolEvent(value) {
77144
77153
  if (value === null || typeof value !== "object") throw new Error("invalid request-log pool event");
77145
77154
  const row = value;
@@ -77721,6 +77730,8 @@ var RequestLog = class {
77721
77730
  if (finished) return;
77722
77731
  finished = true;
77723
77732
  const endedAt = Date.now();
77733
+ const decodeMs = firstTokenAt === void 0 ? void 0 : Math.max(0, endedAt - firstTokenAt);
77734
+ const tps = decodeMs === void 0 || decodeMs <= 0 || usage === void 0 ? void 0 : usage.outputTokens / (decodeMs / 1e3);
77724
77735
  const entry = {
77725
77736
  seq: ++this.seq,
77726
77737
  atMs: startedAt,
@@ -77736,6 +77747,8 @@ var RequestLog = class {
77736
77747
  },
77737
77748
  durationMs: Math.max(0, endedAt - startedAt),
77738
77749
  ...firstTokenAt === void 0 ? {} : { firstTokenMs: Math.max(0, firstTokenAt - startedAt) },
77750
+ ...decodeMs === void 0 ? {} : { decodeMs },
77751
+ ...tps === void 0 ? {} : { tps },
77739
77752
  ok,
77740
77753
  ...code === void 0 ? {} : { code },
77741
77754
  // The pool in force when the request finished. Pool switches are
@@ -77875,7 +77888,7 @@ function createUpdateChecker(deps) {
77875
77888
  }
77876
77889
 
77877
77890
  // src/update/version.ts
77878
- var PLUGIN_VERSION = true ? "0.1.64" : "0.0.0-dev";
77891
+ var PLUGIN_VERSION = true ? "0.1.65" : "0.0.0-dev";
77879
77892
 
77880
77893
  // src/update/service.ts
77881
77894
  import { TypertRemoteService as TypertRemoteService4 } from "@deepseek-ai/dsh-typert-protocol";
@@ -47,6 +47,20 @@ export interface RequestLogEntry {
47
47
  readonly durationMs?: number;
48
48
  /** Wall time from request start to the first token delta, in milliseconds. */
49
49
  readonly firstTokenMs?: number;
50
+ /**
51
+ * Wall time from the first token delta to the terminal event, in
52
+ * milliseconds — the decode window, on the same scale as the Harness's own
53
+ * per-turn reading.
54
+ */
55
+ readonly decodeMs?: number;
56
+ /**
57
+ * Output tokens per second over the decode window.
58
+ *
59
+ * Absent when the request produced no token, or when the decode window
60
+ * rounds to zero milliseconds: a rate divided by zero is not a rate, and
61
+ * inventing one would misreport a fast reply as infinitely quick.
62
+ */
63
+ readonly tps?: number;
50
64
  /** Whether the request completed. */
51
65
  readonly ok: boolean;
52
66
  /** Failure code (`TIMEOUT`, `TRANSPORT`, …) for a request that did not complete. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dan-ai-studio/dshopencodego",
3
- "version": "0.1.64",
3
+ "version": "0.1.65",
4
4
  "description": "OpenCode Go provider for DeepSeek Harness: live gateway catalog, per-conversation session header, usage",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -51,6 +51,8 @@
51
51
  "inject": [
52
52
  "@deepseek-ai/dsh-client-locale",
53
53
  "@deepseek-ai/dsh-client-ui-settings",
54
+ "@deepseek-ai/dsh-client-ui-layout",
55
+ "@deepseek-ai/dsh-client-ui-sidebar",
54
56
  "@deepseek-ai/dsh-api-remotes",
55
57
  "@deepseek-ai/dsh-client-ui-model-selection"
56
58
  ],
@@ -75,9 +77,12 @@
75
77
  "@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.1 <0.3.0-0",
76
78
  "@deepseek-ai/dsh-client-store": ">=0.2.0-rc.1 <0.3.0-0",
77
79
  "@deepseek-ai/dsh-client-ui-conversation": ">=0.2.0-rc.1 <0.3.0-0",
80
+ "@deepseek-ai/dsh-client-ui-layout": ">=0.2.0-rc.1 <0.3.0-0",
78
81
  "@deepseek-ai/dsh-client-ui-model-selection": ">=0.2.0-rc.1 <0.3.0-0",
82
+ "@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.1 <0.3.0-0",
79
83
  "@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.1 <0.3.0-0",
80
84
  "@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.1 <0.3.0-0",
85
+ "@deepseek-ai/dsh-client-ui-sidebar": ">=0.2.0-rc.1 <0.3.0-0",
81
86
  "@deepseek-ai/dsh-client-ui-slots": ">=0.2.0-rc.1 <0.3.0-0",
82
87
  "@deepseek-ai/dsh-credentials": ">=0.2.0-rc.1 <0.3.0-0",
83
88
  "@deepseek-ai/dsh-fs": ">=0.2.0-rc.1 <0.3.0-0",
@@ -100,6 +105,15 @@
100
105
  "@deepseek-ai/dsh-client-ui-model-selection": {
101
106
  "optional": true
102
107
  },
108
+ "@deepseek-ai/dsh-client-ui-layout": {
109
+ "optional": true
110
+ },
111
+ "@deepseek-ai/dsh-client-ui-primitives": {
112
+ "optional": true
113
+ },
114
+ "@deepseek-ai/dsh-client-ui-sidebar": {
115
+ "optional": true
116
+ },
103
117
  "@deepseek-ai/dsh-client-ui-settings": {
104
118
  "optional": true
105
119
  },
@@ -115,9 +129,12 @@
115
129
  "@deepseek-ai/dsh-client-locale": "0.2.1-rc.2",
116
130
  "@deepseek-ai/dsh-client-store": "0.2.1-rc.2",
117
131
  "@deepseek-ai/dsh-client-ui-conversation": "0.2.1-rc.2",
132
+ "@deepseek-ai/dsh-client-ui-layout": "0.2.1-rc.2",
118
133
  "@deepseek-ai/dsh-client-ui-model-selection": "0.2.1-rc.2",
134
+ "@deepseek-ai/dsh-client-ui-primitives": "0.2.1-rc.2",
119
135
  "@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.2",
120
136
  "@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.2",
137
+ "@deepseek-ai/dsh-client-ui-sidebar": "0.2.1-rc.2",
121
138
  "@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.2",
122
139
  "@deepseek-ai/dsh-credentials": "0.2.1-rc.2",
123
140
  "@deepseek-ai/dsh-fs": "0.2.1-rc.2",