@dan-ai-studio/dshopencodego 0.1.36 → 0.1.38

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.
@@ -64,7 +64,10 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
64
64
  var e = new Error(message);
65
65
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
66
66
  });
67
- import { getSupportedThinkingLevels, normalizeContext } from '@earendil-works/pi-ai';
67
+ // Subpath imports: the package root also re-exports every provider's wire
68
+ // implementation, which this plugin does not mount. See catalog/index.ts.
69
+ import { getSupportedThinkingLevels } from '@earendil-works/pi-ai/models';
70
+ import { normalizeContext } from '@earendil-works/pi-ai/utils/transcript';
68
71
  import { attributionHeaders, contentHasImage, LlmAdapter, LlmError, ReasoningEffortId, resolveRetryPolicy, } from '@deepseek-ai/dsh-llm';
69
72
  import { idleWatchdog, timeoutOf } from '@deepseek-ai/dsh-timeout';
70
73
  import { DISPLAY_NAME, PROVIDER_ID, OpencodeGoCatalog } from "./catalog/index.js";
@@ -18,8 +18,13 @@
18
18
  *
19
19
  * @module @dan-ai-studio/dshopencodego/catalog
20
20
  */
21
- import { createProvider } from '@earendil-works/pi-ai';
22
- import { getBuiltinModels } from '@earendil-works/pi-ai/providers/all';
21
+ // Subpath imports on purpose. The package root re-exports `./api/lazy.js` (every
22
+ // provider's wire implementation) and `providers/all.js` loads every provider's
23
+ // model data — 991 KB under `providers/data` alone. This plugin mounts three
24
+ // APIs for one provider, so each symbol is taken from the narrowest public entry
25
+ // that exports it. Types still come from the root: they vanish at build time.
26
+ import { createProvider } from '@earendil-works/pi-ai/models';
27
+ import { OPENCODE_GO_MODELS } from '@earendil-works/pi-ai/providers/opencode-go.models';
23
28
  import { anthropicMessagesApi } from '@earendil-works/pi-ai/api/anthropic-messages.lazy';
24
29
  import { openAICompletionsApi } from '@earendil-works/pi-ai/api/openai-completions.lazy';
25
30
  import { openAIResponsesApi } from '@earendil-works/pi-ai/api/openai-responses.lazy';
@@ -41,7 +46,10 @@ export { decideProtocol, inferProtocol, protocolOfNpm } from "./protocol.js";
41
46
  * `compat` is what keeps DeepSeek-family reasoning replay correct.
42
47
  */
43
48
  function builtinModels(baseURL) {
44
- return new Map(getBuiltinModels(PROVIDER_ID).map(model => [model.id, {
49
+ // `OPENCODE_GO_MODELS` is the same table `getBuiltinModels('opencode-go')`
50
+ // reads — verified entry for entry — reached without loading the aggregate
51
+ // `models.generated.js` that carries every provider.
52
+ return new Map(Object.values(OPENCODE_GO_MODELS).map(model => [model.id, {
45
53
  ...model,
46
54
  provider: PROVIDER_ID,
47
55
  baseUrl: modelBaseURLFor(model.api, baseURL),
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { brandString } from '@deepseek-ai/dsh-brand';
11
11
  import { CONTEXT_WINDOW_EXCEEDED_CODE, EMPTY_RESPONSE_CODE, isContextWindowExceededError, isQuotaExceededError, LlmError, } from '@deepseek-ai/dsh-llm';
12
- import { isContextOverflow } from '@earendil-works/pi-ai';
12
+ import { isContextOverflow } from '@earendil-works/pi-ai/utils/overflow';
13
13
  import { toPiReplayState } from "./replay.js";
14
14
  /**
15
15
  * Map pi-ai usage (reasoning already folded into output).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dan-ai-studio/dshopencodego",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
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",
@@ -66,10 +66,6 @@
66
66
  "prepare": "npm run build",
67
67
  "prepack": "npm run build"
68
68
  },
69
- "dependencies": {
70
- "@deepseek-ai/schemastery": "~3.18.5-alpha.2",
71
- "@earendil-works/pi-ai": "~1.3.0"
72
- },
73
69
  "peerDependencies": {
74
70
  "@deepseek-ai/cordis": "4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2",
75
71
  "@deepseek-ai/dsh-api-remotes": ">=0.2.0-rc.1 <0.3.0",
@@ -145,7 +141,9 @@
145
141
  "react": "^18.3.1",
146
142
  "react-dom": "^18.3.1",
147
143
  "typescript": "^6.0.3",
148
- "vitest": "^4.1.8"
144
+ "vitest": "^4.1.8",
145
+ "@earendil-works/pi-ai": "~1.3.0",
146
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.2"
149
147
  },
150
148
  "keywords": [
151
149
  "deepseek-harness",