@dan-ai-studio/dshopencodego 0.1.49 → 0.1.50
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/README.en.md +1 -1
- package/README.md +1 -1
- package/lib/index.js +8 -12
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -247,7 +247,7 @@ npm test # contract tests against a real local HTTP mock gateway
|
|
|
247
247
|
|
|
248
248
|
**Order matters**: `npm run build` must come before `npm test` — `tests/pack-contents.spec.ts` walks every `exports` target, and whether `lib/` exists decides whether that check runs or is silently skipped (it does not fail, it just stops protecting you). `package.json` no longer carries `prepare`, so `npm ci` will not build for you; all three CI workflows run `npm run build` explicitly.
|
|
249
249
|
|
|
250
|
-
The suite covers configuration validation, the protocol ladder, gateway and online metadata, the catalog projection, the adapter on the wire (all three protocols), Remote contracts and services, session-header invariants, usage windows and the meter, the client controller and usage pill, both halves' mounting and registration, the error mapping for stream idle timeouts and aborts, the exit-code contract of the verification scripts, and several **structural invariants** (inject declarations match the source's reads, peer coverage holds both ways, the READMEs match the manifest, and the READMEs' claims about the upstream match the upstream actually installed). That is **
|
|
250
|
+
The suite covers configuration validation, the protocol ladder, gateway and online metadata, the catalog projection, the adapter on the wire (all three protocols), Remote contracts and services, session-header invariants, usage windows and the meter, the client controller and usage pill, both halves' mounting and registration, the error mapping for stream idle timeouts and aborts, the exit-code contract of the verification scripts, and several **structural invariants** (inject declarations match the source's reads, peer coverage holds both ways, the READMEs match the manifest, and the READMEs' claims about the upstream match the upstream actually installed). That is **48 test files** — a number `tests/readme-consistency.spec.ts` checks against the `tests/` directory, so it cannot drift.
|
|
251
251
|
|
|
252
252
|
## Releasing (maintainers)
|
|
253
253
|
|
package/README.md
CHANGED
|
@@ -247,7 +247,7 @@ npm test # 契约测试:真实 HTTP mock 网关,断言请求头/
|
|
|
247
247
|
|
|
248
248
|
**顺序有讲究**:`npm run build` 要排在 `npm test` 之前——`tests/pack-contents.spec.ts` 会遍历 `exports` 的每个目标,`lib/` 存在与否决定这条检查是执行还是被跳过(不报错,但会少一层保护)。`package.json` 已移除 `prepare`,因此 `npm ci` 不会再替你隐式构建;三个 CI workflow 都显式跑了 `npm run build`。
|
|
249
249
|
|
|
250
|
-
测试覆盖配置校验、协议阶梯、网关与在线元数据、目录投影、适配器(三种协议的线上请求)、Remote 契约与服务、会话头不变量、用量窗口与计量、客户端控制器与用量组件、两半的挂载与登记、流空闲超时与中止的错误映射、验证脚本的退出码契约、以及几条**结构性不变量**(inject 声明与源码读取一致、peer 覆盖双向、README 与 manifest 一致、README 对上游的断言与实装的上游一致)。共 **
|
|
250
|
+
测试覆盖配置校验、协议阶梯、网关与在线元数据、目录投影、适配器(三种协议的线上请求)、Remote 契约与服务、会话头不变量、用量窗口与计量、客户端控制器与用量组件、两半的挂载与登记、流空闲超时与中止的错误映射、验证脚本的退出码契约、以及几条**结构性不变量**(inject 声明与源码读取一致、peer 覆盖双向、README 与 manifest 一致、README 对上游的断言与实装的上游一致)。共 **48 个测试文件**——这个数字由 `tests/readme-consistency.spec.ts` 对着 `tests/` 目录校验,不会漂移。
|
|
251
251
|
|
|
252
252
|
## 发布(维护者)
|
|
253
253
|
|
package/lib/index.js
CHANGED
|
@@ -42462,8 +42462,6 @@ Check your ChatGPT usage: ${CHATGPT_USAGE_URL}` : errorMessage;
|
|
|
42462
42462
|
});
|
|
42463
42463
|
|
|
42464
42464
|
// src/index.ts
|
|
42465
|
-
import { homedir } from "node:os";
|
|
42466
|
-
import { join as join4 } from "node:path";
|
|
42467
42465
|
import { credentialRef } from "@deepseek-ai/dsh-credentials";
|
|
42468
42466
|
import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
|
|
42469
42467
|
import * as llm2 from "@deepseek-ai/dsh-llm";
|
|
@@ -45966,7 +45964,7 @@ function createUpdateChecker(deps) {
|
|
|
45966
45964
|
}
|
|
45967
45965
|
|
|
45968
45966
|
// src/update/version.ts
|
|
45969
|
-
var PLUGIN_VERSION = true ? "0.1.
|
|
45967
|
+
var PLUGIN_VERSION = true ? "0.1.50" : "0.0.0-dev";
|
|
45970
45968
|
|
|
45971
45969
|
// src/update/service.ts
|
|
45972
45970
|
import { TypertRemoteService as TypertRemoteService2 } from "@deepseek-ai/dsh-typert-protocol";
|
|
@@ -46105,15 +46103,12 @@ function isLiveConfig(raw) {
|
|
|
46105
46103
|
}
|
|
46106
46104
|
function resolveCacheDir(ctx) {
|
|
46107
46105
|
const home = ctx.dshHomePath;
|
|
46108
|
-
if (typeof home
|
|
46109
|
-
|
|
46110
|
-
|
|
46111
|
-
|
|
46112
|
-
|
|
46106
|
+
if (typeof home !== "function") return void 0;
|
|
46107
|
+
try {
|
|
46108
|
+
return home("cache", "@dan-ai-studio/dshopencodego");
|
|
46109
|
+
} catch {
|
|
46110
|
+
return void 0;
|
|
46113
46111
|
}
|
|
46114
|
-
const configured = process.env.DSH_HOME?.trim();
|
|
46115
|
-
const root = configured !== void 0 && configured.length > 0 ? configured : join4(homedir(), ".dsh");
|
|
46116
|
-
return join4(root, "cache", "@dan-ai-studio/dshopencodego");
|
|
46117
46112
|
}
|
|
46118
46113
|
function apply(ctx, raw) {
|
|
46119
46114
|
const live = isLiveConfig(raw) ? raw : void 0;
|
|
@@ -46132,10 +46127,11 @@ function apply(ctx, raw) {
|
|
|
46132
46127
|
);
|
|
46133
46128
|
};
|
|
46134
46129
|
const meter = new UsageMeter();
|
|
46130
|
+
const cacheDir = resolveCacheDir(ctx);
|
|
46135
46131
|
const adapter = new OpencodeGoAdapter({
|
|
46136
46132
|
config: current,
|
|
46137
46133
|
resolveApiKey,
|
|
46138
|
-
cacheDir:
|
|
46134
|
+
...cacheDir === void 0 ? {} : { cacheDir },
|
|
46139
46135
|
imageAccess: {
|
|
46140
46136
|
resolveAttachments: () => ctx.get("attachments"),
|
|
46141
46137
|
resolveImageAccess: (attachments, ref) => llm2.resolveImageAttachmentAccess(
|
package/package.json
CHANGED