dsh-codex-community 0.0.1 → 0.0.3
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 +78 -0
- package/README.en.md +14 -10
- package/README.md +14 -10
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/dist/client/index.js +746 -64
- package/dist/host/index.mjs +3 -0
- package/dist/internal/authorization-bridge.mjs +12 -0
- package/dist/internal/codex-account-usage.mjs +509 -0
- package/dist/internal/codex-model-capabilities.mjs +90 -0
- package/dist/internal/codex-pi-provider.mjs +30 -3
- package/dist/internal/codex-provider-runtime.mjs +27 -1
- package/dist/internal/codex-route-adapter.mjs +36 -3
- package/dist/internal/session-preference-bridge.mjs +150 -0
- package/docs/README.en.md +2 -0
- package/docs/README.md +2 -0
- package/docs/architecture.en.md +20 -11
- package/docs/architecture.md +20 -11
- package/docs/compatibility.en.md +14 -12
- package/docs/compatibility.md +14 -12
- package/docs/configuration.en.md +23 -1
- package/docs/configuration.md +23 -1
- package/docs/releases/v0.0.1.md +0 -2
- package/docs/releases/v0.0.2.acceptance.json +160 -0
- package/docs/releases/v0.0.2.md +56 -0
- package/docs/releases/v0.0.3.acceptance.json +160 -0
- package/docs/releases/v0.0.3.md +62 -0
- package/docs/releasing.en.md +1 -1
- package/docs/releasing.md +1 -1
- package/docs/troubleshooting.en.md +19 -3
- package/docs/troubleshooting.md +19 -3
- package/package.json +11 -1
- package/types/client.d.ts +59 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-codex-community",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "DeepSeek Harness Codex 社区接入 / Community Codex integration for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,6 +48,8 @@
|
|
|
48
48
|
"inject": [
|
|
49
49
|
"@deepseek-ai/dsh-client-connection",
|
|
50
50
|
"@deepseek-ai/dsh-client-runtime",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
51
53
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
52
54
|
"@deepseek-ai/dsh-client-locale"
|
|
53
55
|
],
|
|
@@ -94,6 +96,8 @@
|
|
|
94
96
|
"@deepseek-ai/dsh-client-connection": "0.1.1-rc.2",
|
|
95
97
|
"@deepseek-ai/dsh-client-locale": "0.1.1-rc.2",
|
|
96
98
|
"@deepseek-ai/dsh-client-runtime": "0.1.1-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.1-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.1-rc.2",
|
|
97
101
|
"@deepseek-ai/dsh-client-ui-settings": "0.1.1-rc.2",
|
|
98
102
|
"@deepseek-ai/dsh-commands": "0.1.1-rc.2",
|
|
99
103
|
"@deepseek-ai/dsh-credentials": "0.1.1-rc.2",
|
|
@@ -112,6 +116,12 @@
|
|
|
112
116
|
"@deepseek-ai/dsh-client-runtime": {
|
|
113
117
|
"optional": true
|
|
114
118
|
},
|
|
119
|
+
"@deepseek-ai/dsh-client-ui-conversation": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
122
|
+
"@deepseek-ai/dsh-client-ui-model-selection": {
|
|
123
|
+
"optional": true
|
|
124
|
+
},
|
|
115
125
|
"@deepseek-ai/dsh-client-ui-settings": {
|
|
116
126
|
"optional": true
|
|
117
127
|
},
|
package/types/client.d.ts
CHANGED
|
@@ -47,6 +47,25 @@ export interface AuthorizationStatus {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
export interface CodexUsageWindow {
|
|
51
|
+
usedPercent: number
|
|
52
|
+
windowDurationMins: number
|
|
53
|
+
resetsAt: number
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CodexUsageRateLimit {
|
|
57
|
+
limitId: string
|
|
58
|
+
limitName?: string
|
|
59
|
+
primary?: CodexUsageWindow
|
|
60
|
+
secondary?: CodexUsageWindow
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface CodexAccountUsage {
|
|
64
|
+
observedAt: number
|
|
65
|
+
planType?: string
|
|
66
|
+
rateLimits: readonly CodexUsageRateLimit[]
|
|
67
|
+
}
|
|
68
|
+
|
|
50
69
|
export interface AuthorizationClient {
|
|
51
70
|
describe(signal?: AbortSignal): Promise<AuthorizationStatus>
|
|
52
71
|
watch(attemptId: string, after: number, signal?: AbortSignal): Promise<{
|
|
@@ -63,11 +82,41 @@ export interface AuthorizationClient {
|
|
|
63
82
|
reason?: "commit-in-progress"
|
|
64
83
|
}>
|
|
65
84
|
logout(): Promise<{ signedOut: boolean }>
|
|
85
|
+
usage(signal?: AbortSignal): Promise<CodexAccountUsage>
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface CodexSessionPreference {
|
|
89
|
+
fast: boolean
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface SessionPreferenceClient {
|
|
93
|
+
get(signal?: AbortSignal): Promise<CodexSessionPreference>
|
|
94
|
+
setFast(fast: boolean, signal?: AbortSignal): Promise<CodexSessionPreference>
|
|
66
95
|
}
|
|
67
96
|
|
|
97
|
+
export interface SessionPreferenceClientFactory {
|
|
98
|
+
forSession(sessionId: string): SessionPreferenceClient
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface CodexCurrentModel {
|
|
102
|
+
provider: string
|
|
103
|
+
model: string
|
|
104
|
+
reasoningEffort?: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface CodexModelDirectoryState {
|
|
108
|
+
current?: CodexCurrentModel | null
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type UseCodexModelDirectory = <Selected>(
|
|
112
|
+
selector: (state: CodexModelDirectoryState) => Selected,
|
|
113
|
+
) => Selected
|
|
114
|
+
|
|
68
115
|
export interface CodexModelCatalogEntry {
|
|
69
116
|
id: string
|
|
70
117
|
name?: string
|
|
118
|
+
contextWindow?: number
|
|
119
|
+
maxTokens?: number
|
|
71
120
|
}
|
|
72
121
|
|
|
73
122
|
export interface CodexModelEnablementSnapshot {
|
|
@@ -131,6 +180,9 @@ export interface RpcConnection {
|
|
|
131
180
|
}
|
|
132
181
|
|
|
133
182
|
export declare function createAuthorizationClient(connection: RpcConnection): AuthorizationClient
|
|
183
|
+
export declare function createSessionPreferenceClient(
|
|
184
|
+
connection: RpcConnection,
|
|
185
|
+
): SessionPreferenceClientFactory
|
|
134
186
|
export declare function createModelEnablementClient(
|
|
135
187
|
connection: unknown,
|
|
136
188
|
settingsFace?: SettingsDescribeFace,
|
|
@@ -148,6 +200,13 @@ export declare function AuthorizationSettings(props: {
|
|
|
148
200
|
client: AuthorizationClient
|
|
149
201
|
t(key: string): string
|
|
150
202
|
}): unknown
|
|
203
|
+
export declare function CodexFastToggle(props: {
|
|
204
|
+
session?: { removed?: boolean }
|
|
205
|
+
useModelDirectory: UseCodexModelDirectory
|
|
206
|
+
preferenceClient: SessionPreferenceClient
|
|
207
|
+
selectModel?(selection: CodexCurrentModel): Promise<void> | void
|
|
208
|
+
t(key: string): string
|
|
209
|
+
}): unknown
|
|
151
210
|
export declare function ModelEnablementSettings(props: {
|
|
152
211
|
client: ModelEnablementClient
|
|
153
212
|
t(key: string): string
|