dsh-coding-subscription-oauth 0.6.0 → 0.6.2
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/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +0 -0
- package/INSTALL.md +9 -8
- package/LICENSE +0 -0
- package/NOTICE +0 -0
- package/README.de.md +7 -8
- package/README.es.md +7 -8
- package/README.fr.md +7 -8
- package/README.ja.md +7 -8
- package/README.ko.md +7 -8
- package/README.md +8 -9
- package/README.pt-BR.md +7 -8
- package/README.ru.md +7 -8
- package/README.zh-CN.md +8 -9
- package/compatibility/dsh-bom.json +17 -30
- package/cordis.patch.yml +0 -0
- package/docs/00-project-rules.md +0 -0
- package/docs/02-architecture.md +1 -1
- package/docs/02-architecture.zh-CN.md +1 -1
- package/lib/adapter.d.ts.map +1 -1
- package/lib/alias-adapter.d.ts +3 -1
- package/lib/alias-adapter.d.ts.map +1 -1
- package/lib/bin.js +3 -3
- package/lib/bin.js.map +1 -1
- package/lib/client.js +3 -3
- package/lib/client.js.map +4 -4
- package/lib/compatibility.d.ts +14 -14
- package/lib/dsh-host-adapter.d.ts.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +109 -79
- package/lib/index.js.map +3 -3
- package/media/en/settings_accounts.png +0 -0
- package/media/en/settings_capabilities.png +0 -0
- package/media/en/settings_gateway.png +0 -0
- package/media/settings_accounts.png +0 -0
- package/media/settings_capabilities.png +0 -0
- package/media/settings_gateway.png +0 -0
- package/media/settings_overview.png +0 -0
- package/media/zh-CN/settings_accounts.png +0 -0
- package/media/zh-CN/settings_capabilities.png +0 -0
- package/media/zh-CN/settings_gateway.png +0 -0
- package/package.json +38 -38
- package/patches/dsh-agy@0.1.2.patch +0 -0
- package/scripts/release.mjs +0 -0
- package/scripts/smoke-deployed-routes.mjs +0 -0
- package/scripts/verify-deployed-catalog.mjs +0 -0
- package/src/adapter.ts +75 -14
- package/src/alias-adapter.ts +17 -23
- package/src/auth-routes.ts +0 -0
- package/src/auth.ts +0 -0
- package/src/bin.ts +0 -0
- package/src/capability-routes.ts +0 -0
- package/src/capability-runtime.ts +0 -0
- package/src/capability-settings.ts +0 -0
- package/src/capability-tools.ts +0 -0
- package/src/catalog.ts +0 -0
- package/src/client/GrokBuildSettings.tsx +0 -0
- package/src/client/api.ts +0 -0
- package/src/client/components/AboutTab.tsx +0 -0
- package/src/client/components/AccountsTab.tsx +0 -0
- package/src/client/components/Badge.tsx +0 -0
- package/src/client/components/CapabilitiesTab.tsx +0 -0
- package/src/client/components/CliPullPreview.tsx +0 -0
- package/src/client/components/CopyButton.tsx +0 -0
- package/src/client/components/GatewayTab.tsx +0 -0
- package/src/client/components/NoticeBanner.tsx +0 -0
- package/src/client/components/ProgressBar.tsx +0 -0
- package/src/client/components/ProviderCard.tsx +0 -0
- package/src/client/components/SettingsTabs.tsx +0 -0
- package/src/client/components/ToggleSwitch.tsx +0 -0
- package/src/client/constants.ts +1 -1
- package/src/client/display.ts +0 -0
- package/src/client/dshClientAdapter.ts +32 -14
- package/src/client/gatewaySnippets.ts +0 -0
- package/src/client/index.tsx +3 -3
- package/src/client/locales.ts +0 -0
- package/src/client/microStyles.ts +0 -0
- package/src/client/parsers.ts +0 -0
- package/src/client/styles.ts +0 -0
- package/src/client/types.ts +0 -0
- package/src/codex-http.ts +0 -0
- package/src/codex-images.ts +0 -0
- package/src/codex-model-capabilities.ts +0 -0
- package/src/codex-search.ts +0 -0
- package/src/codex-usage.ts +0 -0
- package/src/compatibility.ts +14 -14
- package/src/dsh-host-adapter.ts +8 -6
- package/src/gateway-anthropic-messages.ts +0 -0
- package/src/gateway-auth.ts +0 -0
- package/src/gateway-backend.ts +0 -0
- package/src/gateway-body.ts +0 -0
- package/src/gateway-config.ts +0 -0
- package/src/gateway-http.ts +0 -0
- package/src/gateway-openai-chat.ts +0 -0
- package/src/gateway-openai-responses.ts +0 -0
- package/src/gateway-parse.ts +0 -0
- package/src/gateway-protocol.ts +0 -0
- package/src/gateway-routes.ts +0 -0
- package/src/gateway.ts +0 -0
- package/src/grok-errors.ts +0 -0
- package/src/grok-imagine.ts +0 -0
- package/src/grok-import.ts +0 -0
- package/src/http-json.ts +0 -0
- package/src/ids.ts +0 -0
- package/src/imagine-routes.ts +0 -0
- package/src/index.ts +26 -39
- package/src/invariant.ts +0 -0
- package/src/kimi-errors.ts +0 -0
- package/src/media-store.ts +0 -0
- package/src/oauth-import-routes.ts +0 -0
- package/src/oauth-providers.ts +0 -0
- package/src/oauth-session.ts +0 -0
- package/src/oauth-sources.ts +0 -0
- package/src/oauth.ts +0 -0
- package/src/provider.ts +0 -0
- package/src/proxy.ts +0 -0
- package/src/redact.ts +0 -0
- package/src/session.ts +0 -0
- package/src/store.ts +0 -0
- package/src/web-origin.ts +0 -0
- package/src/web-routes.ts +0 -0
package/lib/compatibility.d.ts
CHANGED
|
@@ -23,20 +23,20 @@ export interface DshCompatibility {
|
|
|
23
23
|
}
|
|
24
24
|
export declare const DSH_EXACT_BOM: Readonly<{
|
|
25
25
|
readonly "@deepseek-ai/cordis": "4.0.1";
|
|
26
|
-
readonly "@deepseek-ai/dsh-atomic-write": "0.1.
|
|
27
|
-
readonly "@deepseek-ai/dsh-attachment": "0.1.
|
|
28
|
-
readonly "@deepseek-ai/dsh-client-locale": "0.1.
|
|
29
|
-
readonly "@deepseek-ai/dsh-client-runtime": "0.1.
|
|
30
|
-
readonly "@deepseek-ai/dsh-client-ui-settings": "0.1.
|
|
31
|
-
readonly "@deepseek-ai/dsh-client-ui-slots": "0.1.
|
|
32
|
-
readonly "@deepseek-ai/dsh-client-web": "0.1.
|
|
33
|
-
readonly "@deepseek-ai/dsh-credentials": "0.1.
|
|
34
|
-
readonly "@deepseek-ai/dsh-home-paths": "0.1.
|
|
35
|
-
readonly "@deepseek-ai/dsh-host-webserver": "0.1.
|
|
36
|
-
readonly "@deepseek-ai/dsh-invariants": "0.1.
|
|
37
|
-
readonly "@deepseek-ai/dsh-llm": "0.1.
|
|
38
|
-
readonly "@deepseek-ai/dsh-llm-pi-ai": "0.1.
|
|
39
|
-
readonly "@deepseek-ai/dsh-tools": "0.1.
|
|
26
|
+
readonly "@deepseek-ai/dsh-atomic-write": "0.1.1-rc.2";
|
|
27
|
+
readonly "@deepseek-ai/dsh-attachment": "0.1.1-rc.2";
|
|
28
|
+
readonly "@deepseek-ai/dsh-client-locale": "0.1.1-rc.2";
|
|
29
|
+
readonly "@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2";
|
|
30
|
+
readonly "@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2";
|
|
31
|
+
readonly "@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2";
|
|
32
|
+
readonly "@deepseek-ai/dsh-client-web": "0.1.1-rc.2";
|
|
33
|
+
readonly "@deepseek-ai/dsh-credentials": "0.1.1-rc.2";
|
|
34
|
+
readonly "@deepseek-ai/dsh-home-paths": "0.1.1-rc.2";
|
|
35
|
+
readonly "@deepseek-ai/dsh-host-webserver": "0.1.1-rc.2";
|
|
36
|
+
readonly "@deepseek-ai/dsh-invariants": "0.1.1-rc.2";
|
|
37
|
+
readonly "@deepseek-ai/dsh-llm": "0.1.1-rc.2";
|
|
38
|
+
readonly "@deepseek-ai/dsh-llm-pi-ai": "0.1.1-rc.2";
|
|
39
|
+
readonly "@deepseek-ai/dsh-tools": "0.1.1-rc.2";
|
|
40
40
|
readonly "@deepseek-ai/schemastery": "3.18.1";
|
|
41
41
|
readonly "@earendil-works/pi-ai": "0.84.2";
|
|
42
42
|
readonly react: "18.3.1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dsh-host-adapter.d.ts","sourceRoot":"","sources":["../../src/dsh-host-adapter.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAGjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAGN,KAAK,eAAe,EAEpB,MAAM,uBAAuB,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ACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,GAAG,YAAY,GAAG,IAAI,CAAC;QAC/C,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;KAC7D,GAAG,gBAAgB,CAAC;IACrB,gBAAgB,IAAI,IAAI,CAAC;CACzB;AAqDD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,CAyFrE"}
|
package/lib/index.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare const XAI_API_KEY_CREDENTIAL = "XAI_API_KEY";
|
|
|
45
45
|
/** Owner-private artifact directory below the resolved DSH home. */
|
|
46
46
|
export { IMAGINE_MEDIA_STORE_DIRNAME } from "./ids.js";
|
|
47
47
|
/** Optional host services are acquired inside the elected child fiber. */
|
|
48
|
-
export declare const inject: readonly [];
|
|
48
|
+
export declare const inject: readonly ["webServer"];
|
|
49
49
|
/** Plugin configuration; every field is optional. */
|
|
50
50
|
export interface Config {
|
|
51
51
|
/** HTTP(S) proxy URL for the audited coding-subscription host allowlist. */
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAS,MAAM,qBAAqB,CAAC;AAI1D,OAAO,EAAsB,KAAK,iBAAiB,EAAqB,MAAM,sBAAsB,CAAC;AACrG,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAczC,OAAO,EACN,KAAK,uBAAuB,EAK5B,MAAM,0BAA0B,CAAC;AAclC,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,qBAAqB,CAAC;AAiC9E,YAAY,EACX,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,IAAI,sBAAsB,GAC5C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACN,yBAAyB,EACzB,qBAAqB,GACr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E,OAAO,EAAE,MAAM,GAAE,MAAW,GAAG,IAAI,CAmC7D"}
|
package/lib/index.js
CHANGED
|
@@ -50412,7 +50412,7 @@ import { dirname as dirname6, join as join8 } from "node:path";
|
|
|
50412
50412
|
import { assertUsableApiKey, RetryPolicySchema } from "@deepseek-ai/dsh-llm";
|
|
50413
50413
|
import z2 from "@deepseek-ai/schemastery";
|
|
50414
50414
|
|
|
50415
|
-
// node_modules/.pnpm/dsh-coding-oauth-core@
|
|
50415
|
+
// node_modules/.pnpm/dsh-coding-oauth-core@0.1.0/node_modules/dsh-coding-oauth-core/lib/proxy.js
|
|
50416
50416
|
var import_undici = __toESM(require_undici(), 1);
|
|
50417
50417
|
var DEFAULT_PROXIED_HOSTS = [
|
|
50418
50418
|
"auth.x.ai",
|
|
@@ -50547,7 +50547,7 @@ function grokBuildProxyInEffect() {
|
|
|
50547
50547
|
return codingOAuthProxyInEffect();
|
|
50548
50548
|
}
|
|
50549
50549
|
|
|
50550
|
-
// node_modules/.pnpm/dsh-coding-oauth-core@
|
|
50550
|
+
// node_modules/.pnpm/dsh-coding-oauth-core@0.1.0/node_modules/dsh-coding-oauth-core/lib/route-registration.js
|
|
50551
50551
|
function releaseRegistrationsSynchronously(disposers) {
|
|
50552
50552
|
for (const dispose of [...disposers].reverse()) {
|
|
50553
50553
|
try {
|
|
@@ -50583,7 +50583,7 @@ function setupAtomicallySynchronously(registry, setup) {
|
|
|
50583
50583
|
return onceSynchronously(disposers);
|
|
50584
50584
|
}
|
|
50585
50585
|
|
|
50586
|
-
// node_modules/.pnpm/dsh-coding-oauth-core@
|
|
50586
|
+
// node_modules/.pnpm/dsh-coding-oauth-core@0.1.0/node_modules/dsh-coding-oauth-core/lib/ids.js
|
|
50587
50587
|
var XAI_PI_PROVIDER = "xai";
|
|
50588
50588
|
var CODEX_PI_PROVIDER = "openai-codex";
|
|
50589
50589
|
var KIMI_PI_PROVIDER = "kimi-coding";
|
|
@@ -50611,7 +50611,7 @@ var CLAUDE_CODE_OAUTH_MODELS_CACHE_FILENAME = ".claude-code-oauth-models.json";
|
|
|
50611
50611
|
var DEFAULT_GROK_BUILD_MODEL = "grok-4.6";
|
|
50612
50612
|
var GROK_BUILD_STREAM_IDLE_TIMEOUT_MS = 3e5;
|
|
50613
50613
|
|
|
50614
|
-
// node_modules/.pnpm/dsh-coding-oauth-core@
|
|
50614
|
+
// node_modules/.pnpm/dsh-coding-oauth-core@0.1.0/node_modules/dsh-coding-oauth-core/lib/state-contract.js
|
|
50615
50615
|
var CAPABILITY_SETTINGS_NAMESPACE = "coding-subscription-oauth";
|
|
50616
50616
|
var GATEWAY_KEY_FILENAME = ".coding-oauth-gateway.json";
|
|
50617
50617
|
var IMAGINE_MEDIA_STORE_DIRNAME = ".dsh-coding-subscription-oauth-media";
|
|
@@ -50664,7 +50664,7 @@ var CODING_OAUTH_MANAGEMENT_PATHS = Object.freeze([
|
|
|
50664
50664
|
GATEWAY_ROTATE_PATH
|
|
50665
50665
|
]);
|
|
50666
50666
|
|
|
50667
|
-
// node_modules/.pnpm/dsh-coding-oauth-core@
|
|
50667
|
+
// node_modules/.pnpm/dsh-coding-oauth-core@0.1.0/node_modules/dsh-coding-oauth-core/lib/index.js
|
|
50668
50668
|
var CODING_OAUTH_CORE_ABI = "dsh-coding-oauth-core/v1";
|
|
50669
50669
|
var STORE_SYMBOL = /* @__PURE__ */ Symbol.for("dsh.coding-oauth-core.runtime-store");
|
|
50670
50670
|
function resolveCodingOAuthScope(context) {
|
|
@@ -50894,33 +50894,27 @@ function remapAuthFailureIfContextOverflow(failure) {
|
|
|
50894
50894
|
}
|
|
50895
50895
|
|
|
50896
50896
|
// src/alias-adapter.ts
|
|
50897
|
-
function
|
|
50898
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) return value;
|
|
50899
|
-
const state = value;
|
|
50900
|
-
if (state["kind"] !== "pi-ai" || state["provider"] === route2) return value;
|
|
50901
|
-
return { ...state, provider: route2 };
|
|
50902
|
-
}
|
|
50903
|
-
function normalizeReplayForRoute(message, route2) {
|
|
50897
|
+
function normalizeReplayForRoute(message, route2, nativeReplayProvider) {
|
|
50904
50898
|
if (message.role !== "assistant" || message.source.kind !== "model") return message;
|
|
50905
50899
|
if (message.source.provider !== route2) {
|
|
50906
50900
|
if (message.source.replayState === void 0) return message;
|
|
50907
50901
|
const { replayState: _foreignReplay, ...source } = message.source;
|
|
50908
50902
|
return { ...message, source };
|
|
50909
50903
|
}
|
|
50910
|
-
|
|
50911
|
-
if (replayState === message.source.replayState) return message;
|
|
50912
|
-
return { ...message, source: { ...message.source, replayState } };
|
|
50904
|
+
return { ...message, source: { ...message.source, provider: nativeReplayProvider } };
|
|
50913
50905
|
}
|
|
50914
50906
|
var AliasLlmAdapter = class extends LlmAdapter {
|
|
50915
|
-
constructor(inner, aliases, policies = /* @__PURE__ */ new Map()) {
|
|
50907
|
+
constructor(inner, aliases, policies = /* @__PURE__ */ new Map(), replayProviders = aliases) {
|
|
50916
50908
|
super();
|
|
50917
50909
|
this.inner = inner;
|
|
50918
50910
|
this.aliases = aliases;
|
|
50919
50911
|
this.policies = policies;
|
|
50912
|
+
this.replayProviders = replayProviders;
|
|
50920
50913
|
}
|
|
50921
50914
|
inner;
|
|
50922
50915
|
aliases;
|
|
50923
50916
|
policies;
|
|
50917
|
+
replayProviders;
|
|
50924
50918
|
nativeProvider(route2) {
|
|
50925
50919
|
const provider = this.aliases.get(route2);
|
|
50926
50920
|
if (provider === void 0) throw new LlmError(`OAuth adapter does not own provider "${route2}"`, "NO_ADAPTER");
|
|
@@ -50956,7 +50950,9 @@ var AliasLlmAdapter = class extends LlmAdapter {
|
|
|
50956
50950
|
async *stream(options) {
|
|
50957
50951
|
const route2 = options.provider;
|
|
50958
50952
|
const native = this.nativeProvider(route2);
|
|
50959
|
-
const messages = options.messages.map(
|
|
50953
|
+
const messages = options.messages.map(
|
|
50954
|
+
(message) => normalizeReplayForRoute(message, route2, this.replayProviders.get(route2) ?? native)
|
|
50955
|
+
);
|
|
50960
50956
|
let authFailureNotified = false;
|
|
50961
50957
|
for await (const raw of this.inner.stream({ ...options, provider: native, messages })) {
|
|
50962
50958
|
const chunk = raw.type === "finish" && raw.reason.kind === "error" ? {
|
|
@@ -50976,11 +50972,7 @@ var AliasLlmAdapter = class extends LlmAdapter {
|
|
|
50976
50972
|
}
|
|
50977
50973
|
}
|
|
50978
50974
|
}
|
|
50979
|
-
|
|
50980
|
-
yield { ...chunk, replayState: routePiAiReplayState(chunk.replayState, route2) };
|
|
50981
|
-
} else {
|
|
50982
|
-
yield chunk;
|
|
50983
|
-
}
|
|
50975
|
+
yield chunk;
|
|
50984
50976
|
}
|
|
50985
50977
|
}
|
|
50986
50978
|
};
|
|
@@ -51783,6 +51775,48 @@ function createCodexModelCapabilities(options) {
|
|
|
51783
51775
|
}
|
|
51784
51776
|
|
|
51785
51777
|
// src/adapter.ts
|
|
51778
|
+
var REQUEST_IMAGE_POLICY = {
|
|
51779
|
+
maxRequestImageBytes: 20 * 1024 * 1024,
|
|
51780
|
+
requestImagePixelBudget: 2048 * 2048,
|
|
51781
|
+
requestImageMaxBytes: 1024 * 1024
|
|
51782
|
+
};
|
|
51783
|
+
function oauthAuthInjection(grok, subscriptions) {
|
|
51784
|
+
const stores = new Map([
|
|
51785
|
+
[XAI_PI_PROVIDER, grok.store],
|
|
51786
|
+
...subscriptions.map((session) => [session.definition.nativeProviderId, session.store])
|
|
51787
|
+
]);
|
|
51788
|
+
const storeFor = (providerId) => stores.get(providerId);
|
|
51789
|
+
return {
|
|
51790
|
+
credentials: {
|
|
51791
|
+
async read(providerId, options) {
|
|
51792
|
+
return storeFor(providerId)?.read(providerId, options);
|
|
51793
|
+
},
|
|
51794
|
+
async list(options) {
|
|
51795
|
+
const entries = await Promise.all([...stores.values()].map((store) => store.list(options)));
|
|
51796
|
+
return entries.flat();
|
|
51797
|
+
},
|
|
51798
|
+
async modify(providerId, fn, options) {
|
|
51799
|
+
const store = storeFor(providerId);
|
|
51800
|
+
if (store === void 0)
|
|
51801
|
+
throw new Error(`refusing credential write for unknown OAuth provider "${providerId}"`);
|
|
51802
|
+
return store.modify(providerId, fn, options);
|
|
51803
|
+
},
|
|
51804
|
+
async delete(providerId, options) {
|
|
51805
|
+
const store = storeFor(providerId);
|
|
51806
|
+
if (store === void 0)
|
|
51807
|
+
throw new Error(`refusing credential deletion for unknown OAuth provider "${providerId}"`);
|
|
51808
|
+
await store.delete(providerId, options);
|
|
51809
|
+
}
|
|
51810
|
+
},
|
|
51811
|
+
authContext: {
|
|
51812
|
+
// Subscription adapters obtain request credentials only from their
|
|
51813
|
+
// owner-scoped stores. Do not let a foreign environment/file credential
|
|
51814
|
+
// silently change a selected OAuth route.
|
|
51815
|
+
env: async () => void 0,
|
|
51816
|
+
fileExists: async () => false
|
|
51817
|
+
}
|
|
51818
|
+
};
|
|
51819
|
+
}
|
|
51786
51820
|
function preferredGrokBuildModel(models = grokBuildBaselineModels()) {
|
|
51787
51821
|
return preferredGrokBuildModelFrom(models.length === 0 ? [{ id: DEFAULT_GROK_BUILD_MODEL }] : models);
|
|
51788
51822
|
}
|
|
@@ -51809,6 +51843,7 @@ function profile(provider, displayName, piProvider, retryPolicy, headers) {
|
|
|
51809
51843
|
"dsh-coding-subscription-oauth retryPolicy"
|
|
51810
51844
|
),
|
|
51811
51845
|
configuredMaxTokens: /* @__PURE__ */ new Map(),
|
|
51846
|
+
...REQUEST_IMAGE_POLICY,
|
|
51812
51847
|
...headers === void 0 ? {} : { headers },
|
|
51813
51848
|
piProvider
|
|
51814
51849
|
};
|
|
@@ -51825,6 +51860,7 @@ function createGrokBuildAdapter(session, resolveAttachments) {
|
|
|
51825
51860
|
const auth = await session.models.getAuth(XAI_PI_PROVIDER, { minOAuthValidityMs: MIN_OAUTH_VALIDITY_MS });
|
|
51826
51861
|
return auth?.auth.apiKey;
|
|
51827
51862
|
}),
|
|
51863
|
+
auth: oauthAuthInjection(session, []),
|
|
51828
51864
|
resolveAttachments
|
|
51829
51865
|
});
|
|
51830
51866
|
}
|
|
@@ -51931,9 +51967,12 @@ function createCodingOAuthAdapter(grok, subscriptions, resolveAttachments, retry
|
|
|
51931
51967
|
if (session === void 0) throw new LlmError3(`Unknown OAuth provider "${provider}"`, "NO_ADAPTER");
|
|
51932
51968
|
return resolveOAuthToken(session.definition.displayName, () => session.resolveAccessToken());
|
|
51933
51969
|
},
|
|
51970
|
+
auth: oauthAuthInjection(grok, subscriptions),
|
|
51934
51971
|
resolveAttachments
|
|
51935
51972
|
});
|
|
51936
|
-
|
|
51973
|
+
const replayProviders = new Map(aliases);
|
|
51974
|
+
replayProviders.set(CODEX_OAUTH_FAST_ROUTE, CODEX_PI_PROVIDER);
|
|
51975
|
+
return new AliasLlmAdapter(inner, aliases, policies, replayProviders);
|
|
51937
51976
|
}
|
|
51938
51977
|
async function resolveOAuthToken(displayName, getAccessToken) {
|
|
51939
51978
|
let accessToken;
|
|
@@ -58156,20 +58195,20 @@ import { createRequire } from "node:module";
|
|
|
58156
58195
|
// src/compatibility.ts
|
|
58157
58196
|
var DSH_EXACT_BOM = Object.freeze({
|
|
58158
58197
|
"@deepseek-ai/cordis": "4.0.1",
|
|
58159
|
-
"@deepseek-ai/dsh-atomic-write": "0.1.
|
|
58160
|
-
"@deepseek-ai/dsh-attachment": "0.1.
|
|
58161
|
-
"@deepseek-ai/dsh-client-locale": "0.1.
|
|
58162
|
-
"@deepseek-ai/dsh-client-runtime": "0.1.
|
|
58163
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.
|
|
58164
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.
|
|
58165
|
-
"@deepseek-ai/dsh-client-web": "0.1.
|
|
58166
|
-
"@deepseek-ai/dsh-credentials": "0.1.
|
|
58167
|
-
"@deepseek-ai/dsh-home-paths": "0.1.
|
|
58168
|
-
"@deepseek-ai/dsh-host-webserver": "0.1.
|
|
58169
|
-
"@deepseek-ai/dsh-invariants": "0.1.
|
|
58170
|
-
"@deepseek-ai/dsh-llm": "0.1.
|
|
58171
|
-
"@deepseek-ai/dsh-llm-pi-ai": "0.1.
|
|
58172
|
-
"@deepseek-ai/dsh-tools": "0.1.
|
|
58198
|
+
"@deepseek-ai/dsh-atomic-write": "0.1.1-rc.2",
|
|
58199
|
+
"@deepseek-ai/dsh-attachment": "0.1.1-rc.2",
|
|
58200
|
+
"@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
|
|
58201
|
+
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
58202
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
58203
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.1-rc.2",
|
|
58204
|
+
"@deepseek-ai/dsh-client-web": "0.1.1-rc.2",
|
|
58205
|
+
"@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
|
|
58206
|
+
"@deepseek-ai/dsh-home-paths": "0.1.1-rc.2",
|
|
58207
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.1-rc.2",
|
|
58208
|
+
"@deepseek-ai/dsh-invariants": "0.1.1-rc.2",
|
|
58209
|
+
"@deepseek-ai/dsh-llm": "0.1.1-rc.2",
|
|
58210
|
+
"@deepseek-ai/dsh-llm-pi-ai": "0.1.1-rc.2",
|
|
58211
|
+
"@deepseek-ai/dsh-tools": "0.1.1-rc.2",
|
|
58173
58212
|
"@deepseek-ai/schemastery": "3.18.1",
|
|
58174
58213
|
"@earendil-works/pi-ai": "0.84.2",
|
|
58175
58214
|
react: "18.3.1",
|
|
@@ -58186,9 +58225,14 @@ function record(value) {
|
|
|
58186
58225
|
}
|
|
58187
58226
|
function service(context, name2) {
|
|
58188
58227
|
try {
|
|
58189
|
-
|
|
58228
|
+
const value = context.get(name2);
|
|
58229
|
+
if (value !== void 0 && value !== null) return value;
|
|
58190
58230
|
} catch {
|
|
58231
|
+
}
|
|
58232
|
+
try {
|
|
58191
58233
|
return record(context)?.[name2];
|
|
58234
|
+
} catch {
|
|
58235
|
+
return void 0;
|
|
58192
58236
|
}
|
|
58193
58237
|
}
|
|
58194
58238
|
function capability(value, contract, methods) {
|
|
@@ -58226,7 +58270,7 @@ function createDshHostAdapter(context) {
|
|
|
58226
58270
|
});
|
|
58227
58271
|
}
|
|
58228
58272
|
}
|
|
58229
|
-
const llm = record(service(context, "llm"))
|
|
58273
|
+
const llm = record(service(context, "llm"));
|
|
58230
58274
|
if (llm === void 0 || typeof llm["registerAdapter"] !== "function") {
|
|
58231
58275
|
diagnostics.push({
|
|
58232
58276
|
id: "host.api.llm.registerAdapter",
|
|
@@ -58253,9 +58297,7 @@ function createDshHostAdapter(context) {
|
|
|
58253
58297
|
webServer: capability(service(context, "webServer"), "exact-route-v1", ["register"]),
|
|
58254
58298
|
settings: capability(service(context, "settings"), "settings-register-v1", ["register"]),
|
|
58255
58299
|
credentials: capability(service(context, "credentials"), "credential-resolver-v1", ["resolve"]),
|
|
58256
|
-
llm: capability(service(context, "llm")
|
|
58257
|
-
"registerAdapter"
|
|
58258
|
-
]),
|
|
58300
|
+
llm: capability(service(context, "llm"), "llm-adapter-registry-v1", ["registerAdapter"]),
|
|
58259
58301
|
ownerRequestPolicy: capability(service(context, "ownerRequestPolicy"), "owner-request-policy-v1", [
|
|
58260
58302
|
"authorize",
|
|
58261
58303
|
"diagnostics"
|
|
@@ -60399,7 +60441,7 @@ function fixedCredentialRef(value) {
|
|
|
60399
60441
|
}
|
|
60400
60442
|
return value;
|
|
60401
60443
|
}
|
|
60402
|
-
var inject = [];
|
|
60444
|
+
var inject = ["webServer"];
|
|
60403
60445
|
var Config = z2.object({
|
|
60404
60446
|
proxy: z2.string(),
|
|
60405
60447
|
proxyKimi: z2.boolean().default(false),
|
|
@@ -60650,40 +60692,30 @@ async function applyOwned(ctx, config) {
|
|
|
60650
60692
|
});
|
|
60651
60693
|
return () => gateway.stop();
|
|
60652
60694
|
}, "dsh-coding-subscription-oauth: local API gateway");
|
|
60653
|
-
|
|
60654
|
-
|
|
60655
|
-
|
|
60656
|
-
|
|
60657
|
-
|
|
60658
|
-
|
|
60659
|
-
|
|
60660
|
-
|
|
60661
|
-
|
|
60662
|
-
|
|
60663
|
-
|
|
60664
|
-
|
|
60665
|
-
|
|
60666
|
-
|
|
60667
|
-
|
|
60668
|
-
|
|
60669
|
-
|
|
60670
|
-
|
|
60671
|
-
|
|
60672
|
-
|
|
60673
|
-
|
|
60674
|
-
|
|
60675
|
-
|
|
60676
|
-
|
|
60677
|
-
notifyCatalogChange();
|
|
60678
|
-
}
|
|
60679
|
-
});
|
|
60680
|
-
webRoutesMounted = true;
|
|
60681
|
-
webCtx.effect(
|
|
60682
|
-
() => () => {
|
|
60683
|
-
webRoutesMounted = false;
|
|
60684
|
-
},
|
|
60685
|
-
"dsh-coding-subscription-oauth: required web route readiness"
|
|
60686
|
-
);
|
|
60695
|
+
registerCapabilityRoutes(ctx, {
|
|
60696
|
+
controller: capabilityRoutesController,
|
|
60697
|
+
usage: () => usage.read(),
|
|
60698
|
+
credentialInfo: () => describeImagineCredential(ctx.get("credentials")),
|
|
60699
|
+
ownerRequestPolicy
|
|
60700
|
+
});
|
|
60701
|
+
registerGatewayRoutes(ctx, gateway, ownerRequestPolicy);
|
|
60702
|
+
registerCodingOAuthRoutes(
|
|
60703
|
+
ctx,
|
|
60704
|
+
grok,
|
|
60705
|
+
subscriptions,
|
|
60706
|
+
ownerRequestPolicy,
|
|
60707
|
+
(accessMode) => host.compatibility({
|
|
60708
|
+
accessMode,
|
|
60709
|
+
uiOwner: "standalone",
|
|
60710
|
+
diagnostics: ownerRequestPolicy.diagnostics()
|
|
60711
|
+
})
|
|
60712
|
+
);
|
|
60713
|
+
registerOAuthImportRoutes(ctx, oauthImportDestinations(grok, subscriptions), {
|
|
60714
|
+
ownerRequestPolicy,
|
|
60715
|
+
onImported: (event) => {
|
|
60716
|
+
if (event.kind === "codex") invalidateOptionalAuthState();
|
|
60717
|
+
notifyCatalogChange();
|
|
60718
|
+
}
|
|
60687
60719
|
});
|
|
60688
60720
|
const search = createCodexSearchProvider({
|
|
60689
60721
|
auth: codexAuth,
|
|
@@ -60764,8 +60796,6 @@ async function applyOwned(ctx, config) {
|
|
|
60764
60796
|
["llm"],
|
|
60765
60797
|
(llmCtx) => applyOwnedLlm(llmCtx, config, { grok, subscriptions, runtime, codexAuth, codexModels, logger })
|
|
60766
60798
|
);
|
|
60767
|
-
await webRoutesFiber.await();
|
|
60768
|
-
if (!webRoutesMounted) throw new Error("required DSH webServer routes did not activate");
|
|
60769
60799
|
}
|
|
60770
60800
|
function applyOwnedLlm(ctx, config, owner) {
|
|
60771
60801
|
createDshHostAdapter(ctx).assertCompatible();
|